Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[tests-only][full-ci] added test to create .odt file inside shared folder using /app/new endpoint #9967

Merged
merged 1 commit into from
Sep 17, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
67 changes: 66 additions & 1 deletion tests/acceptance/features/apiCollaboration/wopi.feature
Original file line number Diff line number Diff line change
Expand Up @@ -825,7 +825,7 @@ Feature: collaboration (wopi)
| Manager |


Scenario: user with Viewer role tries to create a text file inside shared project space using wopi endpoint
Scenario: user with Viewer role tries to create a odt file inside shared project space using wopi endpoint
Given using spaces DAV path
And the administrator has assigned the role "Space Admin" to user "Alice" using the Graph API
And user "Alice" has created a space "new-space" with the default quota using the Graph API
Expand Down Expand Up @@ -859,3 +859,68 @@ Feature: collaboration (wopi)
| simple.odt |
And for user "Brian" folder "testFolder" of the space "new-space" should not contain these files:
| simple.odt |


Scenario Outline: sharee with permission Editor/Uploader creates odt file inside shared folder using wopi endpoint
Given user "Alice" has created folder "testFolder"
And user "Alice" has sent the following resource share invitation:
| resource | testFolder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | <permissions-role> |
When user "Brian" creates a file "simple.odt" inside folder "testFolder" in space "Shares" using wopi endpoint
Then the HTTP status code should be "200"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"file_id"
],
"properties": {
"file_id": {
"type": "string",
"pattern": "^%file_id_pattern%$"
}
}
}
"""
And as "Alice" file "testFolder/simple.odt" should exist
And as "Brian" file "Shares/testFolder/simple.odt" should exist
Examples:
| permissions-role |
| Editor |
| Uploader |


Scenario: sharee with permission Viewer tries to create odt file inside shared folder using wopi endpoint
Given user "Alice" has created folder "testFolder"
And user "Alice" has sent the following resource share invitation:
| resource | testFolder |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Viewer |
When user "Brian" tries to create a file "simple.odt" inside folder "testFolder" in space "Shares" using wopi endpoint
Then the HTTP status code should be "500"
And the JSON data of the response should match
"""
{
"type": "object",
"required": [
"code",
"message"
],
"properties": {
"code": {
"const": "SERVER_ERROR"
},
"message": {
"const": "error calling InitiateFileUpload"
}
}
}
"""
And as "Alice" file "testFolder/simple.odt" should not exist
And as "Brian" file "Shares/testFolder/simple.odt" should not exist