Update: Added system tests Update: More specific cookie names to avoid inter-app collisions
21 lines
497 B
Ruby
21 lines
497 B
Ruby
require "test_helper"
|
|
require "webdrivers"
|
|
|
|
Capybara.server = :webrick
|
|
|
|
Capybara.register_driver(:headless_chrome) do |app|
|
|
capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
|
|
chromeOptions: { args: %w[headless disable-gpu] }
|
|
)
|
|
|
|
Capybara::Selenium::Driver.new(
|
|
app,
|
|
browser: :chrome,
|
|
desired_capabilities: capabilities
|
|
)
|
|
end
|
|
|
|
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
|
|
driven_by :selenium, using: :chrome, screen_size: [1400, 1400]
|
|
end
|