Skip to content

Commit 9fadfc6

Browse files
authored
AO3-6943 Fix flaky search filtering tests (#5101)
1 parent 915723a commit 9fadfc6

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

features/search/filters.feature

+4
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ Feature: Filters
1212
And I post the work "A Hobbit's Meandering" with fandom "The Hobbit"
1313
And I post the work "Bilbo Does the Thing" with fandom "The Hobbit, Legend of Korra"
1414
And I post the work "Roonal Woozlib and the Ferrets of Nimh" with fandom "Harry Potter"
15+
And the dashboard counts have expired
1516

1617
@javascript
1718
Scenario: You can filter through a user's works using inclusion filters
@@ -106,6 +107,7 @@ Feature: Filters
106107
And I bookmark the work "Bilbo Does the Thing"
107108
And I bookmark the work "A Hobbit's Meandering"
108109
And I bookmark the work "Roonal Woozlib and the Ferrets of Nimh"
110+
And the dashboard counts have expired
109111
When I go to recengine's user page
110112
And I follow "Bookmarks (3)"
111113
Then I should see "Bilbo Does the Thing"
@@ -138,6 +140,7 @@ Feature: Filters
138140
And I bookmark the work "Bilbo Does the Thing"
139141
And I bookmark the work "A Hobbit's Meandering"
140142
And I bookmark the work "Roonal Woozlib and the Ferrets of Nimh"
143+
And the dashboard counts have expired
141144
When I go to recengine's user page
142145
And I follow "Bookmarks (3)"
143146
When I press "Fandoms" within "dd.exclude"
@@ -287,6 +290,7 @@ Feature: Filters
287290
And I am logged in as "recengine"
288291
And I bookmark the work "A Hobbit's Meandering" with the tags "fun"
289292
And I bookmark the work "Bilbo Does the Thing" with the tags "fun little crossover"
293+
And the dashboard counts have expired
290294

291295
When I go to my bookmarks page
292296
And I fill in "Other work tags to include" with "legend korra"

features/step_definitions/search_steps.rb

+5
Original file line numberDiff line numberDiff line change
@@ -24,3 +24,8 @@
2424
stub_const("ArchiveConfig", OpenStruct.new(ArchiveConfig))
2525
ArchiveConfig.SECONDS_UNTIL_DASHBOARD_COUNTS_EXPIRE = seconds.to_i
2626
end
27+
28+
When "the dashboard counts have expired" do
29+
step "all indexing jobs have been run"
30+
step "it is currently #{ArchiveConfig.SECONDS_UNTIL_DASHBOARD_COUNTS_EXPIRE} seconds from now"
31+
end

0 commit comments

Comments
 (0)