-
Notifications
You must be signed in to change notification settings - Fork 63
Expand file tree
/
Copy pathcopyMove.feature
More file actions
290 lines (274 loc) 路 11.7 KB
/
Copy pathcopyMove.feature
File metadata and controls
290 lines (274 loc) 路 11.7 KB
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
Feature: Copy
As a user
I want to copy/move
So that I can work safely on a copy or move resource to different location
Scenario: Copy and move resources in personal space
Given "Admin" creates following user using API
| id |
| Alice |
And "Alice" creates the following folders in personal space using API
| name |
| PARENTCopy1 |
| PARENTCopy2 |
| PARENTMove |
| PARENTCopy3 |
| PARENTCopy4/Sub1/Sub2 |
| PARENT |
| PARENT/Sub1/Sub |
| PARENT/Sub2 |
| PARENT/Sub3 |
| PARENT/Sub4 |
| PARENT/Sub5 |
| PARENT/my-docs |
And "Alice" creates the following files into personal space using API
| pathToFile | content |
| PARENTCopy3/example1.txt | example text |
| PARENTCopy3/example2.txt | example text |
| KeyboardExample.txt | copy with the help of keyboard |
| dragDrop.txt | copy with the help of drag-drop |
| PARENT/fileToCopy1.txt | some content |
| PARENT/fileToCopy2.txt | some content |
| PARENT/fileToCopy3.txt | some content |
| PARENT/fileToCopy4.txt | some content |
| PARENT/fileToCopy5.txt | some content |
| PARENT/my-docs/lorem.txt | lorem epsum |
And "Alice" logs in
And "Alice" reduces the tile size
When "Alice" copies the following resource using dropdown-menu
| resource | to |
| PARENTCopy3/example1.txt | Personal/PARENTCopy1 |
And "Alice" copies the following resource using batch-action
| resource | to |
| PARENTCopy3/example2.txt | Personal/PARENTCopy1 |
And "Alice" copies the following resource using keyboard
| resource | to |
| KeyboardExample.txt | Personal/PARENTCopy3 |
And "Alice" copies the following resource to a new folder "Personal/new-folder"
| resource |
| PARENTCopy3/example1.txt |
And "Alice" moves the following resource using drag-drop
| resource | to |
| dragDrop.txt | PARENTCopy2 |
And "Alice" moves the following resource using dropdown-menu
| resource | to |
| PARENTCopy1/example1.txt | Personal/PARENTMove |
And "Alice" moves the following resource using batch-action
| resource | to |
| PARENTCopy1/example2.txt | Personal/PARENTMove |
And "Alice" moves the following resource using keyboard
| resource | to |
| PARENTCopy2 | Personal/PARENTMove |
And "Alice" opens folder "PARENTCopy4"
And "Alice" opens folder "Sub1"
And "Alice" moves the following resource using drag-drop-breadcrumb
| resource | to |
| Sub2 | PARENTCopy4 |
And "Alice" navigates to the personal space page
And "Alice" moves the following resource to a new folder "Personal/another-folder"
| resource |
| PARENT/my-docs |
And "Alice" opens the "files" app
And "Alice" opens folder "PARENT"
And "Alice" copies the following resources to "Personal/PARENT/Sub1" at once using dropdown-menu
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub4 |
| Sub5 |
And "Alice" copies the following resources to "Personal/PARENT/Sub2" at once using batch-action
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub4 |
| Sub5 |
And "Alice" copies the following resources to "PARENT/Sub3" at once using keyboard
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub4 |
| Sub5 |
And "Alice" opens folder "Sub1"
And "Alice" moves the following resources to "Personal/PARENT/Sub1/Sub" at once using dropdown-menu
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub4 |
| Sub5 |
And "Alice" opens folder "Sub"
And "Alice" moves the following resources to "Personal/PARENT/Sub1" at once using batch-action
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub4 |
| Sub5 |
And "Alice" opens the "files" app
And "Alice" opens folder "PARENT"
And "Alice" moves the following resources to "Sub4" at once using drag-drop
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub1 |
| Sub2 |
And "Alice" opens folder "Sub4"
And "Alice" moves the following resources to "PARENT" at once using drag-drop-breadcrumb
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub1 |
| Sub2 |
And "Alice" opens the "files" app
And "Alice" opens folder "PARENT"
And "Alice" moves the following resources to "PARENT/Sub4" at once using keyboard
| resource |
| fileToCopy1.txt |
| fileToCopy2.txt |
| fileToCopy3.txt |
| fileToCopy4.txt |
| fileToCopy5.txt |
| Sub1 |
| Sub2 |
And "Alice" logs out
Scenario: Copy and move resources with same name in personal space
Given "Admin" creates following user using API
| id |
| Alice |
And "Alice" creates the following folders in personal space using API
| name |
| sub |
| folder1 |
| sub/folder1 |
| sub1/folder1 |
And "Alice" creates the following files into personal space using API
| pathToFile | content |
| example1.txt | personal space location |
| folder1/example1.txt | folder1 location |
| sub/folder1/example1.txt | sub/folder1 location |
| sub1/folder1/example1.txt | sub1/folder1 location |
And "Alice" logs in
# copy and move file
When "Alice" copies the following resources using dropdown-menu
| resource | to | option |
| example1.txt | Personal/folder1 | keep both |
| example1.txt | Personal/folder1 | replace |
And "Alice" moves the following resources using dropdown-menu
| resource | to | option |
| example1.txt | Personal/sub/folder1 | keep both |
| folder1/example1.txt | Personal/sub/folder1 | replace |
# copy and move folder
And "Alice" copies the following resources using dropdown-menu
| resource | to | option |
| folder1 | Personal/sub | keep both |
| folder1 | Personal/sub | replace |
And "Alice" moves the following resources using dropdown-menu
| resource | to | option |
| folder1 | Personal/sub | keep both |
| sub1/folder1 | Personal/sub | replace |
And "Alice" logs out
Scenario: copy/move resources between spaces
Given "Admin" creates following users using API
| id |
| Alice |
| Brian |
And "Admin" assigns following role to the users using API
| id | role |
| Alice | Space Admin |
And "Alice" creates the project space using API "mySpace"
And "Brian" creates the following folder in personal space using API
| name |
| share |
And "Alice" creates the following folder in personal space using API
| name |
| f1/f2/f3/f4 |
And "Brian" creates the following file into personal space using API
| pathToFile | content |
| share/file.txt | lorem ipsum |
| share/test.txt | lorem ipsum |
And "Brian" shares the following resource using API
| resource | recipient | type | role |
| share | Alice | user | Can edit |
And "Alice" logs in
And "Alice" navigates to the shared with me page
And "Alice" opens folder "share"
And "Alice" copies the following resource using dropdown-menu
| resource | to |
| file.txt | Project/mySpace |
And "Alice" copies the following resource to a new folder "Project/mySpace/new-folder"
| resource |
| test.txt |
And "Alice" navigates to the project space "mySpace"
And "Alice" copies the following resource using dropdown-menu
| resource | to |
| file.txt | Personal/f1/f2/f3/f4 |
And "Alice" navigates to the personal space page
And "Alice" opens folder "f1/f2"
And "Alice" copies the following resource using dropdown-menu
| resource | to |
| f3 | Shares/share |
# try to move. moving doesn't work between space -> expect copy instead
And "Alice" moves the following resource using dropdown-menu
| resource | to | option |
| f3 | Project/mySpace | copy instead |
And "Alice" navigates to the project space "mySpace"
And "Alice" moves the following resource to a new folder "Personal/another-folder" with copy instead
| resource |
| new-folder/test.txt |
And "Alice" logs out
Scenario: copy/move resources in received shares
Given "Admin" creates following users using API
| id |
| Alice |
| Brian |
And "Alice" creates the following folder in personal space using API
| name |
| f1/f2/f3 |
| a1 |
And "Alice" creates the following file into personal space using API
| pathToFile | content |
| f1/f2/f3/foo.txt | lorem ipsum |
And "Alice" shares the following resource using API
| resource | recipient | type | role |
| f1 | Brian | user | Can edit |
| a1 | Brian | user | Can edit |
And "Brian" logs in
And "Brian" navigates to the shared with me page
# move within the received share, up into the share root
And "Brian" moves the following resource using dropdown-menu
| resource | to |
| f1/f2/f3/foo.txt | Shares/f1 |
# move within the received share, into a sub folder. (regression #3374)
And "Brian" navigates to the shared with me page
And "Brian" moves the following resource using dropdown-menu
| resource | to |
| f1/foo.txt | Shares/f1/f2 |
# move between two different received shares -> not possible, expect copy instead
And "Brian" navigates to the shared with me page
And "Brian" moves the following resource using dropdown-menu
| resource | to | option |
| f1/f2/foo.txt | Shares/a1 | copy instead |
# move from a received share into own personal space -> not possible, expect copy instead
And "Brian" navigates to the shared with me page
And "Brian" moves the following resource using dropdown-menu
| resource | to | option |
| a1/foo.txt | Personal | copy instead |
And "Brian" logs out