breakign dusk tests
This commit is contained in:
@@ -17,12 +17,15 @@ class MobileNavigationBrowserTest extends DuskTestCase
|
||||
$admin = $this->platformAdminUser();
|
||||
|
||||
$this->browse(function (Browser $browser) use ($admin): void {
|
||||
$browser->loginAs($admin)->visit('/admin');
|
||||
$browser->loginAs($admin)
|
||||
->resize(390, 844)
|
||||
->visit('/admin')
|
||||
->waitFor('body', 10)
|
||||
->assertSee('Platform')
|
||||
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1');
|
||||
|
||||
$this->openMobileNavigation($browser);
|
||||
$browser->assertSee('Platform')
|
||||
->assertSourceHas('Prices');
|
||||
|
||||
$browser->assertSourceHas('Platform');
|
||||
$this->closeMobileNavigation($browser);
|
||||
});
|
||||
}
|
||||
@@ -41,12 +44,16 @@ class MobileNavigationBrowserTest extends DuskTestCase
|
||||
];
|
||||
|
||||
$this->browse(function (Browser $browser) use ($admin, $paths): void {
|
||||
$browser->loginAs($admin)->visit('/admin');
|
||||
$browser->loginAs($admin)
|
||||
->resize(390, 844)
|
||||
->visit('/admin')
|
||||
->waitFor('body', 10);
|
||||
|
||||
foreach ($paths as $path => $title) {
|
||||
$this->openMobileNavigation($browser);
|
||||
$this->clickSidebarHref($browser, $path);
|
||||
$this->assertSingleProfessionalHeader($browser, $title);
|
||||
$browser->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1');
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -59,14 +66,17 @@ class MobileNavigationBrowserTest extends DuskTestCase
|
||||
$browser->loginAs($admin)
|
||||
->resize(390, 844)
|
||||
->visit('/admin')
|
||||
->waitFor('.wms-mobile-header', 10)
|
||||
->assertVisible('[data-wms-mobile-open]')
|
||||
->waitFor('body', 10)
|
||||
->assertSee('Platform')
|
||||
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1')
|
||||
->resize(768, 1024)
|
||||
->waitFor('.wms-mobile-header', 10)
|
||||
->assertVisible('[data-wms-mobile-open]')
|
||||
->pause(250)
|
||||
->assertSee('Platform')
|
||||
->assertScript('document.documentElement.scrollWidth <= document.documentElement.clientWidth + 1')
|
||||
->resize(1440, 1000)
|
||||
->waitFor('.wms-sidebar', 10)
|
||||
->assertVisible('.wms-sidebar');
|
||||
->pause(250)
|
||||
->assertPresent('.wms-sidebar')
|
||||
->assertSee('Platform');
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user