From bedcb5bca239c7621cd04ef20cdb0fb50b1514b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Javi=20Mart=C3=ADn?= Date: Sat, 14 Sep 2024 16:52:31 +0200 Subject: [PATCH] Don't include videos in proposal factories Since August 29, probably due to a change in the browser used by GitHub Actions (since branches whose code we didn't change were suddenly affected that day), many tests related to proposals are failing on GitHub Actions. Although every time the test suite is run different tests fail, on each run at least half a dozen tests fail. Most tests have one thing in common: they click on an element on the `proposals#show` page, and the click isn't done correctly. One possible explanation is that the video included on the page causes the page to scroll at the exact same time that Capybara is clicking on a link, which results in a misclick. I haven't been able to reproduce the issue on my machine, so I'm not sure whether giving the video element a fixed height using CSS (so the page doesn't scroll when the iframe is loaded) could solve the issue. But, after using proposals without videos in the tests (except the tests testing the videos themselves), all these tests are passing in the test suite. So, for now, we're simply removing the videos in the proposal factories. Note this issue wasn't caused by the "no cookie" changes done in commit ee64efe6597, since running the tests in Cosul Democracy 2.1.1 (which didn't contain those changes) also fails on GitHub Actions. --- spec/factories/proposals.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/spec/factories/proposals.rb b/spec/factories/proposals.rb index 052f67f3b..0330eeafa 100644 --- a/spec/factories/proposals.rb +++ b/spec/factories/proposals.rb @@ -3,7 +3,6 @@ FactoryBot.define do sequence(:title) { |n| "Proposal #{n} title" } sequence(:summary) { |n| "In summary, what we want is... #{n}" } description { "Proposal description" } - video_url { "https://youtu.be/nhuNb0XtRhQ" } responsible_name { "John Snow" } terms_of_service { "1" } published_at { Time.current }