DEV: Fix timeline/progress spec flakes (#148)

ensure we actually are on the second post in both cases
This commit is contained in:
Jarek Radosz
2026-06-05 17:17:42 +02:00
committed by GitHub
parent 502e5fffcf
commit 9edab586bf
2 changed files with 6 additions and 0 deletions
@@ -133,6 +133,9 @@ RSpec.describe "DiscoTOC", system: true, mobile: true do
visit("/t/-/#{topic_1.id}/2")
expect(page).to have_css("#post_2")
page.execute_script("document.querySelector('#post_2').scrollIntoView()")
expect(page).to have_no_css(".d-toc-mini")
end
end
@@ -179,6 +179,9 @@ RSpec.describe "DiscoTOC", system: true do
visit("/t/-/#{topic_1.id}/2")
expect(page).to have_css("#post_2")
page.execute_script("document.querySelector('#post_2').scrollIntoView()")
expect(page).to have_no_css(".d-toc-item.d-toc-h1")
end
end