From 9b09e52bb07c03cd8741ba4501fb63154676e44c Mon Sep 17 00:00:00 2001 From: Joonas Date: Thu, 11 Apr 2024 16:53:17 +0300 Subject: [PATCH] Remove selenium override and inherit from core --- .../iframe/test/rspec_support/capybara.rb | 26 ------------------- spec/spec_helper.rb | 2 -- 2 files changed, 28 deletions(-) delete mode 100644 lib/decidim/iframe/test/rspec_support/capybara.rb diff --git a/lib/decidim/iframe/test/rspec_support/capybara.rb b/lib/decidim/iframe/test/rspec_support/capybara.rb deleted file mode 100644 index 8e49615..0000000 --- a/lib/decidim/iframe/test/rspec_support/capybara.rb +++ /dev/null @@ -1,26 +0,0 @@ -# frozen_string_literal: true - -# This re-registration file is made because of problems with chromedriver v.120 -# Selenium methods are undefined without this change -# More info in PR #12160 - -require "selenium-webdriver" - -module Decidim - Capybara.register_driver :headless_chrome do |app| - options = Selenium::WebDriver::Chrome::Options.new - - options.add_argument("--headless=new") if ENV["HEADLESS"] - options.add_argument("--no-sandbox") - - window_size = ENV["BIG_SCREEN_SIZE"].present? ? "1920,3000" : "1920,1080" - options.add_argument("--window-size=#{window_size}") - - options.add_argument("--ignore-certificate-errors") if ENV["TEST_SSL"] - Capybara::Selenium::Driver.new( - app, - browser: :chrome, - options: - ) - end -end diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index a9e50e4..db9aba6 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -12,5 +12,3 @@ # This re-registration is made because of problems with chromedriver v.120 # Selenium methods are undefined without this change # More info in PR #12160 - -require "#{Dir.pwd}/lib/decidim/iframe/test/rspec_support/capybara.rb"