TenantAtlas/apps/platform/tests/Feature/Filament/WorkspaceOverviewNavigationTest.php
Ahmed Darrazi 444b3520b0
Some checks failed
PR Fast Feedback / fast-feedback (pull_request) Failing after 10m54s
fix: restore full suite green signal
2026-05-12 20:45:16 +02:00

25 lines
983 B
PHP

<?php
declare(strict_types=1);
use App\Filament\Pages\Findings\MyFindingsInbox;
use App\Support\Workspaces\WorkspaceContext;
use Filament\Facades\Filament;
it('uses the admin panel home url and shows the overview navigation item', function (): void {
[$user, $tenant] = createUserWithTenant(role: 'owner');
$response = $this->actingAs($user)
->withSession([WorkspaceContext::SESSION_KEY => (int) $tenant->workspace_id])
->get(route('admin.workspace.home', ['workspace' => $tenant->workspace]))
->assertOk()
->assertSee('Overview')
->assertSee('Switch workspace')
->assertSee('Assigned to me')
->assertSee('Open my findings');
expect(Filament::getPanel('admin')->getHomeUrl())->toBe(route('admin.home'));
expect((string) $response->getContent())->toContain('href="'.route('admin.home').'"');
expect((string) $response->getContent())->toContain('href="'.MyFindingsInbox::getUrl(panel: 'admin').'"');
});