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

@@ -18,15 +18,10 @@ class LoginTest extends DuskTestCase
*/
public function testLogin()
{
$email = 'test@example.com';
$password = 'password';
$this->browse(function (Browser $browser) use ($password, $email) {
$browser->visit('/login')
->type('email', $email)
->type('password', $password)
->press('Login')
$this->browse(callback: function (Browser $browser) {
$browser->loginWithRootUser()
->assertPathIs('/')
->screenshot('login');
->assertSee('Dashboard');
});
}
}