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:
Javi Martín
2021-03-30 20:00:57 +02:00
parent 23945c2a7c
commit 9cfcbf2f3b
15 changed files with 122 additions and 121 deletions

View File

@@ -87,13 +87,13 @@ describe "Custom Pages" do
expect(page).to have_content("Subtitle for custom page")
end
scenario "Show widget cards for that page" do
scenario "Show widget cards for that page", :js do
custom_page = create(:site_customization_page, :published)
create(:widget_card, cardable: custom_page, title: "Card Highlights")
visit custom_page.url
expect(page).to have_content "Card Highlights"
expect(page).to have_content "CARD HIGHLIGHTS"
end
end
end