diff --git a/web/src/components/HoverTooltip.test.tsx b/web/src/components/HoverTooltip.test.tsx index 3cebecf7..607a05e3 100644 --- a/web/src/components/HoverTooltip.test.tsx +++ b/web/src/components/HoverTooltip.test.tsx @@ -9,6 +9,18 @@ import { afterEach(() => cleanup()) describe('HoverTooltip keyboard wiring', () => { + it('sizes short localized tooltips to their content up to the maximum width', () => { + render( + dot}> + 有新活动 + + ) + + const tooltip = screen.getByRole('tooltip', { hidden: true }) + expect(tooltip.className).toContain('w-max') + expect(tooltip.className).toContain('max-w-[14rem]') + }) + it('applies parent row focus-visible reveal classes', () => { render(