Files
coolify/tests/Feature/NewResourceCardInteractionTest.php
Andras Bacsai 37ed725dc1 fix(ui): scope resource card keys and env count hide
Limit enter/space deploy handlers to the card root with .self so nested focusable content no longer triggers deploy. Hide the environments table resource count on mobile via a stable class instead of nth-child.
2026-08-12 23:57:32 +02:00

11 lines
465 B
PHP

<?php
it('only deploys from keyboard events on the resource card itself', function () {
$view = file_get_contents(resource_path('views/livewire/project/new/select.blade.php'));
expect(substr_count($view, '@keydown.enter.self.prevent='))->toBe(4)
->and(substr_count($view, '@keydown.space.self.prevent='))->toBe(4)
->and($view)->not->toContain('@keydown.enter.prevent=')
->and($view)->not->toContain('@keydown.space.prevent=');
});