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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user