Add missing expectation to annotations test

This expectations in this test were true both before and after clicking
on the `.icon-expand` link, so it was possible that the test finished
before the request generated by that click did.

So we're adding an extra expectation to make sure we're testing what we
want to test: the content of the page after the request has finished.
This commit is contained in:
Javi Martín
2025-02-26 12:38:57 +01:00
parent da53a6acae
commit 2f667a6225

View File

@@ -39,9 +39,10 @@ describe "Commenting legislation annotations" do
find(".icon-expand").click
end
expect(page).to have_css(".comment", count: 2)
expect(page).to have_content("my annotation")
expect(page).to have_content("my other annotation")
expect(page).to have_content "Comments about"
expect(page).to have_css ".comment", count: 2
expect(page).to have_content "my annotation"
expect(page).to have_content "my other annotation"
end
scenario "Reply on a single annotation thread and display it in the merged annotation thread" do