Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
easily toggle between headless and browser in your system tests
require "test_helper"
class ApplicationSystemTestCase < ActionDispatch::SystemTestCase
# Watch tests execute in the browser with `WATCH=true` in your environment
# ex: WATCH=true bin/rails test:system
driven_by :selenium, using: ENV["WATCH"] == "true" ? :chrome : :headless_chrome
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.