Initial QSfera import

This commit is contained in:
Курнат Андрей
2026-06-07 10:20:04 +03:00
commit 2315f25754
16485 changed files with 4826827 additions and 0 deletions
@@ -0,0 +1,283 @@
@issue-1324
Feature: files and folders can be deleted from the trashbin
As a user
I want to delete files and folders from the trashbin
So that I can control my trashbin space and which files are kept in that space
Background:
Given user "Alice" has been created with default attributes
And user "Alice" has uploaded file with content "to delete" to "/textfile0.txt"
And user "Alice" has uploaded file with content "to delete" to "/textfile1.txt"
And user "Alice" has created folder "PARENT"
And user "Alice" has created folder "PARENT/CHILD"
And user "Alice" has uploaded file with content "to delete" to "/PARENT/parent.txt"
And user "Alice" has uploaded file with content "to delete" to "/PARENT/CHILD/child.txt"
@smokeTest
Scenario Outline: trashbin can be emptied
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "file with comma" to "sample,0.txt"
And user "Alice" has uploaded file with content "file with comma" to "sample,1.txt"
And user "Alice" has deleted file "<file-name>"
And user "Alice" has deleted file "<file-name-2>"
When user "Alice" empties the trashbin using the trashbin API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "<file-name>" should not exist in the trashbin
And as "Alice" the file with original path "<file-name-2>" should not exist in the trashbin
Examples:
| dav-path-version | file-name | file-name-2 |
| new | textfile0.txt | textfile1.txt |
| new | sample,0.txt | sample,1.txt |
| spaces | textfile0.txt | textfile1.txt |
| spaces | sample,0.txt | sample,1.txt |
@smokeTest
Scenario Outline: delete a single file from the trashbin
Given using <dav-path-version> DAV path
And user "Alice" has deleted file "/textfile0.txt"
And user "Alice" has deleted file "/textfile1.txt"
And user "Alice" has deleted file "/PARENT/parent.txt"
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
When user "Alice" deletes the file with original path "textfile1.txt" from the trashbin using the trashbin API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/textfile1.txt" should not exist in the trashbin
But as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
@smokeTest
Scenario Outline: delete multiple files from the trashbin and make sure the correct ones are gone
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/textfile0.txt"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/PARENT/child.txt"
And user "Alice" has deleted file "/textfile0.txt"
And user "Alice" has deleted file "/textfile1.txt"
And user "Alice" has deleted file "/PARENT/parent.txt"
And user "Alice" has deleted file "/PARENT/child.txt"
And user "Alice" has deleted file "/PARENT/textfile0.txt"
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
When user "Alice" deletes the file with original path "/PARENT/textfile0.txt" from the trashbin using the trashbin API
And user "Alice" deletes the file with original path "/PARENT/CHILD/child.txt" from the trashbin using the trashbin API
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the file with original path "/PARENT/textfile0.txt" should not exist in the trashbin
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should not exist in the trashbin
But as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/child.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
@issue-3544 @issue-9791
Scenario Outline: user tries to delete another user's trashbin
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has deleted file "/textfile0.txt"
And user "Alice" has deleted file "/textfile1.txt"
And user "Alice" has deleted file "/PARENT/parent.txt"
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
When user "Brian" tries to delete the file with original path "textfile1.txt" from the trashbin of user "Alice" using the trashbin API
Then the HTTP status code should be "404"
And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: user tries to delete trashbin file using invalid password
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has deleted file "/textfile0.txt"
And user "Alice" has deleted file "/textfile1.txt"
And user "Alice" has deleted file "/PARENT/parent.txt"
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
When user "Brian" tries to delete the file with original path "textfile1.txt" from the trashbin of user "Alice" using the password "invalid" and the trashbin API
Then the HTTP status code should be "401"
And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: user tries to delete trashbin file using no password
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has deleted file "/textfile0.txt"
And user "Alice" has deleted file "/textfile1.txt"
And user "Alice" has deleted file "/PARENT/parent.txt"
And user "Alice" has deleted file "/PARENT/CHILD/child.txt"
When user "Brian" tries to delete the file with original path "textfile1.txt" from the trashbin of user "Alice" using the password "" and the trashbin API
Then the HTTP status code should be "401"
And as "Alice" the file with original path "/textfile1.txt" should exist in the trashbin
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: delete a folder that contains a file from the trashbin
Given using <dav-path-version> DAV path
And user "Alice" has created folder "FOLDER"
And user "Alice" has created folder "FOLDER/CHILD"
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/parent.txt"
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/CHILD/child.txt"
And user "Alice" has deleted folder "/PARENT"
And user "Alice" has deleted folder "/FOLDER"
When user "Alice" deletes the folder with original path "/PARENT" from the trashbin using the trashbin API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/PARENT/parent.txt" should not exist in the trashbin
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should not exist in the trashbin
And as "Alice" the folder with original path "/PARENT/CHILD/" should not exist in the trashbin
But as "Alice" the file with original path "/FOLDER/parent.txt" should exist in the trashbin
And as "Alice" the file with original path "/FOLDER/CHILD/child.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: delete a subfolder from a deleted folder from the trashbin
Given using <dav-path-version> DAV path
And user "Alice" has created folder "FOLDER"
And user "Alice" has created folder "FOLDER/CHILD"
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/parent.txt"
And user "Alice" has uploaded file with content "to delete" to "/FOLDER/CHILD/child.txt"
And user "Alice" has deleted folder "/PARENT"
And user "Alice" has deleted folder "/FOLDER"
When user "Alice" deletes the folder with original path "/PARENT/CHILD" from the trashbin using the trashbin API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/PARENT/CHILD/child.txt" should not exist in the trashbin
And as "Alice" the folder with original path "/PARENT/CHILD/" should not exist in the trashbin
But as "Alice" the file with original path "/PARENT/parent.txt" should exist in the trashbin
And as "Alice" the file with original path "/FOLDER/parent.txt" should exist in the trashbin
And as "Alice" the file with original path "/FOLDER/CHILD/child.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: delete files with special characters from the trashbin
Given using <dav-path-version> DAV path
And user "Alice" has uploaded the following files with content "special character file"
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
And user "Alice" has deleted the following files
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
When user "Alice" deletes the following files with original path from the trashbin
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the files with following original paths should not exist in the trashbin
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: delete folders with special characters from the trashbin
Given using <dav-path-version> DAV path
And user "Alice" has created the following folders
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
And user "Alice" has deleted the following folders
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
When user "Alice" deletes the following files with original path from the trashbin
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the folders with following original paths should not exist in the trashbin
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: delete folders with dot in the name from the trashbin
Given using <dav-path-version> DAV path
And user "Alice" has created the following folders
| path |
| /fo. |
| /fo.1 |
| /fo...1.. |
| /... |
| /..fo |
| /fo.xyz |
| /fo.exe |
And user "Alice" has deleted the following folders
| path |
| /fo. |
| /fo.1 |
| /fo...1.. |
| /... |
| /..fo |
| /fo.xyz |
| /fo.exe |
When user "Alice" deletes the following files with original path from the trashbin
| path |
| /fo. |
| /fo.1 |
| /fo...1.. |
| /... |
| /..fo |
| /fo.xyz |
| /fo.exe |
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the folders with following original paths should not exist in the trashbin
| path |
| /fo. |
| /fo.1 |
| /fo...1.. |
| /... |
| /..fo |
| /fo.xyz |
| /fo.exe |
Examples:
| dav-path-version |
| new |
| spaces |
@@ -0,0 +1,430 @@
@issue-1324
Feature: files and folders exist in the trashbin after being deleted
As a user
I want deleted files and folders to be available in the trashbin
So that I can recover data easily
Background:
Given user "Alice" has been created with default attributes
And user "Alice" has uploaded file with content "to delete" to "/textfile0.txt"
@smokeTest
Scenario Outline: deleting a file moves it to trashbin
Given using <dav-path-version> DAV path
When user "Alice" deletes file "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "/textfile0.txt" should exist in the trashbin
But as "Alice" file "/textfile0.txt" should not exist
Examples:
| dav-path-version |
| new |
| spaces |
@smokeTest
Scenario Outline: deleting a folder moves it to trashbin
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/tmp"
When user "Alice" deletes folder "/tmp" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" folder "/tmp" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: deleting a file in a folder moves it to the trashbin root
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/new-folder"
And user "Alice" has moved file "/textfile0.txt" to "/new-folder/new-file.txt"
When user "Alice" deletes file "/new-folder/new-file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/new-folder/new-file.txt" should exist in the trashbin
And as "Alice" file "/new-file.txt" should exist in the trashbin
But as "Alice" file "/new-folder/new-file.txt" should not exist
Examples:
| dav-path-version |
| new |
| spaces |
@skipOnReva
Scenario Outline: deleting a file in a shared folder moves it to the trashbin root
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
When user "Alice" deletes file "/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/shared/shared_file.txt" should exist in the trashbin
And as "Alice" file "/shared_file.txt" should exist in the trashbin
But as "Alice" file "/shared/shared_file.txt" should not exist
Examples:
| dav-path-version |
| new |
| spaces |
@skipOnReva
Scenario Outline: deleting a shared folder moves it to trashbin
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
When user "Alice" deletes folder "/shared" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the folder with original path "/shared" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
# This scenario deletes many files as close together in time as the test can run.
# On a very slow system, the file deletes might all happen in different seconds.
# But on "reasonable" systems, some of the files will be deleted in the same second,
# thus testing the required behavior.
Scenario Outline: trashbin can store two files with the same name but different origins when the files are deleted close together in time
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/folderA"
And user "Alice" has created folder "/folderB"
And user "Alice" has created folder "/folderC"
And user "Alice" has created folder "/folderD"
And user "Alice" has copied file "/textfile0.txt" to "/folderA/textfile0.txt"
And user "Alice" has copied file "/textfile0.txt" to "/folderB/textfile0.txt"
And user "Alice" has copied file "/textfile0.txt" to "/folderC/textfile0.txt"
And user "Alice" has copied file "/textfile0.txt" to "/folderD/textfile0.txt"
When user "Alice" deletes these files without delays using the WebDAV API
| /textfile0.txt |
| /folderA/textfile0.txt |
| /folderB/textfile0.txt |
| /folderC/textfile0.txt |
| /folderD/textfile0.txt |
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the folder with original path "/folderA/textfile0.txt" should exist in the trashbin
And as "Alice" the folder with original path "/folderB/textfile0.txt" should exist in the trashbin
And as "Alice" the folder with original path "/folderC/textfile0.txt" should exist in the trashbin
And as "Alice" the folder with original path "/folderD/textfile0.txt" should exist in the trashbin
And as "Alice" the folder with original path "/textfile0.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
# Note: the underlying acceptance test code ensures that each delete step is separated by a least 1 second
Scenario Outline: trashbin can store two files with the same name but different origins when the deletes are separated by at least 1 second
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/folderA"
And user "Alice" has created folder "/folderB"
And user "Alice" has copied file "/textfile0.txt" to "/folderA/textfile0.txt"
And user "Alice" has copied file "/textfile0.txt" to "/folderB/textfile0.txt"
When user "Alice" deletes file "/folderA/textfile0.txt" using the WebDAV API
And user "Alice" deletes file "/folderB/textfile0.txt" using the WebDAV API
And user "Alice" deletes file "/textfile0.txt" using the WebDAV API
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the folder with original path "/folderA/textfile0.txt" should exist in the trashbin
And as "Alice" the folder with original path "/folderB/textfile0.txt" should exist in the trashbin
And as "Alice" the folder with original path "/textfile0.txt" should exist in the trashbin
Examples:
| dav-path-version |
| new |
| spaces |
@issue-3561
Scenario Outline: listing other user's trashbin is prohibited
Given using <dav-path-version> DAV path
And user "testtrashbin100" has been created with default attributes
And user "testtrashbin100" has uploaded file "filesForUpload/textfile.txt" to "/textfile1.txt"
And user "Brian" has been created with default attributes
And user "testtrashbin100" has deleted file "/textfile1.txt"
When user "Brian" tries to list the trashbin content for user "testtrashbin100"
Then the HTTP status code should be "404"
And the last webdav response should not contain the following elements
| path | user |
| textfile1.txt | testtrashbin100 |
Examples:
| dav-path-version |
| new |
| spaces |
@issue-3561 @smokeTest
Scenario Outline: listing other user's trashbin is prohibited with multiple files on trashbin
Given using <dav-path-version> DAV path
And user "testtrashbin101" has been created with default attributes
And user "testtrashbin101" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "testtrashbin101" has uploaded file "filesForUpload/textfile.txt" to "/textfile2.txt"
And user "Brian" has been created with default attributes
And user "testtrashbin101" has deleted file "/textfile0.txt"
And user "testtrashbin101" has deleted file "/textfile2.txt"
When user "Brian" tries to list the trashbin content for user "testtrashbin101"
Then the HTTP status code should be "404"
And the last webdav response should not contain the following elements
| path | user |
| textfile0.txt | testtrashbin101 |
| textfile2.txt | testtrashbin101 |
Examples:
| dav-path-version |
| new |
| spaces |
@issue-3561 @skipOnReva
Scenario Outline: listing other user's trashbin is prohibited for newly recreated user with same name
Given using <dav-path-version> DAV path
And user "testtrashbin102" has been created with default attributes
And user "testtrashbin102" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "testtrashbin102" has uploaded file "filesForUpload/textfile.txt" to "/textfile2.txt"
And user "Brian" has been created with default attributes
And user "testtrashbin102" has deleted file "/textfile0.txt"
And user "testtrashbin102" has deleted file "/textfile2.txt"
And user "testtrashbin102" has been deleted
And user "testtrashbin102" has been created with default attributes
And user "testtrashbin102" has uploaded file "filesForUpload/textfile.txt" to "/textfile3.txt"
And user "testtrashbin102" has deleted file "/textfile3.txt"
When user "Brian" tries to list the trashbin content for user "testtrashbin102"
Then the HTTP status code should be "404"
And the last webdav response should not contain the following elements
| path | user |
| textfile0.txt | testtrashbin102 |
| textfile2.txt | testtrashbin102 |
| textfile3.txt | testtrashbin102 |
Examples:
| dav-path-version |
| new |
| spaces |
@issue-3561
Scenario Outline: listing other user's empty unused trashbin is prohibited
Given using <dav-path-version> DAV path
And user "testtrashbinempty" has been created with default attributes
And user "testtrashbinempty" has uploaded file "filesForUpload/textfile.txt" to "/textfile1.txt"
When user "Alice" tries to list the trashbin content for user "testtrashbinempty"
Then the HTTP status code should be "404"
Examples:
| dav-path-version |
| new |
| spaces |
@issue-3561
Scenario Outline: listing non-existent user's trashbin is prohibited
Given using <dav-path-version> DAV path
When user "Alice" tries to list the trashbin content for user "nonexistent"
Then the HTTP status code should be "404"
Examples:
| dav-path-version |
| new |
| spaces |
@smokeTest
Scenario Outline: get trashbin content with wrong password
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "Alice" has deleted file "/textfile0.txt"
When user "Alice" tries to list the trashbin content for user "Alice" using password "invalid"
Then the HTTP status code should be "401"
And the last webdav response should not contain the following elements
| path | user |
| /textfile0.txt | Alice |
Examples:
| dav-path-version |
| new |
| spaces |
@smokeTest
Scenario Outline: get trashbin content without password
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/textfile0.txt"
And user "Alice" has deleted file "/textfile0.txt"
When user "Alice" tries to list the trashbin content for user "Alice" using password ""
Then the HTTP status code should be "401"
And the last webdav response should not contain the following elements
| path | user |
| /textfile0.txt | Alice |
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: user with unusual username deletes a file
Given using <dav-path-version> DAV path
And user "<user>" has been created with default attributes
And user "<user>" has uploaded file with content "to delete" to "/textfile0.txt"
When user "<user>" deletes file "/textfile0.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "<user>" file "/textfile0.txt" should exist in the trashbin
But as "<user>" file "/textfile0.txt" should not exist
Examples:
| dav-path-version | user |
| new | dash-123 |
| new | null |
| new | nil |
| spaces | dash-123 |
| spaces | null |
| spaces | nil |
Scenario Outline: deleting a file with comma in the filename moves it to trashbin
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file with content "file with comma in filename" to "sample,1.txt"
When user "Alice" deletes file "sample,1.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" file "sample,1.txt" should exist in the trashbin
But as "Alice" file "sample,1.txt" should not exist
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: deleting a folder moves all its content to the trashbin
Given using <dav-path-version> DAV path
And user "Alice" has created folder "/new-folder"
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "/new-folder/new-file.txt"
When user "Alice" deletes folder "/new-folder" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/new-folder/new-file.txt" should exist in the trashbin
And as "Alice" the folder with original path "/new-folder" should exist in the trashbin
And as "Alice" file "/new-folder/new-file.txt" should exist in the trashbin
But as "Alice" file "/new-folder/new-file.txt" should not exist
Examples:
| dav-path-version |
| new |
| spaces |
@issue-541
Scenario Outline: deleted file has appropriate deletion time information
Given using <dav-path-version> DAV path
And user "Alice" has uploaded file "filesForUpload/textfile.txt" to "file.txt" with mtime "Thu, 08 Aug 2018 04:18:13 GMT"
And user "Alice" has deleted file "file.txt"
When user "Alice" tries to list the trashbin content for user "Alice"
Then the HTTP status code should be "207"
And the deleted file "file.txt" should have the correct deletion mtime in the response
Examples:
| dav-path-version |
| new |
| spaces |
@issue-1547
Scenario Outline: deleting files with special characters moves it to trashbin
Given using <dav-path-version> DAV path
And user "Alice" has uploaded the following files with content "special character file"
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
When user "Alice" deletes the following files
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
Then the HTTP status code of responses on all endpoints should be "204"
And as "Alice" the following files should not exist
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
But as "Alice" the files with following original paths should exist in the trashbin
| path |
| qa&dev.txt |
| !@tester$^.txt |
| %file *?2.txt |
| # %ab ab?=ed.txt |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
Examples:
| dav-path-version |
| new |
| spaces |
@issue-1547
Scenario Outline: deleting folders with special characters moves it to trashbin
Given using <dav-path-version> DAV path
And user "Alice" has created the following folders
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
When user "Alice" deletes the following folders
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
Then the HTTP status code of responses on all endpoints should be "204"
But as "Alice" the following folders should not exist
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
And as "Alice" the folders with following original paths should exist in the trashbin
| path |
| qa&dev |
| !@tester$^ |
| %file *?2 |
| # %ab ab?=ed |
| fo. |
| fo.1 |
| fo...1.. |
| ... |
| ..fo |
| fo.xyz |
Examples:
| dav-path-version |
| new |
| spaces |
@@ -0,0 +1,278 @@
@skipOnReva
Feature: using trashbin together with sharing
As a user
I want the deletion of the resources that I shared to end up in my trashbin
So that I can restore the resources that were accidentally deleted
Background:
Given user "Alice" has been created with default attributes
And user "Alice" has uploaded file with content "file to delete" to "/textfile0.txt"
@smokeTest @issue-7555
Scenario Outline: deleting a received folder doesn't move it to trashbin
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
And user "Brian" has moved folder "/Shares/shared" to "/Shares/renamed_shared"
When user "Brian" deletes folder "/Shares/renamed_shared" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" the folder with original path "/Shares/renamed_shared" should not exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1124 @issue-7555
Scenario Outline: sharee deleting a file in a received folder after renaming the shared folder moves it to trashbin of both users
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
And user "Brian" has moved file "/Shares/shared" to "/Shares/renamed_shared"
When user "Brian" deletes file "/Shares/renamed_shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" the file with original path "/Shares/renamed_shared/shared_file.txt" should exist in the trashbin
And as "Alice" the file with original path "/shared/shared_file.txt" should exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1124
Scenario Outline: sharee deleting a file in a group-shared folder moves it to the trashbin of sharee and sharer only
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Carol" has been added to group "grp1"
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
And user "Carol" has a share "shared" synced
When user "Brian" deletes file "/Shares/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" the file with original path "/Shares/shared/shared_file.txt" should exist in the trashbin
And as "Alice" the file with original path "/shared/shared_file.txt" should exist in the trashbin
And as "Carol" the file with original path "/Shares/shared/shared_file.txt" should not exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: sharer deleting a file in a group-shared folder moves it to the trashbin of sharer only
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Carol" has been added to group "grp1"
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
And user "Carol" has a share "shared" synced
When user "Alice" deletes file "/shared/shared_file.txt" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/shared/shared_file.txt" should exist in the trashbin
And as "Brian" the file with original path "/Shares/shared/shared_file.txt" should not exist in the trashbin
And as "Carol" the file with original path "/Shares/shared/shared_file.txt" should not exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1124
Scenario Outline: sharee deleting a folder in a group-shared folder moves it to the trashbin of sharee and sharer only
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Carol" has been added to group "grp1"
And user "Alice" has created folder "/shared"
And user "Alice" has created folder "/shared/sub"
And user "Alice" has moved file "/textfile0.txt" to "/shared/sub/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
And user "Carol" has a share "shared" synced
When user "Brian" deletes folder "/Shares/shared/sub" using the WebDAV API
Then the HTTP status code should be "204"
And as "Brian" the file with original path "/Shares/shared/sub/shared_file.txt" should exist in the trashbin
And as "Alice" the file with original path "/shared/sub/shared_file.txt" should exist in the trashbin
And as "Carol" the file with original path "/Shares/shared/sub/shared_file.txt" should not exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| spaces |
Scenario Outline: sharer deleting a folder in a group-shared folder moves it to the trashbin of sharer only
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Carol" has been created with default attributes
And group "grp1" has been created
And user "Brian" has been added to group "grp1"
And user "Carol" has been added to group "grp1"
And user "Alice" has created folder "/shared"
And user "Alice" has created folder "/shared/sub"
And user "Alice" has moved file "/textfile0.txt" to "/shared/sub/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | grp1 |
| shareType | group |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
And user "Carol" has a share "shared" synced
When user "Alice" deletes folder "/shared/sub" using the WebDAV API
Then the HTTP status code should be "204"
And as "Alice" the file with original path "/shared/sub/shared_file.txt" should exist in the trashbin
And as "Brian" the file with original path "/Shares/shared/sub/shared_file.txt" should not exist in the trashbin
And as "Carol" the file with original path "/Shares/shared/sub/shared_file.txt" should not exist in the trashbin
Examples:
| dav-path-version |
| old |
| new |
| spaces |
@issue-1124 @issue-7555
Scenario Outline: deleting a file in a received folder when restored it comes back to the original path
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Alice" has created folder "/shared"
And user "Alice" has moved file "/textfile0.txt" to "/shared/shared_file.txt"
And user "Alice" has sent the following resource share invitation:
| resource | shared |
| space | Personal |
| sharee | Brian |
| shareType | user |
| permissionsRole | Editor |
And user "Brian" has a share "shared" synced
And user "Brian" has moved folder "/Shares/shared" to "/Shares/renamed_shared"
And user "Brian" has deleted file "/Shares/renamed_shared/shared_file.txt"
When user "Brian" restores the file with original path "/Shares/renamed_shared/shared_file.txt" using the trashbin API
Then the HTTP status code should be "201"
And the following headers should match these regular expressions for user "Brian"
| ETag | /^"[a-f0-9:\.]{1,32}"$/ |
And as "Brian" the file with original path "/Shares/renamed_shared/shared_file.txt" should not exist in the trashbin
And user "Brian" should see the following elements
| /Shares/renamed_shared |
| /Shares/renamed_shared/shared_file.txt |
And the content of file "/Shares/renamed_shared/shared_file.txt" for user "Brian" should be "file to delete"
Examples:
| dav-path-version |
| new |
| spaces |
Scenario Outline: restoring personal file to a read-only folder
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Brian" has created folder "shareFolderParent"
And user "Brian" has uploaded file with content "file to delete" to "shareFolderParent/textfile0.txt"
And user "Brian" has sent the following resource share invitation:
| resource | shareFolderParent |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has a share "shareFolderParent" synced
And user "Alice" has deleted file "/textfile0.txt"
When user "Alice" restores the file with original path "/textfile0.txt" to "/Shares/shareFolderParent/textfile0.txt" using the trashbin API
Then the HTTP status code should be "<http-status-code>"
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Brian" the file with original path "/textfile0.txt" should not exist in the trashbin
And as "Alice" file "/Shares/shareFolderParent/textfile0.txt" should exist
And as "Brian" file "/shareFolderParent/textfile0.txt" should exist
Examples:
| dav-path-version | http-status-code |
| new | 403 |
| spaces | 400 |
Scenario Outline: restoring personal file to a read-only sub-folder
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Brian" has created folder "shareFolderParent"
And user "Brian" has created folder "shareFolderParent/shareFolderChild"
And user "Brian" has sent the following resource share invitation:
| resource | shareFolderParent |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Viewer |
And user "Alice" has a share "shareFolderParent" synced
And as "Alice" folder "/Shares/shareFolderParent/shareFolderChild" should exist
And user "Alice" has deleted file "/textfile0.txt"
When user "Alice" restores the file with original path "/textfile0.txt" to "/Shares/shareFolderParent/shareFolderChild/textfile0.txt" using the trashbin API
Then the HTTP status code should be "<http-status-code>"
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Alice" file "/Shares/shareFolderParent/shareFolderChild/textfile0.txt" should not exist
And as "Brian" file "/shareFolderParent/shareFolderChild/textfile0.txt" should not exist
Examples:
| dav-path-version | http-status-code |
| new | 403 |
| spaces | 400 |
@issue-10356
Scenario Outline: try to restore personal file to a shared folder as an editor
Given using <dav-path-version> DAV path
And user "Brian" has been created with default attributes
And user "Brian" has created folder "shareFolderParent"
And user "Brian" has uploaded file with content "file to delete" to "shareFolderParent/textfile0.txt"
And user "Brian" has sent the following resource share invitation:
| resource | shareFolderParent |
| space | Personal |
| sharee | Alice |
| shareType | user |
| permissionsRole | Editor |
And user "Alice" has a share "shareFolderParent" synced
And user "Alice" has deleted file "/textfile0.txt"
When user "Alice" restores the file with original path "/textfile0.txt" to "/Shares/shareFolderParent/textfile0.txt" using the trashbin API
Then the HTTP status code should be "<http-status-code>"
And as "Alice" the file with original path "/textfile0.txt" should exist in the trashbin
And as "Brian" the file with original path "/shareFolderParent/textfile0.txt" should not exist in the trashbin
And as "Brian" file "/shareFolderParent/textfile0.txt" should exist
And as "Alice" file "/Shares/shareFolderParent/textfile0.txt" should exist
Examples:
| dav-path-version | http-status-code |
| new | 403 |
| spaces | 400 |