mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-02-16 01:49:00 -06:00
Merge pull request #9931 from owncloud/test/app-endpoints
[tests-only][full-ci] add test coverage to open open-document file with /app/open-with-web endpoint
This commit is contained in:
@@ -2345,6 +2345,14 @@ class FeatureContext extends BehatVariablesContext {
|
||||
"getUUIDv4Regex"
|
||||
],
|
||||
"parameter" => []
|
||||
],
|
||||
[
|
||||
"code" => "%uuidv4_pattern%",
|
||||
"function" => [
|
||||
__NAMESPACE__ . '\TestHelpers\GraphHelper',
|
||||
"getUUIDv4Regex"
|
||||
],
|
||||
"parameter" => []
|
||||
]
|
||||
];
|
||||
if ($user !== null) {
|
||||
|
||||
@@ -251,3 +251,29 @@ Feature: collaboration (wopi)
|
||||
| app-endpoint |
|
||||
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice |
|
||||
| /app/open?file_id=<<FILEID>> |
|
||||
|
||||
@issue-9495
|
||||
Scenario Outline: open file with .odt extension (open-with-web)
|
||||
Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"
|
||||
And we save it into "FILEID"
|
||||
When user "Alice" sends HTTP method "POST" to URL "<app-endpoint>"
|
||||
Then the HTTP status code should be "200"
|
||||
And the JSON data of the response should match
|
||||
"""
|
||||
{
|
||||
"type": "object",
|
||||
"required": [
|
||||
"uri"
|
||||
],
|
||||
"properties": {
|
||||
"uri": {
|
||||
"type": "string",
|
||||
"pattern": "%base_url%/external\\?<url-query>contextRouteName=files-spaces-personal&fileId=%uuidv4_pattern%%24%uuidv4_pattern%%21%uuidv4_pattern%$"
|
||||
}
|
||||
}
|
||||
}
|
||||
"""
|
||||
Examples:
|
||||
| app-endpoint | url-query |
|
||||
| /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice | app=FakeOffice& |
|
||||
| /app/open-with-web?file_id=<<FILEID>> | |
|
||||
|
||||
Reference in New Issue
Block a user