-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
32723ab
commit 80794c0
Showing
2 changed files
with
130 additions
and
0 deletions.
There are no files selected for viewing
71 changes: 71 additions & 0 deletions
71
tests/acceptance/features/apiShareManagement/acceptSharesToSharesFolder.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
@api @files_sharing-app-required | ||
Feature: accept/decline shares coming from internal users to the Shares folder | ||
As a user | ||
I want to have control of which received shares I accept | ||
So that I can keep my file system clean | ||
|
||
Background: | ||
Given using OCS API version "1" | ||
And using new DAV path | ||
And these users have been created with default attributes and skeleton files: | ||
| username | | ||
| Alice | | ||
| Brian | | ||
|
||
Scenario: When accepting a share of a file, the received file is accessible | ||
Given the administrator has set the default folder for received shares to "Shares" | ||
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no" | ||
And user "Alice" has shared file "/textfile0.txt" with user "Brian" | ||
When user "Brian" accepts the share "/textfile0.txt" offered by user "Alice" using the sharing API | ||
Then the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud test text file 0" plus end-of-line | ||
|
||
Scenario: When accepting a share of a folder, the received folder is accessible | ||
Given the administrator has set the default folder for received shares to "Shares" | ||
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no" | ||
And user "Alice" has shared file "/PARENT" with user "Brian" | ||
When user "Brian" accepts the share "/PARENT" offered by user "Alice" using the sharing API | ||
Then the content of file "/Shares/PARENT/parent.txt" for user "Brian" should be "ownCloud test text file parent" plus end-of-line | ||
|
||
@skipOnOcV10 @issue-37883 | ||
Scenario: When accepting a share of a file, the response is valid | ||
Given the administrator has set the default folder for received shares to "Shares" | ||
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no" | ||
And user "Alice" has shared file "/textfile0.txt" with user "Brian" | ||
When user "Brian" accepts the share "/textfile0.txt" offered by user "Alice" using the sharing API | ||
Then the OCS status code should be "100" | ||
And the HTTP status code should be "200" | ||
And the fields of the last response to user "Alice" sharing with user "Brian" should include | ||
| share_with | %username% | | ||
| share_with_displayname | %displayname% | | ||
| file_target | /Shares/textfile0.txt | | ||
| path | /Shares/textfile0.txt | | ||
| permissions | share,read,update | | ||
| uid_owner | %username% | | ||
| displayname_owner | %displayname% | | ||
| item_type | file | | ||
| mimetype | text/plain | | ||
| storage_id | ANY_VALUE | | ||
| share_type | user | | ||
And the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud test text file 0" plus end-of-line | ||
|
||
@skipOnOcV10 @issue-37883 | ||
Scenario: When accepting a share of a folder, the response is valid | ||
Given the administrator has set the default folder for received shares to "Shares" | ||
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no" | ||
And user "Alice" has shared file "/PARENT" with user "Brian" | ||
When user "Brian" accepts the share "/PARENT" offered by user "Alice" using the sharing API | ||
Then the OCS status code should be "100" | ||
And the HTTP status code should be "200" | ||
And the fields of the last response to user "Alice" sharing with user "Brian" should include | ||
| share_with | %username% | | ||
| share_with_displayname | %displayname% | | ||
| file_target | /Shares/PARENT | | ||
| path | /Shares/PARENT | | ||
| permissions | all | | ||
| uid_owner | %username% | | ||
| displayname_owner | %displayname% | | ||
| item_type | folder | | ||
| mimetype | httpd/unix-directory | | ||
| storage_id | ANY_VALUE | | ||
| share_type | user | | ||
And the content of file "/Shares/PARENT/parent.txt" for user "Brian" should be "ownCloud test text file parent" plus end-of-line |
59 changes: 59 additions & 0 deletions
59
...s/acceptance/features/apiShareManagement/acceptSharesToSharesFolderOc10Issue37883.feature
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
@api @files_sharing-app-required | ||
Feature: accept/decline shares coming from internal users to the Shares folder | ||
As a user | ||
I want to have control of which received shares I accept | ||
So that I can keep my file system clean | ||
|
||
Background: | ||
Given using OCS API version "1" | ||
And using new DAV path | ||
And these users have been created with default attributes and skeleton files: | ||
| username | | ||
| Alice | | ||
| Brian | | ||
|
||
@notToImplementOnOCIS @issue-37883 | ||
Scenario: When accepting a share of a file, the response has valid fields | ||
# When fixing this issue on oC10, delete this scenario and enable the scenario in acceptSharesToSharesFolder | ||
Given the administrator has set the default folder for received shares to "Shares" | ||
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no" | ||
And user "Alice" has shared file "/textfile0.txt" with user "Brian" | ||
When user "Brian" accepts the share "/textfile0.txt" offered by user "Alice" using the sharing API | ||
Then the OCS status code should be "100" | ||
And the HTTP status code should be "200" | ||
And the fields of the last response to user "Alice" sharing with user "Brian" should include | ||
| share_with | %username% | | ||
| share_with_displayname | %displayname% | | ||
| file_target | /Shares/Shares/textfile0.txt | | ||
| path | /Shares/textfile0.txt | | ||
| permissions | share,read,update | | ||
| uid_owner | %username% | | ||
| displayname_owner | %displayname% | | ||
| item_type | file | | ||
| mimetype | text/plain | | ||
| storage_id | ANY_VALUE | | ||
| share_type | user | | ||
And the content of file "/Shares/textfile0.txt" for user "Brian" should be "ownCloud test text file 0" plus end-of-line | ||
|
||
@notToImplementOnOCIS @issue-37883 | ||
Scenario: When accepting a share of a folder, the response has valid fields | ||
# When fixing this issue on oC10, delete this scenario and enable the scenario above. | ||
Given the administrator has set the default folder for received shares to "Shares" | ||
And parameter "shareapi_auto_accept_share" of app "core" has been set to "no" | ||
And user "Alice" has shared file "/PARENT" with user "Brian" | ||
When user "Brian" accepts the share "/PARENT" offered by user "Alice" using the sharing API | ||
Then the OCS status code should be "100" | ||
And the HTTP status code should be "200" | ||
And the fields of the last response to user "Alice" sharing with user "Brian" should include | ||
| share_with | %username% | | ||
| share_with_displayname | %displayname% | | ||
| file_target | /Shares/Shares/PARENT | | ||
| path | /Shares/PARENT | | ||
| permissions | all | | ||
| uid_owner | %username% | | ||
| displayname_owner | %displayname% | | ||
| item_type | folder | | ||
| mimetype | httpd/unix-directory | | ||
| storage_id | ANY_VALUE | | ||
| share_type | user | | ||
And the content of file "/Shares/PARENT/parent.txt" for user "Brian" should be "ownCloud test text file parent" plus end-of-line |