Chore: Refactor dataviz aria-label e2e selectors to data-testid (#78938)

Co-authored-by: nmarrs <nathanielmarrs@gmail.com>
This commit is contained in:
Khushi Jain
2023-12-17 05:40:04 +05:30
committed by GitHub
parent dba690d653
commit 54dc5846c2
14 changed files with 30 additions and 39 deletions

View File

@@ -97,7 +97,7 @@ describe('OrganisationSwitcher', () => {
},
});
expect(screen.getByRole('button', { name: /change organization/i })).toBeInTheDocument();
expect(screen.getByTestId('data-testid Value picker button Change organization')).toBeInTheDocument();
});
it('should not render and not try to get user organizations if not signed in', () => {

View File

@@ -10,7 +10,7 @@ describe('AddLayerButton', () => {
it('renders AddLayerButton', () => {
renderScenario({});
const button = screen.getByLabelText(selectors.components.ValuePicker.button(testLabel));
const button = screen.getByTestId(selectors.components.ValuePicker.button(testLabel));
expect(button).toBeInTheDocument();
});