Merge pull request #9954 from owncloud/different-view-mode
[tests-only][full-ci]added test for open file using `/app/open` endpoint with different view mode
This commit is contained in:
@@ -282,6 +282,53 @@ Feature: collaboration (wopi)
|
|||||||
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice |
|
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice |
|
||||||
| /app/open?file_id=<<FILEID>> |
|
| /app/open?file_id=<<FILEID>> |
|
||||||
|
|
||||||
|
|
||||||
|
Scenario Outline: open file with .odt extension with different view mode
|
||||||
|
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": [
|
||||||
|
"app_url",
|
||||||
|
"method",
|
||||||
|
"form_parameters"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"app_url": {
|
||||||
|
"type": "string",
|
||||||
|
"pattern": "^.*\\?WOPISrc=.*wopi%2Ffiles%2F[a-fA-F0-9]{64}$"
|
||||||
|
},
|
||||||
|
"method": {
|
||||||
|
"const": "POST"
|
||||||
|
},
|
||||||
|
"form_parameters": {
|
||||||
|
"type": "object",
|
||||||
|
"required": [
|
||||||
|
"access_token",
|
||||||
|
"access_token_ttl"
|
||||||
|
],
|
||||||
|
"properties": {
|
||||||
|
"access_token": {
|
||||||
|
"type": "string"
|
||||||
|
},
|
||||||
|
"access_token_ttl": {
|
||||||
|
"type": "string"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
"""
|
||||||
|
Examples:
|
||||||
|
| app-endpoint |
|
||||||
|
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=view |
|
||||||
|
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=read |
|
||||||
|
| /app/open?file_id=<<FILEID>>&app_name=FakeOffice&view_mode=write |
|
||||||
|
|
||||||
@issue-9495
|
@issue-9495
|
||||||
Scenario Outline: open file with .odt extension (open-with-web)
|
Scenario Outline: open file with .odt extension (open-with-web)
|
||||||
Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"
|
Given user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"
|
||||||
|
|||||||
Reference in New Issue
Block a user