33 lines
1.1 KiB
PHP
33 lines
1.1 KiB
PHP
<?php
|
|
|
|
declare(strict_types=1);
|
|
|
|
it('shows Provider Connections under the Settings → Integrations navigation section for entitled users', function (): void {
|
|
[$user] = createUserWithTenant(role: 'owner');
|
|
|
|
$this->actingAs($user)
|
|
->get('/admin/operations')
|
|
->assertOk();
|
|
|
|
$groups = app(\Filament\Navigation\NavigationManager::class)->get();
|
|
|
|
$settingsGroup = collect($groups)
|
|
->first(static fn (\Filament\Navigation\NavigationGroup $group): bool => $group->getLabel() === 'Settings');
|
|
|
|
expect($settingsGroup)->not->toBeNull();
|
|
|
|
$items = collect($settingsGroup->getItems());
|
|
|
|
$integrationsItem = $items
|
|
->first(static fn (\Filament\Navigation\NavigationItem $item): bool => $item->getLabel() === 'Integrations');
|
|
|
|
expect($integrationsItem)->not->toBeNull();
|
|
|
|
$childLabels = collect($integrationsItem->getChildItems())
|
|
->map(static fn (\Filament\Navigation\NavigationItem $item): string => $item->getLabel())
|
|
->values()
|
|
->all();
|
|
|
|
expect($childLabels)->toContain('Provider Connections');
|
|
});
|