Added specs for custom pages
New test to check pages are rendered in their matching locale.
This commit is contained in:
@@ -103,6 +103,25 @@ feature "Custom Pages" do
|
||||
expect(page).to have_selector("h1", text: "Another custom page")
|
||||
expect(page).to have_content("Subtitle for custom page")
|
||||
end
|
||||
|
||||
scenario "Not listed in more information page due to different locale" do
|
||||
custom_page = create(:site_customization_page, :published,
|
||||
slug: "another-slug", title: "Ce texte est en français",
|
||||
subtitle: "Subtitle for custom page",
|
||||
more_info_flag: false,
|
||||
locale: "fr"
|
||||
)
|
||||
|
||||
visit more_info_path
|
||||
|
||||
expect(page).to_not have_content("Ce texte est en français")
|
||||
|
||||
visit custom_page.url
|
||||
|
||||
expect(page).to have_title("Ce texte est en français")
|
||||
expect(page).to have_selector("h1", text: "Ce texte est en français")
|
||||
expect(page).to have_content("Subtitle for custom page")
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user