-
Notifications
You must be signed in to change notification settings - Fork 2.2k
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
[Laravel 6] Add support for Laravel Dusk tests #4919
Conversation
Replaces the original Selenium browser testing. Refs: https://laravel.com/docs/6.x/dusk
The BrowserTestCase and PluginTestCase classes are intended to be available to plugins. This change uses traits to share common code between them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Still need a PR to the docs documenting all this stuff now and an update the L6 upgrade guide
How can we protect users from this? |
@LukeTowers There's a couple of things in play already to prevent this from happening:
It could be possible that with that message, they're referring to the Dusk routes they provide in their service provider, which can basically let you log in as any user. They don't actually work with October, so we could potentially extend the Service Provider and just remove those routes. |
@bennothommo I would feel most comfortable if we removed those routes entirely. |
@LukeTowers instead of extending the service provider, I've just disabled auto-discovery for Laravel Dusk, and am using the |
This is ready to review and merge into the main L6 branch. I'll add the tests/README.md changes to the October docs once reviewed. |
LGTM! |
@bennothommo actually have we dealt with re: unit tests related to rainlab/translate-plugin#509 & rainlab/translate-plugin#546 Model::clearBootedModels();
Model::clearExtendedClasses();
Model::flushDuplicateCache(); Should we also add |
The Browser tests will be made into a RainLab plugin. (https://github.com/rainlab/dusk-plugin)
Forms part of work done in #4893. Replaces #3051.
This implements support for Laravel Dusk, a more friendly way for doing comprehensive browser-based testing.
This PR significantly refactors the testing base to allow these tests to be included for both core, as well as a part of plugins.