mirror of
https://github.com/grafana/grafana.git
synced 2025-02-25 18:55:37 -06:00
Chore: Reduce pa11y-ci errors (#41787)
* Chore: moves alert to test-id * Chore: moves Dashboard navigation to test-id * Chore: moves Bar gauge value to data-testid * Chore move Folder picker select container to data-testid * Chore: moves Time zone picker select container to data-testid * Chore: moves Choose starting day of the week to data-testid * Chore: change tabIndex on search input * Chore: moves various search related aria-lables to data-testid * Chore: connects label to select input on alerting page * Chore: connects TimeZonePicker and WeekStartPicker with labels * Chore: moves CallToActionButton to data-testid * Chore: move user home preferences select to data-testid * Chore: lower all thresholds
This commit is contained in:
@@ -61,7 +61,7 @@ describe('ApiKeysPage', () => {
|
||||
describe('when there are no API keys', () => {
|
||||
it('then it should render CTA', () => {
|
||||
setup({ apiKeys: getMultipleMockKeys(0), apiKeysCount: 0, hasFetched: true });
|
||||
expect(screen.getByLabelText(selectors.components.CallToActionCard.button('New API key'))).toBeInTheDocument();
|
||||
expect(screen.getByTestId(selectors.components.CallToActionCard.buttonV2('New API key'))).toBeInTheDocument();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -150,7 +150,7 @@ describe('ApiKeysPage', () => {
|
||||
const { addApiKeyMock } = setup({ apiKeys, apiKeysCount: apiKeys.length, hasFetched: true });
|
||||
|
||||
addApiKeyMock.mockClear();
|
||||
userEvent.click(screen.getByLabelText(selectors.components.CallToActionCard.button('New API key')));
|
||||
userEvent.click(screen.getByTestId(selectors.components.CallToActionCard.buttonV2('New API key')));
|
||||
await addAndVerifyApiKey(addApiKeyMock, false);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user