Skip to content

Commit

Permalink
AO3-6638 Intermittent failure in cucumber tag_wrangling, orphan_pseud…
Browse files Browse the repository at this point in the history
…, and user_delete features (#4658)

* Fix grandfather flakiness

* Helpful (?) comment

* Fix another intermittent test

Inspired by #4656

* Alternative fix

More consistent with other formerly intermittent tests

* Fix more orphan tests
  • Loading branch information
ceithir authored Nov 15, 2023
1 parent 99be16c commit bba3552
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 4 additions & 0 deletions features/other_a/orphan_pseud.feature
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@ Feature: Orphan pseud
When I follow "Back To Pseuds"
Then I should see "orphanpseud"
And I should see "2 works"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
When I follow "Orphan Works"
Then I should see "Orphan All Works by orphanpseud"
When I choose "Take my pseud off as well"
Expand All @@ -44,6 +46,8 @@ Feature: Orphan pseud
When I follow "Back To Pseuds"
Then I should see "orphanpseud"
And I should see "2 works"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
When I follow "Orphan Works"
Then I should see "Orphan All Works by orphanpseud"
When I choose "Leave a copy of my pseud on"
Expand Down
2 changes: 2 additions & 0 deletions features/tags_and_wrangling/tag_wrangling.feature
Original file line number Diff line number Diff line change
Expand Up @@ -330,6 +330,8 @@ Feature: Tag wrangling
When I edit the tag "Child"
And I check the 1st checkbox with id matching "MetaTag"
And I fill in "tag_meta_tag_string" with "Grandparent"
# Ensure a new cache key will be used
And it is currently 1 second from now
And I press "Save changes"
Then I should see "Tag was updated"
And I should see "Grandparent" within "#parent_MetaTag_associations_to_remove_checkboxes"
Expand Down
9 changes: 6 additions & 3 deletions features/users/user_delete.feature
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ Scenario: Allow a user to orphan their works when deleting their account
When I try to delete my account as orphaner
Then I should see "What do you want to do with your works?"
When I choose "Change my pseud to "orphan" and attach to the orphan account"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
And I press "Save"
Then I should see "You have successfully deleted your account."
And 0 emails should be delivered
Expand All @@ -66,16 +68,17 @@ Scenario: Delete a user with a collection
When I try to delete my account as moderator
Then I should see "You have 1 collection(s) under the following pseuds: moderator."
When I choose "Change my pseud to "orphan" and attach to the orphan account"
# Delay before orphaning to make sure the cache is expired
And it is currently 1 second from now
And I press "Save"
Then I should see "You have successfully deleted your account."
And 0 emails should be delivered
And I should be logged out
And a user account should not exist for "moderator"
When I go to the collections page
Then I should see "fake"
# TODO: And a caching bug is fixed...
# And I should see "orphan_account"
# And I should not see "moderator"
And I should see "orphan_account"
And I should not see "moderator"

Scenario: Delete a user who has coauthored a work
Given the following activated users exist
Expand Down

0 comments on commit bba3552

Please sign in to comment.