mirror of
https://github.com/discourse/discourse.git
synced 2025-04-02 09:06:01 +08:00
DEV: attempts to fix flakey spec (#20075)
This commit is contained in:
parent
137f28e0d6
commit
a4c32e3970
@ -30,11 +30,11 @@ module PageObjects
|
|||||||
end
|
end
|
||||||
|
|
||||||
def has_search_result?
|
def has_search_result?
|
||||||
within(".search-results") { page.has_selector?(".fps-result", visible: true) }
|
page.has_selector?(".search-results .fps-result")
|
||||||
end
|
end
|
||||||
|
|
||||||
def has_warning_message?
|
def has_warning_message?
|
||||||
within(".search-results") { page.has_selector?(".warning", visible: true) }
|
page.has_selector?(".search-results .warning")
|
||||||
end
|
end
|
||||||
|
|
||||||
def is_search_page
|
def is_search_page
|
||||||
|
@ -58,7 +58,7 @@ describe "Search", type: :system, js: true do
|
|||||||
search_page.click_search_button
|
search_page.click_search_button
|
||||||
end
|
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
|
expect(search_page).to have_warning_message
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user