2026-08-06 16:15:58 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
|
|
it('uses the custom tooltip for icon actions across layouts', function () {
|
|
|
|
|
$baseLayout = file_get_contents(resource_path('views/layouts/base.blade.php'));
|
|
|
|
|
$tooltip = file_get_contents(resource_path('views/components/icon-tooltip.blade.php'));
|
|
|
|
|
|
|
|
|
|
expect($baseLayout)->toContain('<x-icon-tooltip />')
|
|
|
|
|
->and($tooltip)
|
|
|
|
|
->toContain("closest('button, a, [data-tooltip]')")
|
|
|
|
|
->toContain("target.querySelector('svg')")
|
2026-08-06 21:38:11 +00:00
|
|
|
->toContain("target.matches('[data-icon-tooltip-ignore]')")
|
2026-08-06 16:15:58 +00:00
|
|
|
->toContain("target.removeAttribute('title')")
|
|
|
|
|
->toContain('role="tooltip"')
|
|
|
|
|
->toContain('aria-label')
|
|
|
|
|
->toContain('fixed z-[100]');
|
|
|
|
|
});
|