Skip to content

Commit

Permalink
shares jail expected to failure
Browse files Browse the repository at this point in the history
  • Loading branch information
sushmita56 committed Aug 5, 2022
1 parent b51d623 commit 9da23ab
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 53 deletions.
10 changes: 0 additions & 10 deletions tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,3 @@ 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/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)
74 changes: 37 additions & 37 deletions tests/acceptance/features/apiSpaces/copySpaces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -187,17 +187,17 @@ Feature: copy file
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 "Brian" has shared folder "/testshare" with user "Alice" with permissions "<share-permission>"
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 |
| share-permission |
| 31 |
| 17 |


Scenario Outline: User copies a file from space shares jail with different role to space project with different role
Expand All @@ -206,19 +206,19 @@ Feature: copy file
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 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 "Brian" has shared folder "/testshare" with user "Alice" with permissions "<share-permission>"
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 "Project" using the WebDAV API
Then the HTTP status code should be "201"
And for user "Alice" the space "Project" should contain these entries:
| /testshare.txt |
And for user "Alice" the content of the file "testshare.txt" of the space "Project" should be "testshare content"
Examples:
| role | permissions |
| manager | 31 |
| manager | 17 |
| editor | 31 |
| editor | 17 |
| role | share-permission |
| manager | 31 |
| manager | 17 |
| editor | 31 |
| editor | 17 |


Scenario Outline: User copies a file from space shares jail with different role to space project with role viewer
Expand All @@ -227,23 +227,23 @@ Feature: copy file
And user "Brian" has shared a space "Project" to user "Alice" with role "viewer"
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 "Brian" has shared folder "/testshare" with user "Alice" with permissions "<share-permission>"
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 "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:
| /testshare.txt |
Examples:
| permissions |
| 31 |
| 17 |
| share-permission |
| 31 |
| 17 |


Scenario Outline: User copies a file from space shares jail with different role to space shares jail with role editor
Given user "Brian" has created folder "/testshare1"
And user "Brian" has created folder "/testshare2"
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "<permissions>"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "<share-permission>"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "31"
And user "Alice" has accepted share "/testshare1" offered by user "Brian"
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
Expand All @@ -256,16 +256,16 @@ Feature: copy file
And for user "Alice" the content of the file "/testshare2/testshare1.txt" of the space "Shares Jail" should be "testshare1 content"
And for user "Brian" the content of the file "/testshare1/testshare1.txt" of the space "Personal" should be "testshare1 content"
Examples:
| permissions |
| 31 |
| 17 |
| share-permission |
| 31 |
| 17 |


Scenario Outline: User copies a file from space shares jail with different role to space shares jail with role editor
Given user "Brian" has created folder "/testshare1"
And user "Brian" has created folder "/testshare2"
And user "Brian" has uploaded file with content "testshare1 content" to "/testshare1/testshare1.txt"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "<permissions>"
And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "<share-permission>"
And user "Brian" has shared folder "/testshare2" with user "Alice" with permissions "17"
And user "Alice" has accepted share "/testshare1" offered by user "Brian"
And user "Alice" has accepted share "/testshare2" offered by user "Brian"
Expand All @@ -276,9 +276,9 @@ Feature: copy file
And for user "Brian" the space "Personal" should not contain these entries:
| /testshare2/testshare1.txt |
Examples:
| permissions |
| 31 |
| 17 |
| share-permission |
| 31 |
| 17 |


Scenario Outline: Copying a folder within the same space project with different role
Expand Down Expand Up @@ -380,7 +380,7 @@ Feature: copy file
| viewer | should not | 403 |


Scenario Outline: User copies a folder from space personal to space shares jail with permission editor
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 "<share-permission>"
And user "Alice" has accepted share "/testshare" offered by user "Brian"
Expand All @@ -400,17 +400,17 @@ Feature: copy file
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 "Brian" has shared folder "/testshare" with user "Alice" with permissions "<share-permission>"
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 |
| share-permission |
| 31 |
| 17 |


Scenario Outline: User copies a folder from space shares jail with different role to space project with different role
Expand All @@ -420,18 +420,18 @@ Feature: copy file
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 "Brian" has shared folder "/testshare" with user "Alice" with permissions "<share-permission>"
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 |
| role | share-permission |
| 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
Expand All @@ -441,13 +441,13 @@ Feature: copy file
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 "Brian" has shared folder "/testshare" with user "Alice" with permissions "<share-permission>"
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 |
| share-permission |
| 31 |
| 17 |
12 changes: 6 additions & 6 deletions tests/acceptance/features/apiSpaces/moveSpaces.feature
Original file line number Diff line number Diff line change
Expand Up @@ -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 |
Expand All @@ -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 |
Expand All @@ -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 |

Expand Down

0 comments on commit 9da23ab

Please sign in to comment.