@@ -3,10 +3,12 @@ Feature: check activities
3
3
I want to check who made which changes to files
4
4
So that I can track modifications
5
5
6
-
7
- Scenario : check activities after uploading a file
6
+ Background :
8
7
Given user "Alice" has been created with default attributes and without skeleton files
9
8
And user "Alice" has uploaded file with content "ownCloud test text file 0" to "/textfile0.txt"
9
+
10
+
11
+ Scenario : check activities after uploading a file
10
12
When user "Alice" checks the activities for file "textfile0.txt" in space "Personal" using the Graph API
11
13
Then the HTTP status code should be "200"
12
14
And the JSON data of the response should match
@@ -97,3 +99,175 @@ Feature: check activities
97
99
}
98
100
}
99
101
"""
102
+
103
+
104
+ Scenario : check activities after deleting a file
105
+ When user "Alice" deletes file "/textfile0.txt" using the WebDAV API
106
+ And user "Alice" checks the activities in space "Personal" using the Graph API
107
+ Then the HTTP status code should be "200"
108
+ And the JSON data of the response should match
109
+ """
110
+ {
111
+ "type": "object",
112
+ "required": ["value"],
113
+ "properties": {
114
+ "value": {
115
+ "type": "array",
116
+ "minItems": 2,
117
+ "maxItems": 2,
118
+ "uniqueItems": true,
119
+ "items": {
120
+ "oneOf": [
121
+ {
122
+ "type": "object",
123
+ "required": ["id","template","times"],
124
+ "properties": {
125
+ "id": {
126
+ "type": "string",
127
+ "pattern": "^%user_id_pattern%$"
128
+ },
129
+ "template": {
130
+ "type": "object",
131
+ "required": ["message","variables"],
132
+ "properties": {
133
+ "message": {
134
+ "const": "{user} added {resource} to {space}"
135
+ },
136
+ "variables": {
137
+ "type": "object",
138
+ "required": ["resource","space","user"],
139
+ "properties": {
140
+ "resource": {
141
+ "type": "object",
142
+ "required": ["id","name"],
143
+ "properties": {
144
+ "id": {
145
+ "const": ""
146
+ },
147
+ "name": {
148
+ "const": "textfile0.txt"
149
+ }
150
+ }
151
+ },
152
+ "space": {
153
+ "type": "object",
154
+ "required": ["id","name"],
155
+ "properties": {
156
+ "id": {
157
+ "type": "string",
158
+ "pattern": "^%file_id_pattern%$"
159
+ },
160
+ "name": {
161
+ "const": "Alice Hansen"
162
+ }
163
+ }
164
+ },
165
+ "user": {
166
+ "type": "object",
167
+ "required": ["id","displayName"],
168
+ "properties": {
169
+ "id": {
170
+ "type": "string",
171
+ "pattern": "%user_id_pattern%"
172
+ },
173
+ "displayName": {
174
+ "const": "Alice"
175
+ }
176
+ }
177
+ }
178
+ }
179
+ }
180
+ }
181
+ },
182
+ "times": {
183
+ "type": "object",
184
+ "required": ["recordedTime"],
185
+ "properties": {
186
+ "recordedTime": {
187
+ "type": "string",
188
+ "format": "date-time"
189
+ }
190
+ }
191
+ }
192
+ }
193
+ },
194
+ {
195
+ "type": "object",
196
+ "required": ["id","template","times"],
197
+ "properties": {
198
+ "id": {
199
+ "type": "string",
200
+ "pattern": "^%user_id_pattern%$"
201
+ },
202
+ "template": {
203
+ "type": "object",
204
+ "required": ["message","variables"],
205
+ "properties": {
206
+ "message": {
207
+ "const": "{user} deleted {resource} from {space}"
208
+ },
209
+ "variables": {
210
+ "type": "object",
211
+ "required": ["resource","space","user"],
212
+ "properties": {
213
+ "resource": {
214
+ "type": "object",
215
+ "required": ["id","name"],
216
+ "properties": {
217
+ "id": {
218
+ "type": "string",
219
+ "pattern": "%file_id_pattern%"
220
+ },
221
+ "name": {
222
+ "const": "textfile0.txt"
223
+ }
224
+ }
225
+ },
226
+ "space": {
227
+ "type": "object",
228
+ "required": ["id","name"],
229
+ "properties": {
230
+ "id": {
231
+ "type": "string",
232
+ "pattern": "^%file_id_pattern%$"
233
+ },
234
+ "name": {
235
+ "const": "Alice Hansen"
236
+ }
237
+ }
238
+ },
239
+ "user": {
240
+ "type": "object",
241
+ "required": ["id","displayName"],
242
+ "properties": {
243
+ "id": {
244
+ "type": "string",
245
+ "pattern": "%user_id_pattern%"
246
+ },
247
+ "displayName": {
248
+ "const": "Alice"
249
+ }
250
+ }
251
+ }
252
+ }
253
+ }
254
+ }
255
+ },
256
+ "times": {
257
+ "type": "object",
258
+ "required": ["recordedTime"],
259
+ "properties": {
260
+ "recordedTime": {
261
+ "type": "string",
262
+ "format": "date-time"
263
+ }
264
+ }
265
+ }
266
+ }
267
+ }
268
+ ]
269
+ }
270
+ }
271
+ }
272
+ }
273
+ """
0 commit comments