From 9da23abb9699d437766e788eb99eec253e043f16 Mon Sep 17 00:00:00 2001 From: sushmita56 Date: Fri, 5 Aug 2022 10:10:13 +0545 Subject: [PATCH] shares jail expected to failure --- ...ected-failures-localAPI-on-OCIS-storage.md | 10 --- .../features/apiSpaces/copySpaces.feature | 74 +++++++++---------- .../features/apiSpaces/moveSpaces.feature | 12 +-- 3 files changed, 43 insertions(+), 53 deletions(-) diff --git a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md index 76d05acc0fb..6d4ba2440ff 100644 --- a/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md +++ b/tests/acceptance/expected-failures-localAPI-on-OCIS-storage.md @@ -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) diff --git a/tests/acceptance/features/apiSpaces/copySpaces.feature b/tests/acceptance/features/apiSpaces/copySpaces.feature index c54989e0f61..a85a4a1f046 100644 --- a/tests/acceptance/features/apiSpaces/copySpaces.feature +++ b/tests/acceptance/features/apiSpaces/copySpaces.feature @@ -187,7 +187,7 @@ 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 "" + And user "Brian" has shared folder "/testshare" with user "Alice" with 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" @@ -195,9 +195,9 @@ Feature: copy file | /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 @@ -206,7 +206,7 @@ Feature: copy file And user "Brian" has shared a space "Project" to user "Alice" with 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 "" + And user "Brian" has shared folder "/testshare" with user "Alice" with 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 "Project" using the WebDAV API Then the HTTP status code should be "201" @@ -214,11 +214,11 @@ Feature: copy file | /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 @@ -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 "" + And user "Brian" has shared folder "/testshare" with user "Alice" with 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 "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 "" + And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "" 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" @@ -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 "" + And user "Brian" has shared folder "/testshare1" with user "Alice" with permissions "" 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" @@ -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 @@ -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 "" And user "Alice" has accepted share "/testshare" offered by user "Brian" @@ -400,7 +400,7 @@ 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 "" + And user "Brian" has shared folder "/testshare" with user "Alice" with 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" @@ -408,9 +408,9 @@ Feature: copy file | /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 @@ -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 "" + And user "Brian" has shared folder "/testshare" with user "Alice" with 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 | + | 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 @@ -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 "" + And user "Brian" has shared folder "/testshare" with user "Alice" with 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 | \ No newline at end of file + | share-permission | + | 31 | + | 17 | \ No newline at end of file diff --git a/tests/acceptance/features/apiSpaces/moveSpaces.feature b/tests/acceptance/features/apiSpaces/moveSpaces.feature index 70ceeadcf60..355dbe24353 100644 --- a/tests/acceptance/features/apiSpaces/moveSpaces.feature +++ b/tests/acceptance/features/apiSpaces/moveSpaces.feature @@ -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 |