Skip to content

Commit

Permalink
Merge pull request #9969 from owncloud/test-different-view-mode
Browse files Browse the repository at this point in the history
[tests-only][full-ci] test: add test coverage for opening file using /app/open-with-web  endpoint with different view mode
  • Loading branch information
anon-pradip committed Sep 6, 2024
2 parents 91969e6 + fe51219 commit 499dd06
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions tests/acceptance/features/apiCollaboration/wopi.feature
Original file line number Diff line number Diff line change
Expand Up @@ -466,3 +466,30 @@ Feature: collaboration (wopi)
| app-endpoint | url-query |
| /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice | app=FakeOffice& |
| /app/open-with-web?file_id=<<FILEID>> | |


Scenario Outline: open file with .odt extension with different view mode (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\\?app=FakeOffice&contextRouteName=files-spaces-personal&fileId=%uuidv4_pattern%%24%uuidv4_pattern%%21%uuidv4_pattern%$"
}
}
}
"""
Examples:
| app-endpoint |
| /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=view |
| /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=read |
| /app/open-with-web?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=write |

0 comments on commit 499dd06

Please sign in to comment.