mirror of
https://github.com/opencloud-eu/opencloud.git
synced 2026-05-21 20:38:49 -05:00
added test for copy folder operation
modified steps of scenarios related to shares jail space updated expected to failure by shares jail addressed review removed shares jail expected to failure
This commit is contained in:
@@ -22,25 +22,9 @@ The expected failures in this file are from features in the owncloud/ocis repo.
|
||||
### [Search by shares jail works incorrect](https://github.com/owncloud/ocis/issues/4014)
|
||||
- [apiSpaces/search.feature:43](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/search.feature#L43)
|
||||
|
||||
### [Depth infinity not supported for space Shares Jail](https://github.com/owncloud/ocis/issues/4188)
|
||||
- [apiSpaces/copySpaces.feature:112](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L112)
|
||||
- [apiSpaces/copySpaces.feature:113](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L113)
|
||||
- [apiSpaces/copySpaces.feature:114](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L114)
|
||||
- [apiSpaces/copySpaces.feature:163](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L163)
|
||||
- [apiSpaces/copySpaces.feature:260](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L260)
|
||||
- [apiSpaces/copySpaces.feature:261](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/copySpaces.feature#L261)
|
||||
- [apiSpaces/moveSpaces.feature:161](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L161)
|
||||
- [apiSpaces/moveSpaces.feature:162](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L162)
|
||||
- [apiSpaces/moveSpaces.feature:181](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L181)
|
||||
- [apiSpaces/moveSpaces.feature:182](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L182)
|
||||
- [apiSpaces/moveSpaces.feature:183](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L183)
|
||||
- [apiSpaces/moveSpaces.feature:184](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L184)
|
||||
- [apiSpaces/moveSpaces.feature:185](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L185)
|
||||
- [apiSpaces/moveSpaces.feature:186](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L186)
|
||||
- [apiSpaces/moveSpaces.feature:189](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/moveSpaces.feature#L189)
|
||||
|
||||
### [Changing personal drive quota on another user as admin is not possible](https://github.com/owncloud/ocis/issues/4325)
|
||||
- [apiSpaces/changeSpaces.feature:221](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L221)
|
||||
- [apiSpaces/changeSpaces.feature:222](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L222)
|
||||
- [apiSpaces/changeSpaces.feature:223](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L223)
|
||||
- [apiSpaces/changeSpaces.feature:224](https://github.com/owncloud/ocis/blob/master/tests/acceptance/features/apiSpaces/changeSpaces.feature#L224)
|
||||
|
||||
|
||||
@@ -104,8 +104,8 @@ Feature: copy file
|
||||
And user "Alice" has accepted share "/testshare" offered by user "Brian"
|
||||
When user "Alice" copies file "project.txt" from space "Project" to "/testshare/project.txt" inside space "Shares Jail" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Shares Jail" should contain these entries:
|
||||
| /testshare/project.txt |
|
||||
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these files:
|
||||
| project.txt |
|
||||
And for user "Alice" the content of the file "/testshare/project.txt" of the space "Shares Jail" should be "Project content"
|
||||
Examples:
|
||||
| role |
|
||||
@@ -167,8 +167,8 @@ Feature: copy file
|
||||
And user "Alice" has uploaded file with content "personal content" to "personal.txt"
|
||||
When user "Alice" copies file "personal.txt" from space "Personal" to "/testshare/personal.txt" inside space "Shares Jail" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Shares Jail" should contain these entries:
|
||||
| /testshare/personal.txt |
|
||||
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these files:
|
||||
| personal.txt |
|
||||
And for user "Alice" the content of the file "/testshare/personal.txt" of the space "Shares Jail" should be "personal content"
|
||||
|
||||
|
||||
@@ -249,8 +249,8 @@ Feature: copy file
|
||||
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
|
||||
When user "Alice" copies file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Shares Jail" should contain these entries:
|
||||
| /testshare2/testshare1.txt |
|
||||
And for user "Alice" folder "testshare2" of the space "Shares Jail" should contain these files:
|
||||
| testshare1.txt |
|
||||
And for user "Brian" the space "Personal" should contain these entries:
|
||||
| /testshare2/testshare1.txt |
|
||||
And for user "Alice" the content of the file "/testshare2/testshare1.txt" of the space "Shares Jail" should be "testshare1 content"
|
||||
@@ -279,3 +279,175 @@ Feature: copy file
|
||||
| permissions |
|
||||
| 31 |
|
||||
| 17 |
|
||||
|
||||
|
||||
Scenario Outline: Copying a folder within the same space project with different role
|
||||
Given the administrator has given "Alice" the role "Space Admin" using the settings api
|
||||
And user "Alice" has created a space "Project" with the default quota using the GraphApi
|
||||
And user "Alice" has created a folder "folder1" in space "Project"
|
||||
And user "Alice" has created a folder "folder2" in space "Project"
|
||||
And user "Alice" has uploaded a file inside space "Project" with content "some content" to "folder2/demo.txt"
|
||||
And user "Alice" has shared a space "Project" to user "Brian" with role "<role>"
|
||||
When user "Brian" copies folder "folder2" to "folder1/folder2" inside space "Project" using the WebDAV API
|
||||
Then the HTTP status code should be "<status-code>"
|
||||
And for user "Brian" the space "Project" <shouldOrNot> contain these entries:
|
||||
| folder1/folder2/demo.txt |
|
||||
Examples:
|
||||
| role | shouldOrNot | status-code |
|
||||
| manager | should | 201 |
|
||||
| editor | should | 201 |
|
||||
| viewer | should not | 403 |
|
||||
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from a space project with different role to a space project with different role
|
||||
Given the administrator has given "Brian" the role "Space Admin" using the settings api
|
||||
And user "Brian" has created a space "Project1" with the default quota using the GraphApi
|
||||
And user "Brian" has created a space "Project2" with the default quota using the GraphApi
|
||||
And user "Brian" has created a folder "folder1" in space "Project1"
|
||||
And user "Brian" has uploaded a file inside space "Project1" with content "some content" to "/folder1/demo.txt"
|
||||
And user "Brian" has shared a space "Project2" to user "Alice" with role "<to_role>"
|
||||
And user "Brian" has shared a space "Project1" to user "Alice" with role "<from_role>"
|
||||
When user "Alice" copies folder "folder1" from space "Project1" to "folder1" inside space "Project2" using the WebDAV API
|
||||
Then the HTTP status code should be "<status-code>"
|
||||
And for user "Alice" the space "Project2" <shouldOrNot> contain these entries:
|
||||
| folder1/demo.txt |
|
||||
Examples:
|
||||
| from_role | to_role | status-code | shouldOrNot |
|
||||
| manager | manager | 201 | should |
|
||||
| manager | editor | 201 | should |
|
||||
| editor | manager | 201 | should |
|
||||
| editor | editor | 201 | should |
|
||||
| manager | viewer | 403 | should not |
|
||||
| editor | viewer | 403 | should not |
|
||||
| viewer | viewer | 403 | should not |
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from space project with different role to space personal
|
||||
Given the administrator has given "Brian" the role "Space Admin" using the settings api
|
||||
And user "Brian" has created a space "Project" with the default quota using the GraphApi
|
||||
And user "Brian" has created a folder "folder1" in space "Project"
|
||||
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "/folder1/demo.txt"
|
||||
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
|
||||
When user "Alice" copies file "folder1" from space "Project" to "folder1" inside space "Personal" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Personal" should contain these entries:
|
||||
| folder1/demo.txt |
|
||||
Examples:
|
||||
| role |
|
||||
| manager |
|
||||
| editor |
|
||||
| viewer |
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from space project with different role to space shares jail with different role
|
||||
Given the administrator has given "Brian" the role "Space Admin" using the settings api
|
||||
And user "Brian" has created a space "Project" with the default quota using the GraphApi
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created a folder "folder1" in space "Project"
|
||||
And user "Brian" has uploaded a file inside space "Project" with content "some content" to "/folder1/demo.txt"
|
||||
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
And user "Alice" has accepted share "/testshare" offered by user "Brian"
|
||||
When user "Alice" copies folder "folder1" from space "Project" to "/testshare/folder1" inside space "Shares Jail" using the WebDAV API
|
||||
Then the HTTP status code should be "<status-code>"
|
||||
And for user "Alice" folder "testshare" of the space "Shares Jail" <shouldOrNot> contain these files:
|
||||
| folder1/demo.txt |
|
||||
Examples:
|
||||
| role | shouldOrNot | permissions | status-code |
|
||||
| manager | should | 31 | 201 |
|
||||
| editor | should | 31 | 201 |
|
||||
| viewer | should | 31 | 201 |
|
||||
| manager | should not | 17 | 403 |
|
||||
| editor | should not | 17 | 403 |
|
||||
| viewer | should not | 17 | 403 |
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from space personal to space project with different role
|
||||
Given the administrator has given "Brian" the role "Space Admin" using the settings api
|
||||
And user "Brian" has created a space "Project" with the default quota using the GraphApi
|
||||
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
|
||||
And user "Alice" has created folder "folder1"
|
||||
And user "Alice" has uploaded file with content "some content" to "folder1/demo.txt"
|
||||
When user "Alice" copies folder "folder1" from space "Personal" to "folder1" inside space "Project" using the WebDAV API
|
||||
Then the HTTP status code should be "<status-code>"
|
||||
And for user "Alice" the space "Project" <shouldOrNot> contain these entries:
|
||||
| folder1/demo.txt |
|
||||
Examples:
|
||||
| role | shouldOrNot | status-code |
|
||||
| manager | should | 201 |
|
||||
| editor | should | 201 |
|
||||
| viewer | should not | 403 |
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from space personal to space shares jail with different permmissions
|
||||
Given user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
And user "Alice" has accepted share "/testshare" offered by user "Brian"
|
||||
And user "Alice" has created folder "folder1"
|
||||
And user "Alice" has uploaded file with content "some content" to "folder1/demo.txt"
|
||||
When user "Alice" copies folder "folder1" from space "Personal" to "/testshare/folder1" inside space "Shares Jail" using the WebDAV API
|
||||
Then the HTTP status code should be "<status-code>"
|
||||
And for user "Alice" folder "testshare" of the space "Shares Jail" <shouldOrNot> contain these files:
|
||||
| folder1/demo.txt |
|
||||
Examples:
|
||||
| permissions | shouldOrNot | status-code |
|
||||
| 31 | should | 201 |
|
||||
| 17 | should not | 403 |
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from space shares jail with different role to space personal
|
||||
Given the administrator has given "Brian" the role "Space Admin" using the settings api
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has uploaded file with content "testshare content" to "/testshare/testshare.txt"
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
And user "Alice" has accepted share "/testshare" offered by user "Brian"
|
||||
When user "Alice" copies file "/testshare/testshare.txt" from space "Shares Jail" to "testshare.txt" inside space "Personal" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Personal" should contain these entries:
|
||||
| /testshare.txt |
|
||||
And for user "Alice" the content of the file "/testshare.txt" of the space "Personal" should be "testshare content"
|
||||
Examples:
|
||||
| permissions |
|
||||
| 31 |
|
||||
| 17 |
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from space shares jail with different role to space project with different role
|
||||
Given the administrator has given "Brian" the role "Space Admin" using the settings api
|
||||
And user "Brian" has created a space "Project" with the default quota using the GraphApi
|
||||
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created folder "/testshare/folder1"
|
||||
And user "Brian" has uploaded file with content "testshare content" to "/testshare/folder1/testshare.txt"
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
And user "Alice" has accepted share "/testshare" offered by user "Brian"
|
||||
When user "Alice" copies folder "/testshare/folder1" from space "Shares Jail" to "folder1" inside space "Project" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Project" should contain these entries:
|
||||
| /folder1/testshare.txt |
|
||||
Examples:
|
||||
| role | permissions |
|
||||
| manager | 31 |
|
||||
| manager | 17 |
|
||||
| editor | 31 |
|
||||
| editor | 17 |
|
||||
|
||||
|
||||
Scenario Outline: User copies a folder from space shares jail with different role to space project with role viewer
|
||||
Given the administrator has given "Brian" the role "Space Admin" using the settings api
|
||||
And user "Brian" has created a space "Project" with the default quota using the GraphApi
|
||||
And user "Brian" has shared a space "Project" to user "Alice" with role "<role>"
|
||||
And user "Brian" has created folder "/testshare"
|
||||
And user "Brian" has created folder "/testshare/folder1"
|
||||
And user "Brian" has uploaded file with content "testshare content" to "/testshare/folder1/testshare.txt"
|
||||
And user "Brian" has shared folder "/testshare" with user "Alice" with permissions "<permissions>"
|
||||
And user "Alice" has accepted share "/testshare" offered by user "Brian"
|
||||
When user "Alice" copies folder "/testshare/folder1" from space "Shares Jail" to "folder1" inside space "Project" using the WebDAV API
|
||||
Then the HTTP status code should be "403"
|
||||
And for user "Alice" the space "Project" should not contain these entries:
|
||||
| /folder1/testshare.txt |
|
||||
Examples:
|
||||
| permissions |
|
||||
| 31 |
|
||||
| 17 |
|
||||
@@ -154,8 +154,8 @@ Feature: move (rename) file
|
||||
Then the HTTP status code should be "502"
|
||||
And for user "Alice" the space "Personal" should not contain these entries:
|
||||
| testshare.txt |
|
||||
And for user "Alice" the space "Shares Jail" should contain these entries:
|
||||
| /testshare/testshare.txt |
|
||||
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these entries:
|
||||
| testshare.txt |
|
||||
Examples:
|
||||
| permissions |
|
||||
| 31 |
|
||||
@@ -174,8 +174,8 @@ Feature: move (rename) file
|
||||
Then the HTTP status code should be "502"
|
||||
And for user "Alice" the space "Project" should not contain these entries:
|
||||
| /testshare.txt |
|
||||
And for user "Alice" the space "Shares Jail" should contain these entries:
|
||||
| /testshare/testshare.txt |
|
||||
And for user "Alice" folder "testshare" of the space "Shares Jail" should contain these entries:
|
||||
| testshare.txt |
|
||||
Examples:
|
||||
| role | permissions |
|
||||
| manager | 31 |
|
||||
@@ -196,8 +196,8 @@ Feature: move (rename) file
|
||||
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
|
||||
When user "Alice" moves file "/testshare1/testshare1.txt" from space "Shares Jail" to "/testshare2/testshare1.txt" inside space "Shares Jail" using the WebDAV API
|
||||
Then the HTTP status code should be "201"
|
||||
And for user "Alice" the space "Shares Jail" should contain these entries:
|
||||
| /testshare2/testshare1.txt |
|
||||
And for user "Alice" folder "testshare2" of the space "Shares Jail" should contain these entries:
|
||||
| testshare1.txt |
|
||||
And for user "Brian" the space "Personal" should contain these entries:
|
||||
| /testshare2/testshare1.txt |
|
||||
|
||||
|
||||
Reference in New Issue
Block a user