Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[6.x] Add Dusk command argument --browse #870

Merged
merged 4 commits into from
Feb 11, 2021

Conversation

derekmd
Copy link
Contributor

@derekmd derekmd commented Feb 11, 2021

For existing Laravel apps to start using the --browse argument they need to run php artisan dusk:install. This updates the tests/DuskTestCase.php stub class in their app's code base.

This is a merge-ready implementation of #864 started by @crynobone.

During local dev, Chromedriver headless mode can be disabled by calling:

php artisan dusk --browse

or

php artisan dusk:fails --browse

When Chromedriver's failing test screenshot doesn't capture enough, this allows devs to further debug by showing the live browser window while tests run.

When environment variable CI is set, the --browse argument is ignored and headless mode is always used. This variable is configured by most CI services (GitHub Actions, CircleCI, TravisCI, etc.) and no windowing system is available in those OS environments so Google Chrome cannot be opened.

Allow headless mode to be disabled by calling:

php artisan dusk --browse

This will instead show the browser window in
the viewport while tests run.

--browse cannot be used if CI=true is set
in the local environment, which GitHub Actions,
TravisCI, CircleCI, GitLab, etc. all
configure.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants