25 lines
935 B
PHP
25 lines
935 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
use App\Filament\Pages\Findings\MyFindingsInbox;
|
|
use App\Support\Workspaces\WorkspaceContext;
|
|
use Filament\Facades\Filament;
|
|
|
|
it('uses /admin as 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('/admin')
|
|
->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').'"');
|
|
});
|