21 lines
697 B
PHP
21 lines
697 B
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
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');
|
|
|
|
expect(Filament::getPanel('admin')->getHomeUrl())->toBe(route('admin.home'));
|
|
expect((string) $response->getContent())->toContain('href="'.route('admin.home').'"');
|
|
});
|