mirror of
https://github.com/discourse/DiscoTOC.git
synced 2026-09-16 23:42:13 -04:00
DEV: Fix timeline/progress spec flakes (#148)
ensure we actually are on the second post in both cases
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user