DEV: uses correct selector (#117)

This is working with selenium, but this won't be working with playwright which is less permissive on selectors.
This commit is contained in:
Joffrey JAFFEUX 2025-04-25 11:31:09 +02:00 committed by GitHub
parent a2dbdcb442
commit 8bd98f0288
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -108,7 +108,8 @@ RSpec.describe "DiscoTOC", system: true do
expect(page).to have_css(
".d-toc-item.d-toc-h1.active a[data-d-toc='toc-h1-heading-1-on-the-source-topic']",
)
find("a[href='/t/#{topic_1.slug}/#{topic_1.id}'").click
find("a[href='/t/#{topic_1.slug}/#{topic_1.id}']").click
expect(page).to have_css(".d-toc-item.d-toc-h1.active a[data-d-toc='toc-h1-heading-1']")
expect(page).to have_no_css("a[data-d-toc='toc-h1-heading-1-on-the-source-topic']")