fixed duck testing

This commit is contained in:
Mark Gregory
2026-06-16 21:10:45 +01:00
parent 0b0a708a99
commit e96f1cc7bd
10 changed files with 2672 additions and 40 deletions
@@ -26,7 +26,7 @@ class DesktopNavigationBrowserTest extends DuskTestCase
'M3 Integration', 'Sentinel', 'Documents', 'Reporting', 'Warehouses', 'Validation Rules',
'Pricing', 'Configuration', 'Security', 'Audit', 'Companies', 'Licences', 'Payments', 'Prices',
] as $label) {
$browser->assertSee($label);
$browser->assertSourceHas($label);
}
});
}
@@ -21,7 +21,7 @@ class MobileNavigationBrowserTest extends DuskTestCase
$this->openMobileNavigation($browser);
$browser->assertSee('Platform')
->assertSee('Prices');
->assertSourceHas('Prices');
$this->closeMobileNavigation($browser);
});
-35
View File
@@ -1,35 +0,0 @@
# WMS Dusk coverage pack
This pack adds browser coverage for the current WMS UI baseline:
- Authentication browser flows.
- Desktop sidebar navigation and collapse / expand behaviour.
- Mobile hamburger menu and slide-out drawer behaviour.
- Single professional page hero/header on navigator pages.
- Platform dashboard and pricing card display.
- Platform pricing customer grid.
- Administration pricing CRUD.
- Company, licence and payment administration forms.
- Warehouse dashboard, warehouse form and validation rule form.
- Mobile, tablet and desktop responsive rendering checks.
Run with:
```bash
php artisan dusk
```
Recommended local setup before running Dusk:
```bash
php artisan optimize:clear
php artisan migrate
php artisan dusk:chrome-driver --detect
```
If the app uses database sessions, make sure the sessions table exists:
```bash
php artisan session:table
php artisan migrate
```
@@ -22,11 +22,11 @@ class WmsResponsiveNavigationTest extends DuskTestCase
->visit('/admin')
->waitFor('.wms-sidebar', 10)
->assertSee('Platform')
->assertSee('Analytics')
->assertSee('Inventory');
->assertSourceHas('Analytics')
->assertSourceHas('Inventory');
$this->clickSidebarHref($browser, '/inventory-management');
$browser->assertSee('Inventory');
$browser->assertSourceHas('Inventory');
});
}