Add assorted integration tests for shares
Signed-off-by: Daniel Calviño Sánchez <danxuliu@gmail.com>
This commit is contained in:
parent
a7526d74ae
commit
6d4f4c1c70
|
@ -409,6 +409,27 @@ Feature: sharing
|
|||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
|
||||
Scenario: delete a share with a user that didn't receive the share
|
||||
Given user "user0" exists
|
||||
And user "user1" exists
|
||||
And user "user2" exists
|
||||
And file "textfile0.txt" of user "user0" is shared with user "user1"
|
||||
And As an "user2"
|
||||
When Deleting last share
|
||||
Then the OCS status code should be "404"
|
||||
And the HTTP status code should be "200"
|
||||
|
||||
Scenario: delete a share with a user with resharing rights that didn't receive the share
|
||||
Given user "user0" exists
|
||||
And user "user1" exists
|
||||
And user "user2" exists
|
||||
And file "textfile0.txt" of user "user0" is shared with user "user1"
|
||||
And file "textfile0.txt" of user "user0" is shared with user "user2"
|
||||
And As an "user1"
|
||||
When Deleting last share
|
||||
Then the OCS status code should be "404"
|
||||
And the HTTP status code should be "200"
|
||||
|
||||
Scenario: Keep usergroup shares (#22143)
|
||||
Given As an "admin"
|
||||
And user "user0" exists
|
||||
|
|
|
@ -127,6 +127,30 @@ Feature: sharing
|
|||
Then the OCS status code should be "997"
|
||||
And the HTTP status code should be "401"
|
||||
|
||||
Scenario: Deleting a group share as its owner
|
||||
Given As an "admin"
|
||||
And user "user0" exists
|
||||
And user "user1" exists
|
||||
And group "group1" exists
|
||||
And user "user0" belongs to group "group1"
|
||||
And user "user1" belongs to group "group1"
|
||||
And As an "user0"
|
||||
And creating a share with
|
||||
| path | welcome.txt |
|
||||
| shareType | 1 |
|
||||
| shareWith | group1 |
|
||||
When As an "user0"
|
||||
And Deleting last share
|
||||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
And Getting info of last share
|
||||
And the OCS status code should be "404"
|
||||
And the HTTP status code should be "200"
|
||||
And As an "user1"
|
||||
And Getting info of last share
|
||||
And the OCS status code should be "404"
|
||||
And the HTTP status code should be "200"
|
||||
|
||||
Scenario: Deleting a group share as user
|
||||
Given As an "admin"
|
||||
And user "user0" exists
|
||||
|
@ -337,6 +361,46 @@ Feature: sharing
|
|||
Then etag of element "/" of user "user1" has changed
|
||||
And etag of element "/PARENT" of user "user0" has not changed
|
||||
|
||||
Scenario: do not allow to increase permissions on received share
|
||||
Given As an "admin"
|
||||
And user "user0" exists
|
||||
And user "user1" exists
|
||||
And user "user0" created a folder "/TMP"
|
||||
And As an "user0"
|
||||
And creating a share with
|
||||
| path | TMP |
|
||||
| shareType | 0 |
|
||||
| shareWith | user1 |
|
||||
| permissions | 17 |
|
||||
When As an "user1"
|
||||
And Updating last share with
|
||||
| permissions | 19 |
|
||||
Then the OCS status code should be "403"
|
||||
And the HTTP status code should be "401"
|
||||
|
||||
Scenario: do not allow to increase permissions on non received share with user with resharing rights
|
||||
Given As an "admin"
|
||||
And user "user0" exists
|
||||
And user "user1" exists
|
||||
And user "user2" exists
|
||||
And user "user0" created a folder "/TMP"
|
||||
And As an "user0"
|
||||
And creating a share with
|
||||
| path | TMP |
|
||||
| shareType | 0 |
|
||||
| shareWith | user1 |
|
||||
| permissions | 31 |
|
||||
And creating a share with
|
||||
| path | TMP |
|
||||
| shareType | 0 |
|
||||
| shareWith | user2 |
|
||||
| permissions | 17 |
|
||||
When As an "user1"
|
||||
And Updating last share with
|
||||
| permissions | 19 |
|
||||
Then the OCS status code should be "404"
|
||||
And the HTTP status code should be "200"
|
||||
|
||||
Scenario: do not allow to increase link share permissions on reshare
|
||||
Given As an "admin"
|
||||
And user "user0" exists
|
||||
|
|
|
@ -305,4 +305,19 @@ Feature: sharing
|
|||
And User "user2" should be included in the response
|
||||
And User "user3" should not be included in the response
|
||||
|
||||
Scenario: getting all shares of a file with a user with resharing rights
|
||||
Given user "user0" exists
|
||||
And user "user1" exists
|
||||
And user "user2" exists
|
||||
And user "user3" exists
|
||||
And file "textfile0.txt" of user "user0" is shared with user "user1"
|
||||
And file "textfile0.txt" of user "user0" is shared with user "user2"
|
||||
And As an "user1"
|
||||
When sending "GET" to "/apps/files_sharing/api/v1/shares?path=textfile0 (2).txt&reshares=true"
|
||||
Then the OCS status code should be "100"
|
||||
And the HTTP status code should be "200"
|
||||
And User "user1" should be included in the response
|
||||
And User "user2" should be included in the response
|
||||
And User "user3" should not be included in the response
|
||||
|
||||
# See sharing-v1-part2.feature
|
||||
|
|
Loading…
Reference in New Issue