Fix missing "for" attribute in officer assignment label

Since this attribute was missing, the label wasn't correctly associated
with its field.
This commit is contained in:
Javi Martín
2024-10-12 17:49:51 +02:00
parent 3b7948a139
commit b68047f265
3 changed files with 5 additions and 5 deletions

View File

@@ -4,7 +4,7 @@
<%= form_tag(officing_poll_results_path(@poll), { id: "officer_assignment_form" }) do %>
<div class="row">
<div class="small-12 medium-6 column">
<label><%= t("officing.results.new.booth") %></label>
<%= 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") } %>

View File

@@ -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")

View File

@@ -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"