mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-04-28 06:49:49 -05:00
Merge pull request #9922 from owncloud/shared-odt-file
[tests-only][full-ci]added test for sharee to open file with `/app/open` endpoint
This commit is contained in:
@@ -406,6 +406,7 @@ default:
|
||||
context: *common_ldap_suite_context
|
||||
contexts:
|
||||
- FeatureContext: *common_feature_context_params
|
||||
- SharingNgContext:
|
||||
|
||||
cliCommands:
|
||||
paths:
|
||||
|
||||
@@ -94,7 +94,7 @@ Feature: collaboration (wopi)
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
@issue-9928
|
||||
Scenario: open text file without app name in url query (MIME type not registered in app-registry)
|
||||
Given user "Alice" has uploaded file "filesForUpload/lorem.txt" to "lorem.txt"
|
||||
And we save it into "FILEID"
|
||||
@@ -118,3 +118,56 @@ Feature: collaboration (wopi)
|
||||
}
|
||||
}
|
||||
"""
|
||||
|
||||
|
||||
Scenario Outline: sharee open file with .odt extension
|
||||
Given user "Brian" has been created with default attributes and without skeleton files
|
||||
And user "Alice" has uploaded file "filesForUpload/simple.odt" to "simple.odt"
|
||||
And we save it into "FILEID"
|
||||
And user "Alice" has sent the following resource share invitation:
|
||||
| resource | simple.odt |
|
||||
| space | Personal |
|
||||
| sharee | Brian |
|
||||
| shareType | user |
|
||||
| permissionsRole | Viewer |
|
||||
When user "Brian" 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 |
|
||||
| /app/open?file_id=<<FILEID>> |
|
||||
|
||||
Reference in New Issue
Block a user