diff options
author | Robin Appelman <robin@icewind.nl> | 2018-09-11 14:24:35 +0200 |
---|---|---|
committer | Robin Appelman <robin@icewind.nl> | 2018-09-20 17:03:53 +0200 |
commit | d4087811e595989f5e30adfbaaa150a526ea98fc (patch) | |
tree | 710350bc970b7b948847ca0ee50a17aab6407f9a /build/integration/features/trashbin.feature | |
parent | 8491c9bdc63a1582163b17927eacc3fc9c27c606 (diff) | |
download | nextcloud-server-d4087811e595989f5e30adfbaaa150a526ea98fc.tar.gz nextcloud-server-d4087811e595989f5e30adfbaaa150a526ea98fc.zip |
more trashbin integration tests
Signed-off-by: Robin Appelman <robin@icewind.nl>
Diffstat (limited to 'build/integration/features/trashbin.feature')
-rw-r--r-- | build/integration/features/trashbin.feature | 53 |
1 files changed, 52 insertions, 1 deletions
diff --git a/build/integration/features/trashbin.feature b/build/integration/features/trashbin.feature index 0b8bf3a81c4..3a9c29f7cb8 100644 --- a/build/integration/features/trashbin.feature +++ b/build/integration/features/trashbin.feature @@ -11,7 +11,7 @@ Feature: trashbin When User "user0" deletes file "/textfile0.txt" Then user "user0" in trash folder "/" should have 1 element And user "user0" in trash folder "/" should have the following elements - | /textfile0.txt | + | textfile0.txt | Scenario: clearing the trashbin Given As an "admin" @@ -28,3 +28,54 @@ Feature: trashbin Then user "user0" in trash folder "/" should have 0 elements And as "user0" the file "/textfile0.txt" exists + Scenario: deleting and restoring a folder + Given As an "admin" + And user "user0" exists + When User "user0" created a folder "/testfolder" + And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" + And as "user0" the file "/testfolder/textfile0.txt" exists + And User "user0" deletes file "/testfolder" + And user "user0" in trash folder "/" should have 1 element + And user "user0" in trash folder "/" should have the following elements + | testfolder | + And user "user0" in trash folder "/testfolder" should have 1 element + And user "user0" in trash folder "/testfolder" should have the following elements + | textfile0.txt | + And user "user0" in restores "/testfolder" from trash + Then user "user0" in trash folder "/" should have 0 elements + And as "user0" the file "/testfolder/textfile0.txt" exists + + Scenario: deleting a file from a subfolder and restoring it moves it back to the subfolder + Given As an "admin" + And user "user0" exists + When User "user0" created a folder "/testfolder" + And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" + And as "user0" the file "/testfolder/textfile0.txt" exists + And User "user0" deletes file "/testfolder/textfile0.txt" + And user "user0" in trash folder "/" should have 1 element + And user "user0" in trash folder "/" should have the following elements + | textfile0.txt | + And user "user0" in restores "/textfile0.txt" from trash + Then user "user0" in trash folder "/" should have 0 elements + And as "user0" the file "/textfile0.txt" does not exist + And as "user0" the file "/testfolder/textfile0.txt" exists + + Scenario: deleting and a folder and restoring a file inside it + Given As an "admin" + And user "user0" exists + When User "user0" created a folder "/testfolder" + And User "user0" moves file "/textfile0.txt" to "/testfolder/textfile0.txt" + And as "user0" the file "/testfolder/textfile0.txt" exists + And User "user0" deletes file "/testfolder" + And user "user0" in trash folder "/" should have 1 element + And user "user0" in trash folder "/" should have the following elements + | testfolder | + And user "user0" in trash folder "/testfolder" should have 1 element + And user "user0" in trash folder "/testfolder" should have the following elements + | textfile0.txt | + And user "user0" in restores "/testfolder/textfile0.txt" from trash + Then user "user0" in trash folder "/" should have 1 elements + And user "user0" in trash folder "/testfolder" should have 0 element + And as "user0" the file "/textfile0.txt" exists + + |