mirror of
https://github.com/nowcommunity/nowdatabase.git
synced 2026-10-12 19:13:52 +03:00
Fix TableHelp test aria-describedby assertion
Co-authored-by: karilint <19990676+karilint@users.noreply.github.com>
This commit is contained in:
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')
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user