From 1e305440f8436c4176039d674aeab71383575d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Tue, 14 Sep 2021 14:08:02 +0200 Subject: [PATCH] Change header text in groups and headings section The text "Groups and headings" might cause users to think both groups and headings have the same hierarchy, and wonder whether what they immediately see are groups or headings. Using "Heading groups" we make it clear that what comes immediately is a group, and then we see each group has headings. --- config/locales/en/admin.yml | 2 +- config/locales/es/admin.yml | 2 +- spec/system/admin/budget_groups_spec.rb | 8 ++++---- spec/system/admin/budget_headings_spec.rb | 6 +++--- spec/system/admin/budgets_wizard/groups_spec.rb | 2 +- spec/system/admin/budgets_wizard/headings_spec.rb | 2 +- spec/system/admin/budgets_wizard/wizard_spec.rb | 4 ++-- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/config/locales/en/admin.yml b/config/locales/en/admin.yml index b05115d70..55dbb9b91 100644 --- a/config/locales/en/admin.yml +++ b/config/locales/en/admin.yml @@ -156,7 +156,7 @@ en: show: add_group: "Add group" add_heading: "Add heading" - groups_and_headings: "Groups and headings" + groups_and_headings: "Heading groups" headings_caption: "Headings in %{group}" winners: calculate: Calculate Winner Investments diff --git a/config/locales/es/admin.yml b/config/locales/es/admin.yml index 7fd142ed2..9c7640297 100644 --- a/config/locales/es/admin.yml +++ b/config/locales/es/admin.yml @@ -156,7 +156,7 @@ es: show: add_group: "Añadir grupo" add_heading: "Añadir partida" - groups_and_headings: "Grupos y partidas" + groups_and_headings: "Grupos de partidas" headings_caption: "Partidas del grupo %{group}" winners: calculate: Calcular proyectos ganadores diff --git a/spec/system/admin/budget_groups_spec.rb b/spec/system/admin/budget_groups_spec.rb index a817a148c..918544fa8 100644 --- a/spec/system/admin/budget_groups_spec.rb +++ b/spec/system/admin/budget_groups_spec.rb @@ -18,8 +18,8 @@ describe "Admin budget groups", :admin do scenario "Displaying no groups for budget" do visit admin_budget_path(budget) - within "section", text: "Groups and headings" do - expect(page.text).to eq "Groups and headings\nAdd group" + within "section", text: "Heading groups" do + expect(page.text).to eq "Heading groups\nAdd group" end end @@ -33,7 +33,7 @@ describe "Admin budget groups", :admin do visit admin_budget_path(budget) - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do within "section", text: "Above ground" do expect(page).to have_css "h4", exact_text: "Above ground" expect(page).not_to have_content "Maximum number of headings" @@ -81,7 +81,7 @@ describe "Admin budget groups", :admin do expect(page).to have_content "Group created successfully!" - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do expect(page).to have_css "h4", exact_text: "All City" end end diff --git a/spec/system/admin/budget_headings_spec.rb b/spec/system/admin/budget_headings_spec.rb index 10569bb5a..8bbcb1343 100644 --- a/spec/system/admin/budget_headings_spec.rb +++ b/spec/system/admin/budget_headings_spec.rb @@ -23,7 +23,7 @@ describe "Admin budget headings", :admin do visit admin_budget_path(budget) - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do expect(page).to have_content "There are no headings in the Universities group." end end @@ -35,7 +35,7 @@ describe "Admin budget headings", :admin do visit admin_budget_path(budget) - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do within "tbody" do expect(page).to have_selector "tr", count: 3 @@ -73,7 +73,7 @@ describe "Admin budget headings", :admin do scenario "Create heading" do visit admin_budget_path(budget) - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do within("section", text: group.name) { click_link "Add heading" } end diff --git a/spec/system/admin/budgets_wizard/groups_spec.rb b/spec/system/admin/budgets_wizard/groups_spec.rb index 71e170b16..47e8581ed 100644 --- a/spec/system/admin/budgets_wizard/groups_spec.rb +++ b/spec/system/admin/budgets_wizard/groups_spec.rb @@ -114,7 +114,7 @@ describe "Budgets wizard, groups step", :admin do visit admin_budget_path(budget) - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do expect(page).to have_css "h4", exact_text: "Group without typos" end end diff --git a/spec/system/admin/budgets_wizard/headings_spec.rb b/spec/system/admin/budgets_wizard/headings_spec.rb index 986703434..0a093ed8f 100644 --- a/spec/system/admin/budgets_wizard/headings_spec.rb +++ b/spec/system/admin/budgets_wizard/headings_spec.rb @@ -138,7 +138,7 @@ describe "Budgets wizard, headings step", :admin do visit admin_budget_path(budget) - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do within("tbody tr") { expect(page).to have_content "Heading without typos" } end end diff --git a/spec/system/admin/budgets_wizard/wizard_spec.rb b/spec/system/admin/budgets_wizard/wizard_spec.rb index a5b3f2330..bce830d92 100644 --- a/spec/system/admin/budgets_wizard/wizard_spec.rb +++ b/spec/system/admin/budgets_wizard/wizard_spec.rb @@ -24,7 +24,7 @@ describe "Budgets creation wizard", :admin do click_link "Finish" - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do expect(page).to have_content "Single heading budget" within "tbody" do @@ -111,7 +111,7 @@ describe "Budgets creation wizard", :admin do click_link "Finish" - within "section", text: "Groups and headings" do + within "section", text: "Heading groups" do within "section", text: "All city" do within_table "Headings in All city" do expect(page).to have_css "tbody tr", count: 1