Remove redundant words in edit and destroy links
When we see a list of, let's say, banners, and each one has a link to edit them, the word "banner" in the text "edit banner" is redundant and adds noise; even for users with cognitive disabilities, it's obvious that the "edit" link refers to the banner.
This commit is contained in:
@@ -14,7 +14,7 @@ describe Admin::Budgets::TableActionsComponent, type: :component do
|
||||
expect(page).to have_css "a", count: 6
|
||||
expect(page).to have_link "Manage projects", href: /investments/
|
||||
expect(page).to have_link "Edit headings groups", href: /groups/
|
||||
expect(page).to have_link "Edit budget", href: /edit/
|
||||
expect(page).to have_link "Edit", href: /edit/
|
||||
expect(page).to have_link "Admin ballots"
|
||||
expect(page).to have_link "Preview budget", href: /budgets/
|
||||
expect(page).to have_link "Delete", href: /budgets/
|
||||
|
||||
@@ -113,7 +113,7 @@ shared_examples "admin_milestoneable" do |factory_name, path_name|
|
||||
|
||||
visit path
|
||||
|
||||
accept_confirm { click_link "Delete milestone" }
|
||||
accept_confirm { click_link "Delete" }
|
||||
|
||||
expect(page).not_to have_content "Title will it remove"
|
||||
end
|
||||
|
||||
@@ -104,7 +104,7 @@ describe "Admin banners magement", :admin do
|
||||
fill_in "Post ended at", with: Date.current + 1.week
|
||||
|
||||
click_button "Save changes"
|
||||
click_link "Edit banner"
|
||||
click_link "Edit"
|
||||
|
||||
expect_to_have_language_selected "Français"
|
||||
expect(page).to have_field "Title", with: "En Français"
|
||||
@@ -137,7 +137,7 @@ describe "Admin banners magement", :admin do
|
||||
click_link "Manage banners"
|
||||
end
|
||||
|
||||
click_link "Edit banner"
|
||||
click_link "Edit"
|
||||
|
||||
fill_in "Title", with: "Modified title"
|
||||
fill_in "Description", with: "Edited text"
|
||||
@@ -173,7 +173,7 @@ describe "Admin banners magement", :admin do
|
||||
|
||||
expect(page).to have_content "Ugly banner"
|
||||
|
||||
accept_confirm { click_link "Delete banner" }
|
||||
accept_confirm { click_link "Delete" }
|
||||
|
||||
visit admin_root_path
|
||||
expect(page).not_to have_content "Ugly banner"
|
||||
|
||||
@@ -29,7 +29,7 @@ describe "Admin budget phases" do
|
||||
expect(page).to have_content "Accepting projects"
|
||||
expect(page).not_to have_content "My phase custom name"
|
||||
|
||||
within("tr", text: "Accepting projects") { click_link "Edit phase" }
|
||||
within("tr", text: "Accepting projects") { click_link "Edit" }
|
||||
end
|
||||
|
||||
expect(page).to have_css "h2", exact_text: "Edit phase - Accepting projects"
|
||||
|
||||
@@ -227,7 +227,7 @@ describe "Admin budgets", :admin do
|
||||
|
||||
within_table "Phases" do
|
||||
within "tr", text: "Information" do
|
||||
expect(page).to have_link "Edit phase"
|
||||
expect(page).to have_link "Edit"
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -88,7 +88,7 @@ describe "Budgets wizard, first step", :admin do
|
||||
expect(page).to have_content "New participatory budget created successfully!"
|
||||
|
||||
within("#side_menu") { click_link "Participatory budgets" }
|
||||
within("tr", text: "M30 - Summer campaign") { click_link "Edit budget" }
|
||||
within("tr", text: "M30 - Summer campaign") { click_link "Edit" }
|
||||
|
||||
expect(page).to have_content "This participatory budget is in draft mode"
|
||||
expect(page).to have_link "Preview budget"
|
||||
|
||||
@@ -56,7 +56,7 @@ describe "Budgets wizard, phases step", :admin do
|
||||
|
||||
expect(page).to have_css ".creation-timeline"
|
||||
|
||||
within("tr", text: "Selecting projects") { click_link "Edit phase" }
|
||||
within("tr", text: "Selecting projects") { click_link "Edit" }
|
||||
fill_in "Name", with: "Choosing projects"
|
||||
click_button "Save changes"
|
||||
|
||||
@@ -86,7 +86,7 @@ describe "Budgets wizard, phases step", :admin do
|
||||
scenario "update phase in single heading budget" do
|
||||
visit admin_budgets_wizard_budget_budget_phases_path(budget, mode: "single")
|
||||
|
||||
within("tr", text: "Selecting projects") { click_link "Edit phase" }
|
||||
within("tr", text: "Selecting projects") { click_link "Edit" }
|
||||
fill_in "Name", with: "Choosing projects"
|
||||
click_button "Save changes"
|
||||
|
||||
|
||||
@@ -107,7 +107,7 @@ describe "Budgets creation wizard", :admin do
|
||||
|
||||
expect(page).to have_css ".budget-phases-table"
|
||||
|
||||
within("tr", text: "Voting projects") { click_link "Edit phase" }
|
||||
within("tr", text: "Voting projects") { click_link "Edit" }
|
||||
fill_in "Name", with: "Custom phase name"
|
||||
uncheck "Phase enabled"
|
||||
click_button "Save changes"
|
||||
|
||||
@@ -15,7 +15,7 @@ describe "Admin officials", :admin do
|
||||
|
||||
scenario "Edit an official" do
|
||||
visit admin_officials_path
|
||||
click_link "Edit official"
|
||||
click_link "Edit"
|
||||
|
||||
expect(page).to have_current_path(edit_admin_official_path(official))
|
||||
|
||||
|
||||
@@ -47,7 +47,7 @@ describe "Admin booths", :admin do
|
||||
|
||||
expect(page).to have_content booth_for_current_poll.name
|
||||
expect(page).not_to have_content booth_for_expired_poll.name
|
||||
expect(page).not_to have_link "Edit booth"
|
||||
expect(page).not_to have_link "Edit"
|
||||
end
|
||||
|
||||
scenario "Show" do
|
||||
@@ -82,7 +82,7 @@ describe "Admin booths", :admin do
|
||||
|
||||
within("#booth_#{booth.id}") do
|
||||
expect(page).not_to have_link "Manage shifts"
|
||||
click_link "Edit booth"
|
||||
click_link "Edit"
|
||||
end
|
||||
|
||||
fill_in "poll_booth_name", with: "Next booth"
|
||||
|
||||
@@ -91,7 +91,7 @@ describe "Admin custom content blocks", :admin do
|
||||
expect(page).to have_content("#{block.name} (#{block.locale})")
|
||||
expect(page).to have_content(block.body)
|
||||
|
||||
accept_confirm { click_link "Delete block" }
|
||||
accept_confirm { click_link "Delete" }
|
||||
|
||||
expect(page).not_to have_content("#{block.name} (#{block.locale})")
|
||||
expect(page).not_to have_content(block.body)
|
||||
|
||||
@@ -39,7 +39,7 @@ describe "Admin tags", :admin do
|
||||
expect(page).to have_content "bad tag"
|
||||
|
||||
within("#tag_#{tag2.id}") do
|
||||
accept_confirm { click_link "Delete topic" }
|
||||
accept_confirm { click_link "Delete" }
|
||||
end
|
||||
|
||||
expect(page).not_to have_content "bad tag"
|
||||
@@ -57,7 +57,7 @@ describe "Admin tags", :admin do
|
||||
expect(page).to have_content "bad tag"
|
||||
|
||||
within("#tag_#{tag2.id}") do
|
||||
accept_confirm { click_link "Delete topic" }
|
||||
accept_confirm { click_link "Delete" }
|
||||
end
|
||||
|
||||
expect(page).not_to have_content "bad tag"
|
||||
|
||||
Reference in New Issue
Block a user