test: ensure share is available

This commit is contained in:
Saw-jan
2024-07-24 11:35:45 +05:45
parent 4a6b0f04f6
commit 3883e17b52
35 changed files with 251 additions and 7 deletions
@@ -22,6 +22,7 @@ Feature: sharing works when a username and group name are the same
| sharee | Brian |
| shareType | group |
| permissionsRole | File Editor |
And user "Carol" has a share "randomfile.txt" synced
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "100"
@@ -47,6 +48,7 @@ Feature: sharing works when a username and group name are the same
| sharee | Brian |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "randomfile.txt" synced
When user "Alice" shares file "randomfile.txt" with group "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "100"
@@ -72,6 +74,7 @@ Feature: sharing works when a username and group name are the same
| sharee | brian |
| shareType | group |
| permissionsRole | File Editor |
And user "Carol" has a share "randomfile.txt" synced
When user "Alice" shares file "randomfile.txt" with user "Brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "100"
@@ -95,8 +98,9 @@ Feature: sharing works when a username and group name are the same
| resource | randomfile.txt |
| space | Personal |
| sharee | Brian |
| shareType | user |
| shareType | user |
| permissionsRole | File Editor |
And user "Brian" has a share "randomfile.txt" synced
When user "Alice" shares file "randomfile.txt" with group "brian" using the sharing API
Then the HTTP status code should be "200"
And the OCS status code should be "100"
@@ -178,6 +178,7 @@ Feature: share resources where the sharee receives the share in multiple ways
Scenario Outline: share with a group and then add a user to that group that already has a file with the shared name
Given using OCS API version "<ocs-api-version>"
And user "Carol" has been created with default attributes and without skeleton files
And user "Carol" has disabled auto-accepting
And these groups have been created:
| groupname |
| grp1 |
@@ -190,6 +191,7 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp1 |
| shareType | group |
| permissionsRole | File Editor |
And user "Brian" has a share "lorem.txt" synced
When the administrator adds user "Carol" to group "grp1" using the provisioning API
Then the HTTP status code should be "204"
And user "Carol" should be able to accept pending share "/lorem.txt" offered by user "Alice"
@@ -218,12 +220,15 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "parent" synced
And user "Carol" has sent the following resource share invitation:
| resource | parent/child1 |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" has a share "child1" synced
And user "Brian" has a share "child1" synced
And user "Brian" should be able to create folder "/Shares/parent/fo1"
And user "Brian" should be able to create folder "/Shares/parent/child1/fo2"
And user "Alice" should not be able to create folder "/Shares/child1/fo3"
@@ -246,13 +251,16 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "parent" synced
And user "Carol" has sent the following resource share invitation:
| resource | parent/child1 |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" should be able to rename file "/Shares/parent/child1/child2/textfile-2.txt" to "/Shares/parent/child1/child2/rename.txt"
And user "Alice" has a share "child1" synced
And user "Brian" has a share "child1" synced
Then user "Brian" should be able to rename file "/Shares/parent/child1/child2/textfile-2.txt" to "/Shares/parent/child1/child2/rename.txt"
And user "Brian" should be able to rename file "/Shares/child1/child2/rename.txt" to "/Shares/child1/child2/rename2.txt"
And user "Alice" should not be able to rename file "/Shares/child1/child2/rename2.txt" to "/Shares/child1/child2/rename3.txt"
@@ -275,12 +283,15 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "parent" synced
And user "Carol" has sent the following resource share invitation:
| resource | parent/child1 |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" has a share "child1" synced
And user "Brian" has a share "child1" synced
And user "Brian" should be able to delete file "/Shares/parent/child1/child2/child3/textfile-2.txt"
And user "Brian" should be able to delete folder "/Shares/child1/child2/child3"
And user "Alice" should not be able to delete folder "/Shares/child1/child2"
@@ -302,12 +313,15 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" has a share "parent" synced
And user "Brian" has a share "parent" synced
And user "Carol" has sent the following resource share invitation:
| resource | parent/child1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "child1" synced
Then user "Brian" should be able to create folder "/Shares/child1/fo1"
And user "Brian" should be able to create folder "/Shares/child1/child2/fo2"
But user "Brian" should not be able to create folder "/Shares/parent/fo3"
@@ -332,12 +346,15 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has a share "parent" synced
And user "Alice" has a share "parent" synced
And user "Carol" has sent the following resource share invitation:
| resource | parent/child1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "child1" synced
And user "Brian" should be able to rename file "/Shares/child1/child2/textfile-2.txt" to "/Shares/child1/child2/rename.txt"
And user "Brian" should be able to rename file "/Shares/parent/child1/child2/rename.txt" to "/Shares/parent/child1/child2/rename2.txt"
And user "Alice" should not be able to rename file "/Shares/parent/child1/child2/rename2.txt" to "/Shares/parent/child1/child2/rename3.txt"
@@ -360,12 +377,15 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp1 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" has a share "parent" synced
And user "Brian" has a share "child1" synced
And user "Carol" has sent the following resource share invitation:
| resource | parent/child1 |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "child1" synced
And user "Brian" should be able to delete file "/Shares/child1/child2/textfile-2.txt"
And user "Brian" should be able to delete folder "/Shares/parent/child1/child2"
And user "Alice" should not be able to delete folder "/Shares/parent/child1"
@@ -392,13 +412,15 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Alice" has a share "parent" synced
And user "Carol" has sent the following resource share invitation:
| resource | parent/child1 |
| space | Personal |
| sharee | grp2 |
| shareType | group |
| permissionsRole | Viewer |
And user "Alice" should be able to create folder "/Shares/parent/child1/fo1"
And user "Brian" has a share "child1" synced
Then user "Alice" should be able to create folder "/Shares/parent/child1/fo1"
And user "Alice" should be able to create folder "/Shares/parent/child1/child2/fo2"
And user "Alice" should be able to delete folder "/Shares/parent/child1/fo1"
And user "Alice" should be able to delete folder "/Shares/parent/child1/child2/fo2"
@@ -424,6 +446,7 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has a share "parent" synced
And user "Brian" should be able to rename folder "/Shares/parent" to "/Shares/sharedParent"
And user "Alice" should be able to share folder "parent" with user "Brian" with permissions "read" using the sharing API
# Note: Brian has already accepted the share of this resource as a member of "grp".
@@ -449,6 +472,7 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp |
| shareType | group |
| permissionsRole | Viewer |
And user "Brian" has a share "parent" synced
And user "Brian" has moved folder "/Shares/parent" to "/Shares/sharedParent"
When user "Alice" shares folder "parent" with user "Brian" with permissions "all" using the sharing API
# Note: Brian has already accepted the share of this resource as a member of "grp".
@@ -477,6 +501,7 @@ Feature: share resources where the sharee receives the share in multiple ways
| sharee | grp |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "parent" synced
And user "Brian" should be able to rename folder "/Shares/parent" to "/Shares/sharedParent"
And user "Alice" should be able to share folder "parent" with user "Brian" with permissions "read" using the sharing API
# Note: Brian has already accepted the share of this resource as a member of "grp".