add dusk tests

This commit is contained in:
Andras Bacsai
2024-10-28 22:57:56 +01:00
parent bb7184b3ff
commit 2eef8ee433
10 changed files with 117 additions and 64 deletions

View 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');
});
}
}