test: add failing test for credits help icon in cloud user popover

Asserts that the help icon next to the credits balance renders as an
interactive button with the unified-credits tooltip text as its
accessible name. Today the icon is a bare <i> with v-tooltip and
cursor-help but no button semantics, so the tooltip is unreliable and
the icon is not focusable/clickable.

Refs FE-617
This commit is contained in:
dante01yoon
2026-05-08 11:14:17 +09:00
parent c8c0e53865
commit e7c83abd0a

View File

@@ -252,6 +252,20 @@ describe('CurrentUserPopoverLegacy', () => {
expect(screen.getByText('Log Out')).toBeInTheDocument()
})
describe('credits help icon (FE-617)', () => {
it('renders the credits help icon as an interactive button with the unified-credits tooltip as its accessible name', () => {
renderComponent()
const helpButton = screen.getByTestId('credits-info-button')
expect(helpButton).toBeInTheDocument()
expect(helpButton.tagName).toBe('BUTTON')
expect(helpButton).toHaveAttribute(
'aria-label',
enMessages.credits.unified.tooltip
)
})
})
it('opens user settings and emits close event when settings item is clicked', async () => {
const { user, onClose } = renderComponent()