-
Notifications
You must be signed in to change notification settings - Fork 184
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tests-only] restore the removed scenarios for the core repository
Signed-off-by: Kiran Parajuli <kiranparajuli589@gmail.com>
- Loading branch information
1 parent
cb2822b
commit 9f6267e
Showing
4 changed files
with
174 additions
and
4 deletions.
There are no files selected for viewing
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
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
97 changes: 97 additions & 0 deletions
97
tests/acceptance/features/apiSpaces/changingFilesShare.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,97 @@ | ||
@api @skipOnOcV10 | ||
Feature: | ||
|
||
Background: | ||
Given these users have been created with default attributes and without skeleton files: | ||
| username | | ||
| Alice | | ||
| Brian | | ||
And using spaces DAV path | ||
|
||
@issue-764 | ||
Scenario: Moving a file into a share as recipient | ||
Given user "Alice" has created folder "/shared" | ||
And user "Alice" has shared folder "/shared" with user "Brian" | ||
And user "Brian" has accepted share "/shared" offered by user "Alice" | ||
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt" | ||
When user "Brian" moves file "textfile0.txt" from space "Personal" to "shared/shared_file.txt" inside space "Shares Jail" using the WebDAV API | ||
Then the HTTP status code should be "201" | ||
And for user "Brian" folder "shared" of the space "Shares Jail" should contain these entries: | ||
| shared_file.txt | | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| shared_file.txt | | ||
|
||
|
||
Scenario: Moving files between shares by same user | ||
And user "Alice" has created folder "share1" | ||
And user "Alice" has created folder "share2" | ||
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt" | ||
And user "Alice" has moved file "textfile0.txt" to "share1/textfile0.txt" | ||
And user "Alice" has shared folder "/share1" with user "Brian" | ||
And user "Alice" has shared folder "/share2" with user "Brian" | ||
And user "Brian" has accepted share "/share1" offered by user "Alice" | ||
And user "Brian" has accepted share "/share2" offered by user "Alice" | ||
When user "Brian" moves file "share1/textfile0.txt" to "share2/textfile0.txt" in space "Shares Jail" using the WebDAV API | ||
Then the HTTP status code should be "201" | ||
And for user "Brian" folder "share1" of the space "Shares Jail" should not contain these entries: | ||
| textfile0.txt | | ||
And for user "Brian" folder "share2" of the space "Shares Jail" should contain these entries: | ||
| textfile0.txt | | ||
And for user "Alice" the space "Personal" should not contain these entries: | ||
| share1/textfile0.txt | | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| share2/textfile0.txt | | ||
|
||
@issue-764 | ||
Scenario: Moving files added by sharee between shares by same user | ||
And user "Alice" has created folder "share1" | ||
And user "Alice" has created folder "share2" | ||
And user "Brian" has uploaded file with content "some data" to "/textfile0.txt" | ||
And user "Alice" has shared folder "/share1" with user "Brian" | ||
And user "Alice" has shared folder "/share2" with user "Brian" | ||
And user "Brian" has accepted share "/share1" offered by user "Alice" | ||
And user "Brian" has accepted share "/share2" offered by user "Alice" | ||
When user "Brian" moves file "textfile0.txt" from space "Personal" to "share1/shared_file.txt" inside space "Shares Jail" using the WebDAV API | ||
And user "Brian" moves file "share1/shared_file.txt" to "share2/shared_file.txt" in space "Shares Jail" using the WebDAV API | ||
Then the HTTP status code of responses on all endpoints should be "201" | ||
And for user "Brian" folder "share1" of the space "Shares Jail" should not contain these entries: | ||
| shared_file.txt | | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| share1/shared_file.txt | | ||
And for user "Brian" folder "share2" of the space "Shares Jail" should contain these entries: | ||
| shared_file.txt | | ||
And for user "Alice" the space "Personal" should contain these entries: | ||
| share2/shared_file.txt | | ||
|
||
@issue-4421 | ||
Scenario: Move files between shares by different users | ||
Given user "Carol" has been created with default attributes and without skeleton files | ||
And user "Alice" has uploaded file with content "some data" to "/textfile0.txt" | ||
And user "Alice" has created folder "/PARENT" | ||
And user "Brian" has created folder "/PARENT" | ||
And user "Alice" has moved file "textfile0.txt" to "PARENT/shared_file.txt" in space "Personal" | ||
And user "Alice" has shared folder "/PARENT" with user "Carol" | ||
And user "Brian" has shared folder "/PARENT" with user "Carol" | ||
And user "Carol" has accepted share "/PARENT" offered by user "Alice" | ||
And user "Carol" has accepted share "/PARENT" offered by user "Brian" | ||
When user "Carol" moves file "PARENT/shared_file.txt" to "PARENT (1)/shared_file.txt" in space "Shares Jail" using the WebDAV API | ||
Then the HTTP status code should be "201" | ||
And as "Carol" file "/Shares/PARENT (1)/shared_file.txt" should exist | ||
And for user "Brian" folder "PARENT (1)" of the space "Shares Jail" should contain these entries: | ||
| shared_file.txt | | ||
And for user "Brian" the space "Personal" should contain these entries: | ||
| PARENT/shared_file.txt | | ||
And for user "Alice" the space "Personal" should not contain these entries: | ||
| PARENT/shared_file.txt | | ||
|
||
|
||
Scenario: overwrite a received file share | ||
Given user "Alice" has uploaded file with content "this is the old content" to "/textfile1.txt" | ||
And user "Alice" has shared file "/textfile1.txt" with user "Brian" | ||
And user "Brian" has accepted share "/textfile1.txt" offered by user "Alice" | ||
When user "Brian" uploads a file inside space "Shares Jail" with content "this is a new content" to "textfile1.txt" using the WebDAV API | ||
Then the HTTP status code should be "204" | ||
And for user "Brian" the space "Shares Jail" should contain these entries: | ||
| textfile1.txt | | ||
And the content of file "textfile1.txt" inside space "Shares Jail" for user "Brian" should be "this is a new content" | ||
And the content of file "textfile1.txt" inside space "Personal" for user "Alice" should be "this is a new content" |
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