Use visible texts in tests
Content like lowercase letters with `text-transform: uppercase` or spaces after elements with `display: block` or "You're on page:" are not seen that way by users with a browser supporting CSS. So we're testing what most users actually experience.
This commit is contained in:
@@ -379,7 +379,7 @@ describe "Proposal's dashboard" do
|
||||
anchor: "tab-notifications"))
|
||||
end
|
||||
|
||||
scenario "Dashboard has a related content section" do
|
||||
scenario "Dashboard has a related content section", :js do
|
||||
related_debate = create(:debate)
|
||||
related_proposal = create(:proposal)
|
||||
|
||||
@@ -399,9 +399,9 @@ describe "Proposal's dashboard" do
|
||||
|
||||
within(".dashboard-related-content") do
|
||||
expect(page).to have_content("Related content (2)")
|
||||
expect(page).to have_selector(".related-content-title", text: "Proposal")
|
||||
expect(page).to have_selector(".related-content-title", text: "PROPOSAL")
|
||||
expect(page).to have_link related_proposal.title
|
||||
expect(page).to have_selector(".related-content-title", text: "Debate")
|
||||
expect(page).to have_selector(".related-content-title", text: "DEBATE")
|
||||
expect(page).to have_link related_debate.title
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user