forked from tricknotes/ember-cli-rails
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace
poltergeist
with capybara-selenium
Fix CI Failures by executing feature tests against a headless Chrome browser instead of PhantomJS. Configure CI to use the `chrome` stable addon. Add a step to `bin/setup_ci` to install `chromedriver`.
- Loading branch information
1 parent
81bb2b3
commit 4b2f666
Showing
5 changed files
with
35 additions
and
6 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,7 @@ | ||
language: ruby | ||
sudo: false | ||
sudo: required | ||
addons: | ||
chrome: stable | ||
cache: | ||
- bundler | ||
notifications: | ||
|
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,19 @@ | ||
require "selenium/webdriver" | ||
|
||
Capybara.register_driver :chrome do |app| | ||
Capybara::Selenium::Driver.new(app, browser: :chrome) | ||
end | ||
|
||
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 | ||
|
||
Capybara.javascript_driver = :headless_chrome |