assertTrue(Route::has($routeName), "Missing navigator route [{$routeName}]."); $user = User::factory()->mpbaPlatformAdmin()->create(); $content = $this->actingAs($user) ->get(route($routeName)) ->assertOk() ->assertSee($title, false) ->assertSee($description, false) ->assertSee('page-hero', false) ->getContent(); $this->assertSame( 1, substr_count($content, 'page-hero'), "Navigator route [{$routeName}] must render exactly one professional header.", ); } /** * Ensure the platform dashboard keeps pricing cards visible on Platform. */ public function test_platform_dashboard_keeps_pricing_display_cards(): void { $user = User::factory()->mpbaPlatformAdmin()->create(); $this->actingAs($user) ->get(route('platform.dashboard')) ->assertOk() ->assertSee('Pricing plans', false) ->assertSee(route('platform.pricing.index'), false) ->assertSee(route('platform.prices.index'), false); } /** * Ensure the public Platform pricing route is separate from Administration price CRUD. */ public function test_pricing_routes_are_in_correct_platform_and_administration_menus(): void { $this->assertSame('/platform/pricing', parse_url(route('platform.pricing.index'), PHP_URL_PATH)); $this->assertSame('/admin/prices', parse_url(route('platform.prices.index'), PHP_URL_PATH)); $this->assertSame('/admin/prices/create', parse_url(route('platform.prices.create'), PHP_URL_PATH)); } /** * @return array */ public static function navigatorPages(): array { return [ ['platform.dashboard', 'Platform Dashboard', 'System-level tenant'], ['platform.pricing.index', 'Pricing', 'Clear platform pricing'], ['platform.companies.index', 'Companies', 'Manage tenant companies'], ['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'], ['warehouses.index', 'Warehouses', 'Create and manage warehouse records'], ['warehouse-rules.index', 'Validation Rules', 'Configure warehouse validation'], ['analytics.index', 'Analytics', 'Display KPIs'], ['inventory-management.index', 'Inventory Management', 'Track inventory movement'], ['replenishment.index', 'Replenishment', 'Configure replenishment thresholds'], ['shipping.index', 'Shipping', 'Monitor shipment activity'], ['transportation.index', 'Transportation', 'Manage truck closure'], ['carrier-management.index', 'Carrier Management', 'Maintain carriers'], ['m3-integration.index', 'M3 Integration', 'Observe M3 transactions'], ['sentinel-integration.index', 'Sentinel Integration', 'Track Sentinel API activity'], ['document-archive.index', 'Document Archive', 'Search cached Sentinel documents'], ['reporting.index', 'Reporting', 'Provide operational reports'], ['configuration.index', 'Configuration', 'Centralise system settings'], ['security.index', 'Security', 'Control roles'], ['audit.index', 'Audit', 'Review activity logs'], ]; } }