DEV: Avoid waiting full capybara default wait time (#22449)
Why this change? `not_to be_open` ends up calling `has_css?` on a selector that will never appear so it ends up waiting the full default wait time.
This commit is contained in:
parent
37a8036b2d
commit
9a65c78d87
|
@ -193,7 +193,7 @@ RSpec.describe "Navigation", type: :system do
|
||||||
expect(thread_page).to have_back_link_to_channel(category_channel)
|
expect(thread_page).to have_back_link_to_channel(category_channel)
|
||||||
thread_page.back_to_previous_route
|
thread_page.back_to_previous_route
|
||||||
expect(page).to have_current_path("#{category_channel.relative_url}")
|
expect(page).to have_current_path("#{category_channel.relative_url}")
|
||||||
expect(side_panel_page).not_to be_open
|
expect(side_panel_page).to be_closed
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -7,6 +7,10 @@ module PageObjects
|
||||||
has_css?(".chat-side-panel")
|
has_css?(".chat-side-panel")
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def closed?
|
||||||
|
has_no_css?(".chat-side-panel")
|
||||||
|
end
|
||||||
|
|
||||||
def has_open_thread?(thread = nil)
|
def has_open_thread?(thread = nil)
|
||||||
if thread
|
if thread
|
||||||
has_css?(".chat-side-panel .chat-thread[data-id='#{thread.id}']")
|
has_css?(".chat-side-panel .chat-thread[data-id='#{thread.id}']")
|
||||||
|
|
Loading…
Reference in New Issue