DEV: attempts to fix flakey spec (#20075)

This commit is contained in:
Joffrey JAFFEUX 2023-01-30 21:47:44 +01:00 committed by GitHub
parent 137f28e0d6
commit a4c32e3970
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 3 additions and 3 deletions

View File

@ -30,11 +30,11 @@ module PageObjects
end
def has_search_result?
within(".search-results") { page.has_selector?(".fps-result", visible: true) }
page.has_selector?(".search-results .fps-result")
end
def has_warning_message?
within(".search-results") { page.has_selector?(".warning", visible: true) }
page.has_selector?(".search-results .warning")
end
def is_search_page

View File

@ -58,7 +58,7 @@ describe "Search", type: :system, js: true do
search_page.click_search_button
end
# Rate limit error should kick in after 15 queries
# Rate limit error should kick in after 4 queries
expect(search_page).to have_warning_message
end
end