-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
08d832b
commit 4fa4a93
Showing
9 changed files
with
83 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
require "capybara/rails" | ||
require "capybara/rspec" | ||
require "rack/utils" | ||
require "byebug" | ||
|
||
require "selenium/webdriver" | ||
|
||
Capybara.register_driver :chrome do |app| | ||
Capybara::Selenium::Driver.new app, | ||
browser: :chrome | ||
end | ||
|
||
Capybara.register_driver :selenium_chrome_headless do |app| | ||
options = Selenium::WebDriver::Chrome::Options.new | ||
options.add_argument("--window-size=1440,1024") | ||
options.add_argument("--headless=new") | ||
options.add_argument("--disable-gpu") # Temporarily needed if running on Windows. | ||
options.add_argument("--no-sandbox") | ||
options.add_argument("--disable-dev-shm-usage") | ||
|
||
Capybara::Selenium::Driver.new(app, | ||
browser: :chrome, | ||
options: options | ||
) | ||
end | ||
|
||
# ENABLE :chrome AS THE DRIVER BELOW FOR DEBUGGING | ||
# Capybara.javascript_driver = :chrome | ||
Capybara.javascript_driver = :selenium_chrome_headless | ||
|
||
Capybara.app = Rack::ShowExceptions.new(Dabbleme::Application) | ||
Capybara.server_port = 64515 | ||
Capybara.default_max_wait_time = 60 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters