Hide "Maximum number of votes" message for unique and open-ended questions

The "Maximum number of votes" text in poll question show was unnecessary.
It appeared for both unique and open-ended questions, but it only makes
sense for questions that allow multiple answers.
This commit is contained in:
taitus
2025-10-13 12:36:35 +02:00
parent 69eaf66b93
commit d3f32978c8
2 changed files with 4 additions and 1 deletions

View File

@@ -88,6 +88,7 @@ describe "Admin poll questions", :admin do
expect(page).to have_content "Question with unique answer"
expect(page).to have_content "Unique answer"
expect(page).not_to have_content "Maximum number of votes"
end
scenario "Multiple" do
@@ -104,6 +105,7 @@ describe "Admin poll questions", :admin do
expect(page).to have_content "Question with multiple answers"
expect(page).to have_content "Multiple answers"
expect(page).to have_text "Maximum number of votes 6", normalize_ws: true
end
scenario "Open-ended" do
@@ -119,6 +121,7 @@ describe "Admin poll questions", :admin do
expect(page).to have_content "What do you want?"
expect(page).to have_content "Open-ended"
expect(page).not_to have_content "Maximum number of votes"
end
end
end