add dusk tests
This commit is contained in:
21
app/Providers/DuskServiceProvider.php
Normal file
21
app/Providers/DuskServiceProvider.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace App\Providers;
|
||||
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class DuskServiceProvider extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register Dusk's browser macros.
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
\Laravel\Dusk\Browser::macro('loginWithRootUser', function () {
|
||||
return $this->visit('/login')
|
||||
->type('email', 'test@example.com')
|
||||
->type('password', 'password')
|
||||
->press('Login');
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user