Files
WMS/tests/Browser/Auth/AuthBrandingLayoutBrowserTest.php
T
2026-06-19 12:28:03 +01:00

33 lines
1.0 KiB
PHP

<?php
namespace Tests\Browser\Auth;
use Laravel\Dusk\Browser;
use Tests\DuskTestCase;
class AuthBrandingLayoutBrowserTest extends DuskTestCase
{
/**
* 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') => 'Log in',
route('register') => 'Register',
route('password.request') => 'Forgot',
];
foreach ($pages as $page => $expectedText) {
$this->browse(function (Browser $browser) use ($page, $expectedText): void {
$browser->resize(1280, 900)
->visit($page)
->waitFor('[data-dusk="page-ready"]')
->assertSee('WMS')
->assertSee($expectedText)
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1');
});
}
}
}