Updates translatable custom pages

This commit is contained in:
Papaya Labs
2018-09-27 13:46:17 +02:00
parent 2c22ab347d
commit 914bfa645e
10 changed files with 210 additions and 91 deletions

View File

@@ -11,7 +11,7 @@ feature "Admin custom pages" do
custom_page = create(:site_customization_page)
visit admin_site_customization_pages_path
expect(page).to have_content(custom_page.title)
expect(page).to have_content(custom_page.slug)
end
context "Create" do
@@ -22,19 +22,18 @@ feature "Admin custom pages" do
click_link "Custom pages"
end
expect(page).not_to have_content "An example custom page"
expect(page).not_to have_content "example-page"
click_link "Create new page"
fill_in "site_customization_page_title", with: "An example custom page"
fill_in "site_customization_page_subtitle", with: "Page subtitle"
fill_in "site_customization_page_title_en", with: "An example custom page"
fill_in "site_customization_page_subtitle_en", with: "Page subtitle"
fill_in "site_customization_page_slug", with: "example-page"
fill_in "site_customization_page_content", with: "This page is about..."
select 'English', from:"site_customization_page_locale"
fill_in "site_customization_page_content_en", with: "This page is about..."
click_button "Create Custom page"
expect(page).to have_content "An example custom page"
expect(page).to have_content "example-page"
end
end
@@ -51,7 +50,7 @@ feature "Admin custom pages" do
expect(page).to have_selector("h2", text: "An example custom page")
fill_in "site_customization_page_title", with: "Another example custom page"
fill_in "site_customization_page_title_en", with: "Another example custom page"
click_button "Update Custom page"
expect(page).to have_content "Page updated successfully"