From 5a7298cefcdd33f781cde70648eda1f7c44c1d52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 27 Mar 2021 13:06:53 +0100 Subject: [PATCH] Explicitly disable JS in legislation answer tests The user experience with JavaScript enabled is actually very bad; there's a usability issue here because it's impossible to change an answer once a "radio button" is selected, which goes against the standard practice on basically any HTML form. Issue 4123 already mentions this problem. Until we fix it, we're disabling JavaScript in these tests. --- spec/system/legislation/questions_spec.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/system/legislation/questions_spec.rb b/spec/system/legislation/questions_spec.rb index 10deb9a95..a83b377d7 100644 --- a/spec/system/legislation/questions_spec.rb +++ b/spec/system/legislation/questions_spec.rb @@ -63,7 +63,7 @@ describe "Legislation" do expect(page).not_to have_content("Next question") end - scenario "answer question" do + scenario "answer question", :no_js do question = process.questions.first create(:legislation_question_option, question: question, value: "Yes") create(:legislation_question_option, question: question, value: "No") @@ -93,7 +93,7 @@ describe "Legislation" do expect(option.reload.answers_count).to eq(1) end - scenario "cannot answer question when phase not open" do + scenario "cannot answer question when phase not open", :no_js do process.update!(debate_end_date: Date.current - 1.day) question = process.questions.first create(:legislation_question_option, question: question, value: "Yes")