33 lines
1.0 KiB
PHP
Executable File
33 lines
1.0 KiB
PHP
Executable File
<?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');
|
|
});
|
|
}
|
|
}
|
|
}
|