Fix TableHelp test aria-describedby assertion

Co-authored-by: karilint <19990676+karilint@users.noreply.github.com>
This commit is contained in:
copilot-swe-agent[bot]
2025-12-12 12:11:01 +00:00
co-authored by karilint
parent 570bb4f58a
commit 8299175916
@@ -39,6 +39,12 @@ describe('TableHelp', () => {
const button = screen.getByRole('button', { name: /table help/i })
expect(button.getAttribute('aria-label')).toBe('Open table help')
expect(button.getAttribute('aria-describedby')).toMatch(/table-help-popover|^$/)
// aria-describedby should be undefined when popover is closed
expect(button.getAttribute('aria-describedby')).toBeNull()
// When popover is open, aria-describedby should be set
fireEvent.click(button)
expect(button.getAttribute('aria-describedby')).toBe('table-help-popover')
})
})