added test to create .odt file inside shared folder

This commit is contained in:
Prajwol Amatya
2024-09-03 09:55:40 +05:45
parent 4d5168f6c3
commit 5af9ff5202

View File

@@ -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
@@ -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