coolify/tests/Browser/LoginTest.php

28 lines
582 B
PHP
Raw Normal View History

<?php
namespace Tests\Browser;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
use Throwable;
class LoginTest extends DuskTestCase
{
/**
* A basic test for the login page.
* Login with the test user and assert that the user is redirected to the dashboard.
*
* @return void
2024-10-17 19:15:48 +00:00
*
* @throws Throwable
*/
public function testLogin()
{
2024-10-28 21:57:56 +00:00
$this->browse(callback: function (Browser $browser) {
$browser->loginWithRootUser()
2024-10-17 19:15:48 +00:00
->assertPathIs('/')
2024-10-28 21:57:56 +00:00
->assertSee('Dashboard');
});
}
}