-
-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Description
Certain assertions/browser action methods throw the following error when they fail:
While others throw a more expected exception type:
Reproduction
- Create new zero app:
composer create-project --prefer-dist laravel-zero/laravel-zero example-cli
- Install dusk component:
./application app:install console-dusk
- Install chrome driver (and chrome if you havent already)
./application dusk:chrome-driver
- Add code to command and call command:
public function handle(): void
{
$this->browse(function ($browser) {
$browser->visit('https://laravel-zero.com')
->assertSee('Something that makes this fail.');
});
}
This will throw the first exception as noted above.
- Change the
assertSee
method toassertTitle
and re run your command, this should now produce an expectedExpectationFailedException
exception.
From what I can tell, the first seems to be caused by the lack of some php unit configuration/initialization process. It's unclear what I have to add to my laravel zero application for the the assertion exception type to be correct here. Im uncertain what all assertion methods are affected as well, it seems some work as expected and others dont. The first exception is not ideal for error handling within my application.
Metadata
Metadata
Assignees
Labels
No labels