DEV: Try to de-flake topic page specs (#22065)

This commit is contained in:
Jarek Radosz 2023-06-13 11:05:19 +02:00 committed by GitHub
parent 4270ab932a
commit e6f8897450
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 6 deletions

View File

@ -13,10 +13,9 @@ describe "Topic page", type: :system do
it "allows TOC anchor navigation" do it "allows TOC anchor navigation" do
visit("/t/#{topic.slug}/#{topic.id}") visit("/t/#{topic.slug}/#{topic.id}")
find("#toc-h2-testing").hover find("#toc-h2-testing .anchor", visible: :all).click
find("a.anchor").click
try_until_success(timeout: 10) do try_until_success do
expect(current_url).to match("/t/#{topic.slug}/#{topic.id}#toc-h2-testing") expect(current_url).to match("/t/#{topic.slug}/#{topic.id}#toc-h2-testing")
end end
end end
@ -27,10 +26,9 @@ describe "Topic page", type: :system do
it "allows TOC anchor navigation" do it "allows TOC anchor navigation" do
visit("/forum/t/#{topic.slug}/#{topic.id}") visit("/forum/t/#{topic.slug}/#{topic.id}")
find("#toc-h2-testing").hover find("#toc-h2-testing .anchor", visible: :all).click
find("a.anchor").click
try_until_success(timeout: 10) do try_until_success do
expect(current_url).to match("/forum/t/#{topic.slug}/#{topic.id}#toc-h2-testing") expect(current_url).to match("/forum/t/#{topic.slug}/#{topic.id}#toc-h2-testing")
end end
end end