mirror of
https://github.com/mastodon/mastodon.git
synced 2025-07-12 15:33:14 +00:00

Some checks failed
Check formatting / lint (push) Has been cancelled
Ruby Linting / lint (push) Has been cancelled
Historical data migration test / pre_job (push) Has been cancelled
Ruby Testing / build (production) (push) Has been cancelled
Ruby Testing / build (test) (push) Has been cancelled
Historical data migration test / test (14-alpine) (push) Has been cancelled
Historical data migration test / test (15-alpine) (push) Has been cancelled
Ruby Testing / test (.ruby-version) (push) Has been cancelled
Ruby Testing / test (3.1) (push) Has been cancelled
Ruby Testing / test (3.2) (push) Has been cancelled
Ruby Testing / Libvips tests (.ruby-version) (push) Has been cancelled
Ruby Testing / Libvips tests (3.1) (push) Has been cancelled
Ruby Testing / Libvips tests (3.2) (push) Has been cancelled
Ruby Testing / End to End testing (.ruby-version) (push) Has been cancelled
Ruby Testing / End to End testing (3.1) (push) Has been cancelled
Ruby Testing / End to End testing (3.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, docker.elastic.co/elasticsearch/elasticsearch:8.10.2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (.ruby-version, opensearchproject/opensearch:2) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.1, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
Ruby Testing / Elastic Search integration testing (3.2, docker.elastic.co/elasticsearch/elasticsearch:7.17.13) (push) Has been cancelled
37 lines
905 B
Ruby
37 lines
905 B
Ruby
# frozen_string_literal: true
|
|
|
|
Capybara.server_host = 'localhost'
|
|
Capybara.server_port = 3000
|
|
Capybara.app_host = "http://#{Capybara.server_host}:#{Capybara.server_port}"
|
|
|
|
require 'selenium/webdriver'
|
|
|
|
Capybara.register_driver :chrome do |app|
|
|
Capybara::Selenium::Driver.new(app, browser: :chrome)
|
|
end
|
|
|
|
Capybara.register_driver :headless_chrome do |app|
|
|
options = Selenium::WebDriver::Chrome::Options.new
|
|
options.add_argument '--headless=new'
|
|
options.add_argument '--window-size=1680,1050'
|
|
options.add_option('goog:loggingPrefs', { performance: 'ALL' })
|
|
|
|
Capybara::Selenium::Driver.new(
|
|
app,
|
|
browser: :chrome,
|
|
options: options
|
|
)
|
|
end
|
|
|
|
Capybara.javascript_driver = :headless_chrome
|
|
|
|
RSpec.configure do |config|
|
|
config.before(:each, type: :system) do
|
|
driven_by :rack_test
|
|
end
|
|
|
|
config.before(:each, :js, type: :system) do
|
|
driven_by Capybara.javascript_driver
|
|
end
|
|
end
|