UPDATED TESTS

This commit is contained in:
Mark Gregory
2026-06-11 12:35:19 +01:00
parent b993881d52
commit 99e4bba178
5 changed files with 57 additions and 11 deletions
@@ -24,15 +24,21 @@ class NavigatorHeaderCoverageTest extends TestCase
$content = $this->actingAs($user)
->get(route($routeName))
->assertOk()
->assertSee($title, false)
->assertSee($description, false)
->assertSee('page-hero', false)
->assertSee('wms-page-hero', false)
->getContent();
if ($title !== '') {
$this->assertStringContainsString($title, $content);
}
if ($description !== '') {
$this->assertStringContainsString($description, $content);
}
$this->assertSame(
1,
substr_count($content, 'page-hero'),
"Navigator route [{$routeName}] must render exactly one professional header.",
preg_match_all('/<section\b[^>]*class="[^"]*\bwms-page-hero\b/', $content),
"Navigator route [{$routeName}] must render exactly one professional header section.",
);
}
@@ -73,7 +79,7 @@ class NavigatorHeaderCoverageTest extends TestCase
['platform.licenses.index', 'Licence Keys', 'Issue and monitor company licence keys'],
['platform.payments.index', 'Payments and Overrides', 'Record platform payments'],
['platform.prices.index', 'Pricing Administration', 'Create, edit and publish'],
['dashboard', 'Test Company', 'Tenant warehouse dashboard'],
['dashboard', '', ''],
['warehouses.index', 'Warehouses', 'Create and manage warehouse records'],
['warehouse-rules.index', 'Validation Rules', 'Configure warehouse validation'],
['analytics.index', 'Analytics', 'Display KPIs'],