-
Notifications
You must be signed in to change notification settings - Fork 510
/
admin_works.feature
493 lines (453 loc) · 19 KB
/
admin_works.feature
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
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
@admin
Feature: Admin Actions for Works, Comments, Series, Bookmarks
As an admin
I should be able to perform special actions
Scenario: Can troubleshoot works
Given I am logged in as "regular_user"
And I post the work "Just a work you know"
When I am logged in as a "support" admin
And I view the work "Just a work you know"
And I follow "Troubleshoot"
And I check "Reindex Work"
And I press "Troubleshoot"
Then I should see "Work sent to be reindexed."
Scenario Outline: Can hide works
Given I am logged in as "regular_user"
And I post the work "ToS Violation"
When I am logged in as a "<role>" admin
And all emails have been delivered
And I view the work "ToS Violation"
And I follow "Hide Work"
Then I should see "Item has been hidden."
And logged out users should not see the hidden work "ToS Violation" by "regular_user"
And logged in users should not see the hidden work "ToS Violation" by "regular_user"
And "regular_user" should see their work "ToS Violation" is hidden
And 1 email should be delivered
And the email should contain "you will be required to take action to correct the violation"
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario Outline: Can unhide works
Given I am logged in as "regular_user"
And I post the work "ToS Violation"
When I am logged in as a "policy_and_abuse" admin
And I view the work "ToS Violation"
And I follow "Hide Work"
And all indexing jobs have been run
And all emails have been delivered
Then I should see "Item has been hidden."
When I follow "Make Work Visible"
And all indexing jobs have been run
Then I should see "Item is no longer hidden."
And logged out users should see the unhidden work "ToS Violation" by "regular_user"
And logged in users should see the unhidden work "ToS Violation" by "regular_user"
And 0 emails should be delivered
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario: Deleting works as a Policy & Abuse admin
Given I am logged in as "regular_user"
And I post the work "ToS Violation"
When I am logged in as a "policy_and_abuse" admin
# Don't let the admin password email mess up the count.
And all emails have been delivered
And I view the work "ToS Violation"
And I follow "Delete Work"
And all indexing jobs have been run
Then I should see "Item was successfully deleted."
And 1 email should be delivered
And the email should contain "deleted from the Archive by a site admin"
And the email should not contain "translation missing"
When I visit the last activities item
Then I should see "destroy"
And I should see "#<Work id"
When I log out
And I am on regular_user's works page
Then I should not see "ToS Violation"
When I am logged in
And I am on regular_user's works page
Then I should not see "ToS Violation"
Scenario: Deleting works as a Legal admin
Given I am logged in as "regular_user"
And I post the work "ToS Violation"
When I am logged in as a "legal" admin
# Don't let the admin password email mess up the count.
And all emails have been delivered
And I view the work "ToS Violation"
And I follow "Delete Work"
And all indexing jobs have been run
Then I should see "Item was successfully deleted."
And 1 email should be delivered
And the email should contain "deleted from the Archive by a site admin"
And the email should not contain "translation missing"
When I log out
And I am on regular_user's works page
Then I should not see "ToS Violation"
When I am logged in
And I am on regular_user's works page
Then I should not see "ToS Violation"
Scenario Outline: Can hide bookmarks
Given I am logged in as "regular_user" with password "password1"
And I post the work "A Nice Work"
When I am logged in as "bad_user"
And I view the work "A Nice Work"
When I follow "Bookmark"
And I fill in "bookmark_notes" with "Rude comment"
And I press "Create"
And all indexing jobs have been run
Then I should see "Bookmark was successfully created"
When I am logged in as a "<role>" admin
And I am on bad_user's bookmarks page
When I follow "Hide Bookmark"
And all indexing jobs have been run
Then I should see "Item has been hidden."
When I am logged in as "regular_user" with password "password1"
And I am on bad_user's bookmarks page
Then I should not see "Rude comment"
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario Outline: Deleting bookmarks
Given I am logged in as "regular_user" with password "password1"
And I post the work "A Nice Work"
When I am logged in as "bad_user"
And I view the work "A Nice Work"
When I follow "Bookmark"
And I fill in "bookmark_notes" with "Rude comment"
And I press "Create"
And all indexing jobs have been run
Then I should see "Bookmark was successfully created"
When I am logged in as a "<role>" admin
And I am on bad_user's bookmarks page
And I follow "Delete Bookmark"
Then I should see "Item was successfully deleted."
When I am logged in as "bad_user"
And I am on bad_user's bookmarks page
Then I should not see "Rude comment"
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario: Can edit tags on works
Given I am logged in as "regular_user"
And I post the work "Changes" with fandom "User-Added Fandom" with freeform "User-Added Freeform" with category "M/M"
When I am logged in as a "policy_and_abuse" admin
And I view the work "Changes"
And I follow "Edit Tags and Language"
When I select "Mature" from "Rating"
And I uncheck "No Archive Warnings Apply"
And I check "Choose Not To Use Archive Warnings"
And I fill in "Fandoms" with "Admin-Added Fandom"
And I fill in "Relationships" with "Admin-Added Relationship"
And I fill in "Characters" with "Admin-Added Character"
And I fill in "Additional Tags" with "Admin-Added Freeform"
And I uncheck "M/M"
And I check "Other"
When I press "Post"
Then I should not see "User-Added Fandom"
And I should see "Admin-Added Fandom"
And I should not see "User-Added Freeform"
And I should see "Admin-Added Freeform"
And I should not see "M/M"
And I should see "Other"
And I should not see "No Archive Warnings Apply"
And I should see "Creator Chose Not To Use Archive Warnings"
And I should not see "Not Rated"
And I should see "Mature"
And I should see "Admin-Added Relationship"
And I should see "Admin-Added Character"
When I follow "Activities"
Then I should see "Admin Activities"
When I visit the last activities item
Then I should see "No Archive Warnings Apply"
And I should see "Old tags"
And I should see "User-Added Fandom"
And I should not see "Admin-Added Fandom"
Scenario: Can edit external works
Given basic languages
And I am logged in as "regular_user"
And I bookmark the external work "External Changes"
When I am logged in as a "policy_and_abuse" admin
And I view the external work "External Changes"
And I follow "Edit External Work"
When I fill in "Creator" with "Admin-Added Creator"
And I fill in "Title" with "Admin-Added Title"
And I fill in "Creator's Summary" with "Admin-added summary"
And I select "Mature" from "Rating"
And I check "No Archive Warnings Apply"
And I fill in "Fandoms" with "Admin-Added Fandom"
And I fill in "Relationships" with "Admin-Added Relationship"
And I fill in "Characters" with "Admin-Added Character"
And I fill in "Additional Tags" with "Admin-Added Freeform"
And I check "M/M"
And I select "Deutsch" from "Language"
And it is currently 1 second from now
When I press "Update External work"
Then I should see "Admin-Added Creator"
And I should see "Admin-Added Title"
And I should see "Admin-added summary"
And I should see "Mature"
And I should see "No Archive Warnings"
And I should see "Admin-Added Fandom"
And I should see "Admin-Added Character"
And I should see "Admin-Added Freeform"
And I should see "M/M"
And I should see "Language: Deutsch"
Scenario Outline: Hiding and un-hiding external works
Given I am logged in as "regular_user"
And I bookmark the external work "External Changes"
When I am logged in as a "<role>" admin
And I view the external work "External Changes"
And I follow "Hide External Work"
Then I should see "Item has been hidden."
And I should see "Make External Work Visible"
When I follow "Make External Work Visible"
Then I should see "Item is no longer hidden."
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario Outline: Deleting external works
Given I am logged in as "regular_user"
And I bookmark the external work "External Changes"
When I am logged in as a "<role>" admin
And I view the external work "External Changes"
And I follow "Delete External Work"
Then I should see "Item was successfully deleted."
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario: Can mark a comment as spam
Given I have no works or comments
And the following activated users exist
| login | password |
| author | password |
| commenter | password |
# set up a work with a genuine comment
When I am logged in as "author"
And I post the work "The One Where Neal is Awesome"
When I am logged in as "commenter"
And I view the work "The One Where Neal is Awesome"
And I fill in "Comment" with "I loved this!"
And I press "Comment"
Then I should see "Comment created!"
# comment from registered user cannot be marked as spam.
# If registered user is spamming, this goes to Abuse team as ToS violation
When I am logged in as a "policy_and_abuse" admin
Then I should see "Successfully logged in"
When I view the work "The One Where Neal is Awesome"
And I follow "Comments (1)"
Then I should not see "Spam" within "#feedback"
# now mark a comment as spam
When I post the comment "Would you like a genuine rolex" on the work "The One Where Neal is Awesome" as a guest
And I am logged in as a "policy_and_abuse" admin
And I view the work "The One Where Neal is Awesome"
And I follow "Comments (2)"
Then I should see "rolex"
And I should see "Spam" within "#feedback"
And it is currently 1 second from now
When I follow "Spam" within "#feedback"
# Can see link to unmark
Then I should see "Not Spam"
And I should see "Hide Comments (1)"
# Admin can still see spam comment
And I should see "rolex"
And I should see "This comment has been marked as spam."
# proper content should still be there
And I should see "I loved this!"
# user can't see spam comment
When I log out
And I view the work "The One Where Neal is Awesome"
Then I should see "Comments (1)"
When I follow "Comments (1)"
Then I should not see "rolex"
And I should see "I loved this!"
# author can't see spam comment
When I am logged in as "author" with password "password"
And I view the work "The One Where Neal is Awesome"
Then I should see "Comments (1)"
When I follow "Comments (1)"
Then I should not see "rolex"
And I should see "I loved this!"
# now mark comment as not spam
When I am logged in as a "policy_and_abuse" admin
And I view the work "The One Where Neal is Awesome"
And I follow "Comments (1)"
And it is currently 1 second from now
And I follow "Not Spam"
Then I should see "Hide Comments (2)"
And I should not see "Not Spam"
And I should not see "This comment has been marked as spam."
# user can see comment again
When I log out
And I view the work "The One Where Neal is Awesome"
Then I should see "Comments (2)"
When I follow "Comments (2)"
Then I should see "rolex"
And I should not see "This comment has been marked as spam."
# author can see comment again
When I am logged in as "author" with password "password"
And I view the work "The One Where Neal is Awesome"
Then I should see "Comments (2)"
When I follow "Comments (2)"
Then I should see "rolex"
And I should not see "This comment has been marked as spam."
Scenario: Admin can edit language on works when posting without previewing
Given basic languages
And I am logged in as "regular_user"
And I post the work "Wrong Language"
When I am logged in as a "policy_and_abuse" admin
And I view the work "Wrong Language"
And I follow "Edit Tags and Language"
Then I should see "Edit Work Tags and Language for "
When I select "Deutsch" from "Choose a language"
And I press "Post"
Then I should see "Deutsch"
And I should not see "English"
Scenario: Admin can edit language on works when previewing first
Given basic languages
And I am logged in as "regular_user"
And I post the work "Wrong Language"
When I am logged in as a "policy_and_abuse" admin
And I view the work "Wrong Language"
And I follow "Edit Tags and Language"
When I select "Deutsch" from "Choose a language"
And I press "Preview"
Then I should see "Preview Tags and Language"
When I press "Update"
Then I should see "Deutsch"
And I should not see "English"
Scenario: can mark a work as spam
Given the work "Spammity Spam"
And I am logged in as a "policy_and_abuse" admin
And I view the work "Spammity Spam"
Then I should see "Mark As Spam"
When I follow "Mark As Spam"
Then I should see "marked as spam and hidden"
And I should see "Mark Not Spam"
And the work "Spammity Spam" should be marked as spam
And the work "Spammity Spam" should be hidden
Scenario: can mark a spam work as not-spam
Given the spam work "Spammity Spam"
And I am logged in as a "policy_and_abuse" admin
And I view the work "Spammity Spam"
Then I should see "Mark Not Spam"
When I follow "Mark Not Spam"
Then I should see "marked not spam and unhidden"
And I should see "Mark As Spam"
And the work "Spammity Spam" should not be marked as spam
And the work "Spammity Spam" should not be hidden
Scenario Outline: Admin can hide a series (e.g. if the series description or notes contain a TOS Violation)
Given I am logged in as "tosser"
And I add the work "Legit Work" to series "Violation"
When I am logged in as a "<role>" admin
And I view the series "Violation"
And I follow "Hide Series"
Then I should see "Item has been hidden."
And I should see the image "title" text "Hidden by Administrator"
And I should see "Make Series Visible"
When I log out
And I go to tosser's series page
Then I should see "Series (0)"
And I should not see "Violation"
When I view the series "Violation"
Then I should see "Sorry, you don't have permission to access the page you were trying to reach."
When I am logged in as "other_user"
And I go to tosser's series page
Then I should see "Series (0)"
And I should not see "Violation"
When I view the series "Violation"
Then I should see "Sorry, you don't have permission to access the page you were trying to reach."
When I am logged in as "tosser"
And I go to tosser's series page
Then I should see "Series (0)"
And I should not see "Violation"
When I view the series "Violation"
Then I should see the image "title" text "Hidden by Administrator"
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario Outline: Admin can un-hide a series
Given I am logged in as "tosser"
And I add the work "Legit Work" to series "Violation"
And I am logged in as a "<role>" admin
And I view the series "Violation"
And I follow "Hide Series"
When I follow "Make Series Visible"
Then I should see "Item is no longer hidden."
And I should not see the image "title" text "Hidden by Administrator"
And I should see "Hide Series"
When I log out
And I go to tosser's series page
Then I should see "Series (1)"
And I should see "Violation"
When I view the series "Violation"
Then I should see "Violation"
When I am logged in as "other_user"
And I go to tosser's series page
Then I should see "Series (1)"
And I should see "Violation"
When I view the series "Violation"
Then I should see "Violation"
When I am logged in as "tosser"
And I go to tosser's series page
Then I should see "Series (1)"
And I should see "Violation"
When I view the series "Violation"
Then I should see "Violation"
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario Outline: Deleting series
Given I am logged in as "tosser"
And I add the work "Legit Work" to series "Violation"
And I am logged in as a "<role>" admin
When I view the series "Violation"
And I follow "Delete Series"
Then I should see "Item was successfully deleted."
When I log out
And I go to tosser's series page
Then I should see "Series (0)"
And I should not see "Violation"
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |
Scenario: Admins can see when a work has too many tags
Given the user-defined tag limit is 7
And the work "Under the Limit"
And the work "Over the Limit"
And the work "Over the Limit" has 2 fandom tags
And the work "Over the Limit" has 2 character tags
And the work "Over the Limit" has 2 relationship tags
And the work "Over the Limit" has 2 freeform tags
When I am logged in as an admin
And I view the work "Under the Limit"
Then I should see "Over Tag Limit: No"
When I view the work "Over the Limit"
Then I should see "Over Tag Limit: Yes"
Scenario Outline: Certain admins can see original work creators
Given a work "Orphaned" with the original creator "orphaneer"
When I am logged in as a "<role>" admin
And I view the work "Orphaned"
Then I should see the original creator "orphaneer"
Examples:
| role |
| superadmin |
| legal |
| policy_and_abuse |