Welcome to mirror list, hosted at ThFree Co, Russian Federation.

trashbin.feature « features « integration « build - github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 3a9c29f7cb81f76a41945c769ed0b925f8afdccd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
Feature: trashbin
	Background:
		Given using api version "1"
		And using new dav path
		And As an "admin"
		And app "files_trashbin" is enabled

	Scenario: deleting a file moves it to trashbin
		Given As an "admin"
		And user "user0" exists
		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 |

	Scenario: clearing the trashbin
		Given As an "admin"
		And user "user0" exists
		When User "user0" deletes file "/textfile0.txt"
		And User "user0" empties trashbin
		Then user "user0" in trash folder "/" should have 0 elements

	Scenario: restoring file from trashbin
		Given As an "admin"
		And user "user0" exists
		When User "user0" deletes file "/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" 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