create([ 'workspace_id' => (int) $tenant->workspace_id, 'tenant_id' => (int) $tenant->getKey(), 'status' => 'disabled', 'provider' => 'microsoft', ]); $this->actingAs($user); $tenant->makeCurrent(); Filament::setTenant($tenant, true); Livewire::test(ViewProviderConnection::class, ['record' => $connection->getKey()]) ->assertActionVisible('edit') ->assertActionDisabled('edit') ->assertActionExists('edit', function (Action $action): bool { return $action->getTooltip() === UiTooltips::insufficientPermission(); }); });