Exclude open-ended questions from managing physical votes

Also make the :yes_no factory trait create a votation_type_unique
by default, since yes/no questions should always be unique.
This commit is contained in:
taitus
2025-08-22 14:26:25 +02:00
parent f3050a1aa5
commit b1cb6f8372
10 changed files with 55 additions and 5 deletions

View File

@@ -16,4 +16,13 @@ describe Officing::Results::FormComponent do
expect(page).to have_field "Invalid ballots", with: 0, type: :number
expect(page).to have_field "Valid ballots", with: 0, type: :number
end
it "does not render open-ended questions" do
create(:poll_question_open, poll: poll, title: "What do you want?")
render_inline Officing::Results::FormComponent.new(poll, Poll::OfficerAssignment.none)
expect(page).not_to have_content "What do you want?"
expect(page).to have_css "fieldset", text: "Agreed?"
end
end