actingAs($user); $tenant->makeCurrent(); Filament::setTenant($tenant, true); // mountAction shows the confirmation modal // assertActionMounted confirms it was mounted (awaiting confirmation) Livewire::test(ListPolicies::class) ->assertActionVisible('sync') ->assertActionEnabled('sync') ->mountAction('sync') ->assertActionMounted('sync'); }); it('does not execute destructive action without calling confirm', function () { [$user, $tenant] = createUserWithTenant(role: 'owner'); $this->actingAs($user); $tenant->makeCurrent(); Filament::setTenant($tenant, true); // Mount but don't call - verify no side effects Livewire::test(ListPolicies::class) ->mountAction('sync'); // No job should be dispatched yet Queue::assertNothingPushed(); }); it('has confirmation modal configured with correct title', function () { // Verify UiTooltips constants are set correctly expect(UiTooltips::DESTRUCTIVE_CONFIRM_TITLE)->toBe('Are you sure?'); expect(UiTooltips::DESTRUCTIVE_CONFIRM_DESCRIPTION)->toBe('This action cannot be undone.'); }); });