Skip to content

Commit

Permalink
AO3-6632 Fix flaky collection anonymity tests (#4660)
Browse files Browse the repository at this point in the history
  • Loading branch information
Bilka2 authored Nov 13, 2023
1 parent 2fd1aaf commit 99be16c
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion features/collections/collection_anonymity.feature
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,8 @@ Feature: Collection
And all emails have been delivered
When I am logged in as "first_user"
And I post the work "First Snippet" to the collection "Hidden Treasury" as a gift for "third_user"
# Delay before posting to make sure first work is clearly older
And it is currently 1 second from now
And I post the work "Second Snippet" to the collection "Hidden Treasury" as a gift for "fourth_user"
And subscription notifications are sent
Then 0 emails should be delivered
Expand Down Expand Up @@ -160,13 +162,17 @@ Feature: Collection
And the user "third_user" allows gifts
And I am logged in as "first_user"
And I post the work "First Snippet" to the collection "Anonymous Hugs" as a gift for "third_user"
# Delay before posting to make sure first work is clearly older
And it is currently 1 second from now
And I post the work "Second Snippet" to the collection "Anonymous Hugs" as a gift for "not a user"
When subscription notifications are sent
Then "second_user" should not be emailed
When I am logged in as "moderator"
And I view the approved collection items page for "Anonymous Hugs"
# items listed in date order so checking the second will reveal the older work
And I uncheck the 2nd checkbox with id matching "collection_items_\d+_anonymous"
# Delay before submitting to make sure the cache is expired
And it is currently 1 second from now
And I submit
Then the author of "First Snippet" should be publicly visible
When subscription notifications are sent
Expand Down Expand Up @@ -388,6 +394,8 @@ Feature: Collection
When I am logged in as the owner of "Anonymous Collection"
And I go to "Anonymous Collection" collection edit page
And I follow "Delete Collection"
# Delay before deleting to make sure the cache is expired
And it is currently 1 second from now
And I press "Yes, Delete Collection"
And I go to creator's works page
Then I should see "Secret Work"
Expand Down Expand Up @@ -418,6 +426,8 @@ Feature: Collection
When I am logged in as the owner of "Anonymous Collection"
And I view the approved collection items page for "Anonymous Collection"
And I check "Remove"
# Delay before submitting to make sure the cache is expired
And it is currently 1 second from now
And I submit
And I go to creator's works page
Then I should see "Secret Work"
Expand Down Expand Up @@ -451,8 +461,9 @@ Feature: Collection

When I edit the work "Secret Work"
And I fill in "Collections" with "Holidays,Fluffy"
# Delay before posting to make sure the cache is expired
And it is currently 1 second from now
And I press "Post"
And all indexing jobs have been run
And I go to my works page
Then I should see "Secret Work"

Expand Down

0 comments on commit 99be16c

Please sign in to comment.