Updates translatable custom pages
This commit is contained in:
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user