breakign dusk tests

This commit is contained in:
Mark Gregory
2026-06-19 12:28:03 +01:00
parent e21c09a005
commit ac694f8aae
26 changed files with 43 additions and 12 deletions
@@ -22,7 +22,7 @@ class AuthBrandingLayoutBrowserTest extends DuskTestCase
$this->browse(function (Browser $browser) use ($page, $expectedText): void {
$browser->resize(1280, 900)
->visit($page)
->waitFor('body', 10)
->waitFor('[data-dusk="page-ready"]')
->assertSee('WMS')
->assertSee($expectedText)
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1');
@@ -63,7 +63,7 @@ JS,
protected function openMobileNavigation(Browser $browser): void
{
$browser->resize(390, 844)
->waitFor('body', 10)
->waitFor('[data-dusk="page-ready"]')
->pause(250);
$this->removeDebugbar($browser);
@@ -20,7 +20,7 @@ class MobileNavigationBrowserTest extends DuskTestCase
$browser->loginAs($admin)
->resize(390, 844)
->visit('/admin')
->waitFor('body', 10)
->waitFor('[data-dusk="page-ready"]')
->assertSee('Platform')
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1');
@@ -47,7 +47,7 @@ class MobileNavigationBrowserTest extends DuskTestCase
$browser->loginAs($admin)
->resize(390, 844)
->visit('/admin')
->waitFor('body', 10);
->waitFor('[data-dusk="page-ready"]');
foreach ($paths as $path => $title) {
$this->openMobileNavigation($browser);
@@ -66,7 +66,7 @@ class MobileNavigationBrowserTest extends DuskTestCase
$browser->loginAs($admin)
->resize(390, 844)
->visit('/admin')
->waitFor('body', 10)
->waitFor('[data-dusk="page-ready"]')
->assertSee('Platform')
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1')
->resize(768, 1024)
@@ -38,7 +38,7 @@ class WmsResponsiveNavigationTest extends DuskTestCase
$browser->loginAs($admin)
->resize(390, 844)
->visit('/admin')
->waitFor('body', 10)
->waitFor('[data-dusk="page-ready"]')
->assertSee('Platform')
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1');
@@ -59,7 +59,7 @@ class WmsResponsiveNavigationTest extends DuskTestCase
$browser->loginAs($admin)
->resize(390, 844)
->visit('/admin')
->waitFor('body', 10);
->waitFor('[data-dusk="page-ready"]');
$this->openMobileNavigation($browser);
$this->closeMobileNavigation($browser);