feat(editor): dialog close button is a 44 px touch box

This commit is contained in:
bchanot committed 2026-11-15 19:40:46 +01:00
1 parent ae02f48853
commit 240c2ba0e7
4 files changed
+79 -5

No files matched your search

+25
View File
@@ -56,6 +56,31 @@ describe('Dialog', () => {
expect(dialog).toHaveAccessibleDescription('It goes for good.')
})
it('its ✕ is a 44 px box with a visible focus ring; a long title wraps beside it (Rev 6)', () => {
useLocaleStore.setState({ locale: 'fr' })
render(
<Dialog open onClose={() => {}} title="X">
body
</Dialog>,
)
const close = screen.getByRole('button', { name: 'Fermer' })
for (const name of [
'grid',
'h-11',
'w-11',
'shrink-0',
'place-items-center',
'rounded-lg',
'focus-visible:ring-2',
]) {
expect(close).toHaveClass(name)
}
expect(screen.getByRole('heading', { name: 'X' })).toHaveClass(
'min-w-0',
'break-words',
)
})
it('has no description when none is given', () => {
render(
<Dialog open onClose={() => {}} title="X">