breakign dusk tests

This commit is contained in:
Mark Gregory
2026-06-19 11:35:58 +01:00
parent 978b477de3
commit 9e633b6e5b
7 changed files with 133 additions and 90 deletions
@@ -8,22 +8,23 @@ use Tests\DuskTestCase;
class AuthBrandingLayoutBrowserTest extends DuskTestCase
{
/**
* Ensure guest authentication pages keep the professional WMS branding and do not overflow horizontally.
* Ensure guest authentication pages keep the WMS auth shell and do not overflow horizontally.
*/
public function test_guest_authentication_pages_are_branded_and_do_not_overflow(): void
{
$pages = [
route('login'),
route('register'),
route('password.request'),
route('login') => 'Log in',
route('register') => 'Register',
route('password.request') => 'Forgot',
];
foreach ($pages as $page) {
$this->browse(function (Browser $browser) use ($page): void {
foreach ($pages as $page => $expectedText) {
$this->browse(function (Browser $browser) use ($page, $expectedText): void {
$browser->resize(1280, 900)
->visit($page)
->waitFor('body', 10)
->assertSee('WMS')
->assertSee('Warehouse Management System')
->assertSee($expectedText)
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1');
});
}