create(); $workspace = Workspace::factory()->create(); WorkspaceMembership::factory()->create([ 'workspace_id' => $workspace->getKey(), 'user_id' => $user->getKey(), 'role' => 'owner', ]); Filament::setTenant(null, true); $this->actingAs($user) ->withSession([WorkspaceContext::SESSION_KEY => (int) $workspace->getKey()]) ->get('/admin/operations') ->assertOk(); $panel = Filament::getCurrentOrDefaultPanel(); $labels = collect($panel->getNavigationItems()) ->map(static fn ($item): string => $item->getLabel()) ->all(); expect($labels)->not->toContain('Switch workspace'); expect($labels)->toContain('Manage workspaces'); expect($labels)->not->toContain('Workspaces'); });