Use icons as links to edit content blocks
Just like we do with the rest of the tables in the admin section.
This commit is contained in:
@@ -2,13 +2,19 @@ require "rails_helper"
|
||||
|
||||
describe "Admin custom content blocks", :admin do
|
||||
scenario "Index" do
|
||||
block = create(:site_customization_content_block)
|
||||
heading_block = create(:heading_content_block)
|
||||
block = create(:site_customization_content_block, name: "top_links")
|
||||
heading_block = create(:heading_content_block, heading: create(:budget_heading, name: "Reforestation"))
|
||||
visit admin_site_customization_content_blocks_path
|
||||
|
||||
expect(page).to have_content(block.name)
|
||||
within "tr", text: "top_links" do
|
||||
expect(page).to have_link "Edit"
|
||||
end
|
||||
|
||||
within "tr", text: "Reforestation" do
|
||||
expect(page).to have_link "Edit"
|
||||
end
|
||||
|
||||
expect(page).to have_content(block.body)
|
||||
expect(page).to have_content(heading_block.heading.name)
|
||||
expect(page).to have_content(heading_block.body)
|
||||
end
|
||||
|
||||
@@ -73,7 +79,7 @@ describe "Admin custom content blocks", :admin do
|
||||
click_link "Custom content blocks"
|
||||
end
|
||||
|
||||
click_link "top_links (en)"
|
||||
within("tr", text: "top_links (en)") { click_link "Edit" }
|
||||
|
||||
fill_in "site_customization_content_block_body", with: "Some other custom content"
|
||||
click_button "Update Custom content block"
|
||||
|
||||
Reference in New Issue
Block a user