## Summary - replace the static Inventory Coverage HTML tables with a Filament native searchable, sortable, filterable table on the existing tenant page - normalize supported policy types and foundations into one runtime dataset while preserving centralized badge semantics and the documented read-only action-surface exemption - add the full spec kit artifact set for feature 124 and focused Pest coverage for rendering, search, sort, filters, empty state, and regression-sensitive page copy ## Testing - `vendor/bin/sail bin pint --dirty --format agent` - `vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryCoverageTableTest.php tests/Feature/Filament/InventoryPagesTest.php tests/Feature/Filament/InventoryHubDbOnlyTest.php` ## Filament Notes - Livewire v4.0+ compliance: yes, this uses Filament v5 table APIs on the existing page and does not introduce any Livewire v3 patterns - Provider registration: unchanged; Laravel 11+ provider registration remains in `bootstrap/providers.php` - Globally searchable resources: none changed in this feature; no Resource global-search behavior was added or modified - Destructive actions: none; the page remains read-only and only exposes a non-destructive clear-filters empty-state action - Asset strategy: no new panel or shared assets were added, so no `filament:assets` deployment change is required for this feature - Testing plan delivered: focused Filament/Pest coverage for the page table surface plus existing page-load regressions ## Follow-up - Manual dark-mode and badge-regression QA from task `T018` is still pending and should be completed before merge if that check remains mandatory in your review flow. Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #151
49 lines
1.4 KiB
PHP
49 lines
1.4 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Filament\Pages\InventoryCoverage;
|
|
use App\Filament\Resources\InventoryItemResource;
|
|
use App\Models\InventoryItem;
|
|
use App\Models\OperationRun;
|
|
use Illuminate\Support\Facades\Bus;
|
|
|
|
it('renders Inventory hub surfaces DB-only (no outbound HTTP, no background work)', function (): void {
|
|
[$user, $tenant] = createUserWithTenant(role: 'owner');
|
|
|
|
InventoryItem::factory()->create([
|
|
'tenant_id' => $tenant->getKey(),
|
|
'display_name' => 'Item A',
|
|
'policy_type' => 'deviceConfiguration',
|
|
'external_id' => 'item-a',
|
|
'platform' => 'windows',
|
|
]);
|
|
|
|
OperationRun::factory()->create([
|
|
'tenant_id' => $tenant->getKey(),
|
|
'workspace_id' => $tenant->workspace_id,
|
|
'type' => 'inventory_sync',
|
|
'status' => 'completed',
|
|
'outcome' => 'succeeded',
|
|
'context' => ['selection_hash' => str_repeat('a', 64)],
|
|
'completed_at' => now(),
|
|
]);
|
|
|
|
$this->actingAs($user);
|
|
|
|
Bus::fake();
|
|
|
|
assertNoOutboundHttp(function () use ($tenant): void {
|
|
$this->get(InventoryItemResource::getUrl('index', tenant: $tenant))
|
|
->assertOk()
|
|
->assertSee('Run Inventory Sync')
|
|
->assertSee('Item A');
|
|
|
|
$this->get(InventoryCoverage::getUrl(tenant: $tenant))
|
|
->assertOk()
|
|
->assertSee('Searchable support matrix');
|
|
});
|
|
|
|
Bus::assertNothingDispatched();
|
|
});
|