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

move.feature « sharing « features « integration « tests - github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: fbd035bddf271b248a63ed27f58be603a9715c9b (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
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
Feature: move

  Background:
    Given user "participant1" exists
    Given user "participant2" exists
    Given user "participant3" exists
    Given user "participant4" exists

  Scenario: move share to another folder
    Given user "participant1" creates room "group room"
      | roomType | 2 |
      | roomName | room |
    And user "participant1" renames room "group room" to "Group room" with 200
    And user "participant1" adds "participant2" to room "group room" with 200
    And user "participant1" adds "participant3" to room "group room" with 200
    And user "participant1" shares "welcome.txt" with room "group room" with OCS 100
    And user "participant1" creates folder "/test"
    When user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201
    Then user "participant1" gets last share
    And share is returned with
      | uid_owner              | participant1 |
      | displayname_owner      | participant1-displayname |
      | path                   | /test/renamed.txt |
      | item_type              | file |
      | mimetype               | text/plain |
      | storage_id             | home::participant1 |
      | file_target            | /{TALK_PLACEHOLDER}/welcome.txt |
      | share_with             | group room |
      | share_with_displayname | Group room |
    And user "participant2" gets last share
    And share is returned with
      | uid_owner              | participant1 |
      | displayname_owner      | participant1-displayname |
      | path                   | /Talk/welcome.txt |
      | item_type              | file |
      | mimetype               | text/plain |
      | storage_id             | shared::/Talk/welcome.txt |
      | file_target            | /Talk/welcome.txt |
      | share_with             | group room |
      | share_with_displayname | Group room |
    And user "participant3" gets last share
    And share is returned with
      | uid_owner              | participant1 |
      | displayname_owner      | participant1-displayname |
      | path                   | /Talk/welcome.txt |
      | item_type              | file |
      | mimetype               | text/plain |
      | storage_id             | shared::/Talk/welcome.txt |
      | file_target            | /Talk/welcome.txt |
      | share_with             | group room |
      | share_with_displayname | Group room |

#  # When an own share is moved into a received shared folder the ownership of
#  # the share is handed over to the folder owner.
#  Scenario: move share to received shared folder from a user in the room
#    Given user "participant1" creates room "group room"
#      | roomType | 2 |
#      | roomName | room |
#    And user "participant1" renames room "group room" to "Group room" with 200
#    And user "participant1" adds "participant2" to room "group room" with 200
#    And user "participant1" adds "participant3" to room "group room" with 200
#    And user "participant3" creates folder "/test"
#    And user "participant3" shares "/test" with user "participant1" with OCS 100
#    And user "participant1" shares "welcome.txt" with room "group room" with OCS 100
#    When user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201
#    Then user "participant1" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant3 |
#      | displayname_file_owner | participant3-displayname |
#      | path                   | /test/renamed.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | shared::/test |
#      | file_target            | /{TALK_PLACEHOLDER}/welcome.txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |
#    And user "participant2" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant3 |
#      | displayname_file_owner | participant3-displayname |
#      | path                   | /Talk/welcome.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | shared::/welcome (2).txt |
#      | file_target            | /welcome (2).txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |
#    And user "participant3" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant3 |
#      | displayname_file_owner | participant3-displayname |
#      | path                   | /test/renamed.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | home::participant3 |
#      | file_target            | /welcome (2).txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |

#  Scenario: move share to received shared folder from a user not in the room
#    Given user "participant1" creates room "group room"
#      | roomType | 2 |
#      | roomName | room |
#    And user "participant1" renames room "group room" to "Group room" with 200
#    And user "participant1" adds "participant2" to room "group room" with 200
#    And user "participant1" adds "participant3" to room "group room" with 200
#    And user "participant4" creates folder "/test"
#    And user "participant4" shares "/test" with user "participant1" with OCS 100
#    And user "participant1" shares "welcome.txt" with room "group room" with OCS 100
#    When user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201
#    Then user "participant1" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant4 |
#      | displayname_file_owner | participant4-displayname |
#      | path                   | /test/renamed.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | shared::/test |
#      | file_target            | /{TALK_PLACEHOLDER}/welcome.txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |
#    And user "participant2" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant4 |
#      | displayname_file_owner | participant4-displayname |
#      | path                   | /Talk/welcome.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | shared::/welcome (2).txt |
#      | file_target            | /welcome (2).txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |
#    And user "participant3" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant4 |
#      | displayname_file_owner | participant4-displayname |
#      | path                   | /Talk/welcome.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | shared::/welcome (2).txt |
#      | file_target            | /welcome (2).txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |

#  Scenario: move share to received shared folder which is also a received shared folder
#    Given user "participant1" creates room "group room"
#      | roomType | 2 |
#      | roomName | room |
#    And user "participant1" renames room "group room" to "Group room" with 200
#    And user "participant1" adds "participant2" to room "group room" with 200
#    And user "participant3" creates folder "/test"
#    And user "participant3" shares "/test" with user "participant4" with OCS 100
#    And user "participant4" shares "/test" with user "participant1" with OCS 100
#    And user "participant1" shares "welcome.txt" with room "group room" with OCS 100
#    When user "participant1" moves file "/welcome.txt" to "/test/renamed.txt" with 201
#    Then user "participant1" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant3 |
#      | displayname_file_owner | participant3-displayname |
#      | path                   | /test/renamed.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | shared::/test |
#      | file_target            | /{TALK_PLACEHOLDER}/welcome.txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |
#    And user "participant2" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant3 |
#      | displayname_file_owner | participant3-displayname |
#      | path                   | /Talk/welcome.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | shared::/welcome (2).txt |
#      | file_target            | /welcome (2).txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |
#    And user "participant3" gets last share
#    And share is returned with
#      | uid_owner              | participant1 |
#      | displayname_owner      | participant1-displayname |
#      | uid_file_owner         | participant3 |
#      | displayname_file_owner | participant3-displayname |
#      | path                   | /test/renamed.txt |
#      | item_type              | file |
#      | mimetype               | text/plain |
#      | storage_id             | home::participant3 |
#      | file_target            | /{TALK_PLACEHOLDER}/welcome.txt |
#      | share_with             | group room |
#      | share_with_displayname | Group room |
#    And user "participant4" gets last share
#    Then the OCS status code should be "404"
#    And the HTTP status code should be "200"

  Scenario: move received share to another folder
    Given user "participant1" creates room "group room"
      | roomType | 2 |
      | roomName | room |
    And user "participant1" renames room "group room" to "Group room" with 200
    And user "participant1" adds "participant2" to room "group room" with 200
    And user "participant1" adds "participant3" to room "group room" with 200
    And user "participant1" shares "welcome.txt" with room "group room" with OCS 100
    And user "participant2" creates folder "/test"
    When user "participant2" moves file "Talk/welcome.txt" to "test/renamed.txt" with 201
    Then user "participant1" gets last share
    And share is returned with
      | uid_owner              | participant1 |
      | displayname_owner      | participant1-displayname |
      | path                   | /welcome.txt |
      | item_type              | file |
      | mimetype               | text/plain |
      | storage_id             | home::participant1 |
      | file_target            | /{TALK_PLACEHOLDER}/welcome.txt |
      | share_with             | group room |
      | share_with_displayname | Group room |
    And user "participant2" gets last share
    And share is returned with
      | uid_owner              | participant1 |
      | displayname_owner      | participant1-displayname |
      | path                   | /test/renamed.txt |
      | item_type              | file |
      | mimetype               | text/plain |
      | storage_id             | shared::/test/renamed.txt |
      | file_target            | /test/renamed.txt |
      | share_with             | group room |
      | share_with_displayname | Group room |
    And user "participant3" gets last share
    And share is returned with
      | uid_owner              | participant1 |
      | displayname_owner      | participant1-displayname |
      | path                   | /Talk/welcome.txt |
      | item_type              | file |
      | mimetype               | text/plain |
      | storage_id             | shared::/Talk/welcome.txt |
      | file_target            | /Talk/welcome.txt |
      | share_with             | group room |
      | share_with_displayname | Group room |



  # Received shares can not be moved into other shares (general limitation of
  # the sharing system, not related to room shares).
  Scenario: move received share to shared folder
    Given user "participant1" creates room "group room"
      | roomType | 2 |
      | roomName | room |
    And user "participant1" renames room "group room" to "Group room" with 200
    And user "participant1" adds "participant2" to room "group room" with 200
    And user "participant1" adds "participant3" to room "group room" with 200
    And user "participant3" creates folder "/test"
    And user "participant3" shares "/test" with user "participant2" with OCS 100
    And user "participant2" accepts last share
    And user "participant1" shares "welcome.txt" with room "group room" with OCS 100
    When user "participant3" moves file "/Talk/welcome.txt" to "/test/renamed.txt"
    Then the HTTP status code should be "403"