mirror of
https://github.com/discourse/discourse.git
synced 2025-02-25 18:55:32 -06:00
DEV: Fix flaky system test (#26479)
Why this change?
`expect(page.title).to starts_with("...")` does not rely on capybara
waiters. This commit switches us to use `have_title` instead which will
rely on Capybara waiters.
This commit is contained in:
committed by
GitHub
parent
9c9374f060
commit
477a67e4fb
@@ -17,7 +17,7 @@ RSpec.describe "Document title", type: :system do
|
||||
it "shows the channel name in the document title" do
|
||||
chat_page.visit_channel(channel_1)
|
||||
|
||||
expect(page.title).to start_with("##{channel_1.title}")
|
||||
expect(page).to have_title("##{channel_1.title}")
|
||||
end
|
||||
end
|
||||
|
||||
@@ -33,7 +33,7 @@ RSpec.describe "Document title", type: :system do
|
||||
it "shows the channel name in the document title" do
|
||||
chat_page.visit_channel(channel_1)
|
||||
|
||||
expect(page.title).to start_with("#{channel_1.title(current_user)}")
|
||||
expect(page).to have_title("#{channel_1.title(current_user)}")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user