mirror of
https://github.com/grafana/grafana.git
synced 2025-08-06 02:23:28 +08:00
GrafanaUI: Define tooltip or aria-label as required for IconButton (#69699)
* refactor: modify interfaces to make tooltip or aria-label required * refactor: change functionality around aria-label and tooltip * refactor: change and add information in storybook documentation * refactor: remove default from tooltip * refactor: IconButton to make tooltip or aria-label required * refactor: Fix tests * refactor: Fix tests * refactor: Fix tests * refactor: Fix tests * feat: add migration guide for breaking change * feat: add latest requirements to storybook docs * refactor: separate iconbutton story with and without tooltip * refactor: remove exported baseArgs * refactor: clean up and restructure original story * refactor: adjust styling * refactor: enable control for tooltip * refactor: clean up * refactor: enable control for aria-label * refactor: fix theme getting the wrong theme * refactor: fix tests * refactor: adjust story * refactor: remove confusing story * refactor: adjust controls for stories
This commit is contained in:
@ -80,7 +80,7 @@ describe('QueryGroup', () => {
|
||||
await userEvent.click(addExpressionButton);
|
||||
|
||||
const lastQueryEditorRow = (await screen.findAllByTestId('query-editor-row')).at(-1);
|
||||
const lastEditorToggleRow = (await screen.findAllByLabelText('toggle collapse and expand query row')).at(-1);
|
||||
const lastEditorToggleRow = (await screen.findAllByLabelText('Collapse query row')).at(-1);
|
||||
|
||||
expect(lastEditorToggleRow?.getAttribute('aria-expanded')).toBe('true');
|
||||
expect(lastQueryEditorRow?.firstElementChild?.children.length).toBe(2);
|
||||
@ -97,7 +97,7 @@ describe('QueryGroup', () => {
|
||||
await userEvent.click(addQueryButton);
|
||||
|
||||
const lastQueryEditorRow = (await screen.findAllByTestId('query-editor-row')).at(-1);
|
||||
const lastEditorToggleRow = (await screen.findAllByLabelText('toggle collapse and expand query row')).at(-1);
|
||||
const lastEditorToggleRow = (await screen.findAllByLabelText('Collapse query row')).at(-1);
|
||||
|
||||
expect(lastEditorToggleRow?.getAttribute('aria-expanded')).toBe('true');
|
||||
expect(lastQueryEditorRow?.firstElementChild?.children.length).toBe(2);
|
||||
|
Reference in New Issue
Block a user