Adds Inventory Sync toggle include_foundations (default true) + persistence tests Adds Coverage “Dependencies” column (✅/—) derived deterministically from graph_contracts (no Graph calls) Spec/tasks/checklists updated + tasks ticked off Co-authored-by: Ahmed Darrazi <ahmeddarrazi@adsmac.local> Reviewed-on: #51
32 lines
883 B
PHP
32 lines
883 B
PHP
<?php
|
|
|
|
use App\Filament\Pages\InventoryCoverage;
|
|
use App\Filament\Pages\InventoryLanding;
|
|
use App\Models\Tenant;
|
|
use App\Models\User;
|
|
|
|
uses(\Illuminate\Foundation\Testing\RefreshDatabase::class);
|
|
|
|
test('inventory landing and coverage pages load for a tenant', function () {
|
|
$tenant = Tenant::factory()->create();
|
|
|
|
$user = User::factory()->create();
|
|
$user->tenants()->syncWithoutDetaching([
|
|
$tenant->getKey() => ['role' => 'owner'],
|
|
]);
|
|
|
|
$this->actingAs($user)
|
|
->get(InventoryLanding::getUrl(tenant: $tenant))
|
|
->assertOk()
|
|
->assertSee('Run Inventory Sync');
|
|
|
|
$this->actingAs($user)
|
|
->get(InventoryCoverage::getUrl(tenant: $tenant))
|
|
->assertOk()
|
|
->assertSee('Coverage')
|
|
->assertSee('Policies')
|
|
->assertSee('Foundations')
|
|
->assertSee('Dependencies')
|
|
->assertSee('✅');
|
|
});
|