From b68047f2652a434a2995cb3e082949921ad0313a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 12 Oct 2024 17:49:51 +0200 Subject: [PATCH] Fix missing "for" attribute in officer assignment label Since this attribute was missing, the label wasn't correctly associated with its field. --- app/views/officing/results/new.html.erb | 2 +- spec/system/budget_polls/ballot_sheets_spec.rb | 4 ++-- spec/system/officing/results_spec.rb | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/views/officing/results/new.html.erb b/app/views/officing/results/new.html.erb index 45aa443a3..aba3e17da 100644 --- a/app/views/officing/results/new.html.erb +++ b/app/views/officing/results/new.html.erb @@ -4,7 +4,7 @@ <%= form_tag(officing_poll_results_path(@poll), { id: "officer_assignment_form" }) do %>
- + <%= label_tag :officer_assignment_id, t("officing.results.new.booth") %> <%= select_tag :officer_assignment_id, booths_for_officer_select_options(@officer_assignments), { prompt: t("officing.results.new.select_booth") } %> diff --git a/spec/system/budget_polls/ballot_sheets_spec.rb b/spec/system/budget_polls/ballot_sheets_spec.rb index 91c6aab56..931ce8d1c 100644 --- a/spec/system/budget_polls/ballot_sheets_spec.rb +++ b/spec/system/budget_polls/ballot_sheets_spec.rb @@ -103,7 +103,7 @@ describe "Poll budget ballot sheets" do scenario "Ballot sheet is saved" do visit new_officing_poll_ballot_sheet_path(poll) - select booth.name, from: "officer_assignment_id" + select booth.name, from: "Booth" fill_in "data", with: "1234;5678" click_button "Save" @@ -119,7 +119,7 @@ describe "Poll budget ballot sheets" do scenario "Ballot sheet is not saved" do visit new_officing_poll_ballot_sheet_path(poll) - select booth.name, from: "officer_assignment_id" + select booth.name, from: "Booth" click_button "Save" expect(page).to have_content("CSV data can't be blank") diff --git a/spec/system/officing/results_spec.rb b/spec/system/officing/results_spec.rb index a3147093d..59abe9497 100644 --- a/spec/system/officing/results_spec.rb +++ b/spec/system/officing/results_spec.rb @@ -57,7 +57,7 @@ describe "Officing Results", :with_frozen_time do expect(page).not_to have_content("Your results") - select booth.name, from: "officer_assignment_id" + select booth.name, from: "Booth" fill_in "questions[#{question_1.id}][0]", with: "100" fill_in "questions[#{question_1.id}][1]", with: "200" @@ -100,7 +100,7 @@ describe "Officing Results", :with_frozen_time do visit new_officing_poll_result_path(poll) booth_name = partial_result.booth_assignment.booth.name - select booth_name, from: "officer_assignment_id" + select booth_name, from: "Booth" fill_in "questions[#{question_1.id}][0]", with: "5555" fill_in "questions[#{question_1.id}][1]", with: "200"