From 8ba37b295a7a6fe0fe0b584b089751774768f666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Mon, 18 Mar 2024 15:09:17 +0100 Subject: [PATCH] Temporarily disable a test that fails sometimes This test is failing often due to an "Unable to autoload constant" error, that will be fixed after switching to zeitwerk. Just like it happened in the the "Polls can be listed" test, the reason seems to be accessing a page containing several ActiveStorage attachments. However, since this test only makes sense when two or more images are displayed on the page, we can't change the test so create just one image. So, for now, we're commenting the test, and we'll uncomment it again when we enable zeitwerk in version 2.2.0. --- spec/system/polls/polls_spec.rb | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/spec/system/polls/polls_spec.rb b/spec/system/polls/polls_spec.rb index 07880bf99..bf00eb20a 100644 --- a/spec/system/polls/polls_spec.rb +++ b/spec/system/polls/polls_spec.rb @@ -210,23 +210,24 @@ describe "Polls" do expect("Second question").to appear_before("Third question") end - scenario "Buttons to slide through images work back and forth" do - question = create(:poll_question, :yes_no, poll: poll) - create(:image, imageable: question.question_answers.last, title: "The no movement") - create(:image, imageable: question.question_answers.last, title: "No movement planning") + # TODO: uncomment after switching to zeitwerk + # scenario "Buttons to slide through images work back and forth" do + # question = create(:poll_question, :yes_no, poll: poll) + # create(:image, imageable: question.question_answers.last, title: "The no movement") + # create(:image, imageable: question.question_answers.last, title: "No movement planning") - visit poll_path(poll) + # visit poll_path(poll) - within(".orbit-bullets") do - find("[data-slide='1']").click + # within(".orbit-bullets") do + # find("[data-slide='1']").click - expect(page).to have_css ".is-active[data-slide='1']" + # expect(page).to have_css ".is-active[data-slide='1']" - find("[data-slide='0']").click + # find("[data-slide='0']").click - expect(page).to have_css ".is-active[data-slide='0']" - end - end + # expect(page).to have_css ".is-active[data-slide='0']" + # end + # end scenario "Non-logged in users" do create(:poll_question, :yes_no, poll: poll)