Skip to content

Commit

Permalink
test tweak
Browse files Browse the repository at this point in the history
  • Loading branch information
amtuannguyen committed Aug 27, 2024
1 parent ed4e78d commit d738c48
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions test/application_system_test_case.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,11 @@ def setup
user = FactoryGirl.create(:user)
login_as(user, role: User::STAFF)
end

selenium_remote_url = "http://#{ENV.fetch('SELENIUM_SERVER')}:4444"

driven_by :selenium, using: :headless_chrome, screen_size: [1280, 800],
options: { browser: :remote, url: "http://#{ENV.fetch('SELENIUM_SERVER')}:4444"} do |chrome_options|
options: { browser: :remote, url: selenium_remote_url} do |chrome_options|
chrome_options.add_argument('--disable-gpu')
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
Expand All @@ -31,7 +33,9 @@ def setup
# Remote driver setup
Capybara.register_driver :selenium do |app|
Capybara::Selenium::Driver.new(app,
options: chrome_options
browser: :remote,
url: selenium_remote_url,
options: options
)
end
end
Expand Down

0 comments on commit d738c48

Please sign in to comment.