Update site customization pages translatable fields
This commit is contained in:
@@ -7,6 +7,12 @@ feature "Admin custom pages" do
|
||||
login_as(admin.user)
|
||||
end
|
||||
|
||||
it_behaves_like "translatable",
|
||||
"site_customization_page",
|
||||
"edit_admin_site_customization_page_path",
|
||||
%w[title subtitle],
|
||||
{ "content" => :ckeditor }
|
||||
|
||||
scenario "Index" do
|
||||
custom_page = create(:site_customization_page)
|
||||
visit admin_site_customization_pages_path
|
||||
@@ -28,10 +34,10 @@ feature "Admin custom pages" do
|
||||
|
||||
click_link "Create new page"
|
||||
|
||||
fill_in "site_customization_page_title_en", with: "An example custom page"
|
||||
fill_in "site_customization_page_subtitle_en", with: "Page subtitle"
|
||||
fill_in "Title", with: "An example custom page"
|
||||
fill_in "Subtitle", with: "Page subtitle"
|
||||
fill_in "site_customization_page_slug", with: "example-page"
|
||||
fill_in "site_customization_page_content_en", with: "This page is about..."
|
||||
fill_in "Content", with: "This page is about..."
|
||||
|
||||
click_button "Create Custom page"
|
||||
|
||||
@@ -57,7 +63,7 @@ feature "Admin custom pages" do
|
||||
expect(page).to have_selector("h2", text: "An example custom page")
|
||||
expect(page).to have_selector("input[value='custom-example-page']")
|
||||
|
||||
fill_in "site_customization_page_title_en", with: "Another example custom page"
|
||||
fill_in "Title", with: "Another example custom page"
|
||||
fill_in "site_customization_page_slug", with: "another-custom-example-page"
|
||||
click_button "Update Custom page"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user