Verified Commit e4c0f7a7 authored by Manuel Tancoigne's avatar Manuel Tancoigne
Browse files

fix(cucumber): Rename "CAPYBARA_DRIVER" variable to "BROWSER"

parent 14066dc7
Pipeline #496061417 passed with stages
in 19 minutes
......@@ -117,7 +117,7 @@ cucumber:
- apt-get -qq -o dir::cache::archives="apt-cache" install -y firefox-esr
- firefox --version
- bundle exec rails db:test:prepare
- CAPYBARA_DRIVER=firefox-headless bundle exec cucumber
- BROWSER=firefox-headless bundle exec cucumber
dependencies:
- bundle
artifacts:
......
......@@ -540,15 +540,13 @@ which makes HTML and png screenshots of pages when a step fails. Both HTML
and images screenshots are saved in `tmp/capybara_screenshots`.
By default, Cucumber will use Firefox to run the tests, but this can be
changed with the `CAPYBARA_DRIVER` environment variable:
changed with the `BROWSER` environment variable:
```sh
# Default with firefox
bundle exec cucumber
# Variants
CAPYBARA_DRIVER=firefox-headless bundle exec cucumber
CAPYBARA_DRIVER=chrome bundle exec cucumber
CAPYBARA_DRIVER=chrome-headless bundle exec cucumber
BROWSER=firefox-headless bundle exec cucumber
```
When using Chrome/Chromium, Cucumber steps will fail on Javascript
......
......@@ -2,7 +2,7 @@ require 'simplecov'
require 'capybara-screenshot/cucumber'
require 'selenium-webdriver'
browser = ENV['CAPYBARA_DRIVER'] || 'firefox'
browser = ENV['BROWSER'] || 'firefox'
Capybara.register_driver(:selenium) do |app|
# FIXME: Find a way to log JS from Firefox
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment