Browse Source

Migrate webdriver configuration

rails6
Jérémy Lecour 1 year ago
parent
commit
a7010d7689
2 changed files with 1 additions and 12 deletions
  1. +1
    -1
      test/application_system_test_case.rb
  2. +0
    -11
      test/test_helper.rb

+ 1
- 1
test/application_system_test_case.rb View File

@ -4,7 +4,7 @@
require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
driven_by :headless_chrome
driven_by :selenium, using: :headless_chrome, screen_size: [1400, 1400]
def teardown
Warden.test_reset!


+ 0
- 11
test/test_helper.rb View File

@ -39,17 +39,6 @@ class ActiveSupport::TestCase
include ChexpireAssertions
end
# Capybara configuration
Capybara.register_driver :headless_chrome do |app|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
"chromeOptions" => { args: %w[headless disable-gpu] + ["window-size=1280,800"] },
)
Capybara::Selenium::Driver.new app, browser: :chrome, desired_capabilities: capabilities
end
Capybara.save_path = Rails.root.join("tmp/capybara")
Capybara.javascript_driver = :headless_chrome
Capybara.default_driver = :headless_chrome
# Disable Open4 real system calls
# require "open4"
# require "errors"


Loading…
Cancel
Save