Dashboards: Migrate from aria-label e2e selectors to data-testid (#78536)

* Dashboards: Migrate from aria-label e2e selectors to data-testid

* more changes

* addPanelwidget

* Test: Update .betterer.results

* refactor: fix e2e tests

* refactor: fix failing test

* refactor: update plugin-e2e after adding selector changes to the packege

---------

Co-authored-by: Laura Benz <48948963+L-M-K-B@users.noreply.github.com>
Co-authored-by: Laura Benz <laura.benz@grafana.com>
This commit is contained in:
Khushi Jain
2024-04-24 18:46:19 +05:30
committed by GitHub
parent 38917c4e79
commit 5dd8353ab1
13 changed files with 49 additions and 65 deletions

View File

@@ -18,19 +18,21 @@ describe('Annotations filtering', () => {
.should('be.visible')
.within(() => {
// All panels
e2e.components.Annotations.annotationsTypeInput().click({ force: true }).type('All panels{enter}');
e2e.components.Annotations.annotationsTypeInput().find('input').type('All panels{enter}', { force: true });
e2e.components.Annotations.annotationsChoosePanelInput().should('not.exist');
// All panels except
e2e.components.Annotations.annotationsTypeInput().click({ force: true }).type('All panels except{enter}');
e2e.components.Annotations.annotationsTypeInput()
.find('input')
.type('All panels except{enter}', { force: true });
e2e.components.Annotations.annotationsChoosePanelInput().should('be.visible');
// Selected panels
e2e.components.Annotations.annotationsTypeInput().click({ force: true }).type('Selected panels{enter}');
e2e.components.Annotations.annotationsTypeInput().find('input').type('Selected panels{enter}', { force: true });
e2e.components.Annotations.annotationsChoosePanelInput()
.should('be.visible')
.click({ force: true })
.type('Panel two{enter}');
.find('input')
.type('Panel two{enter}', { force: true });
});
e2e.pages.Dashboard.Settings.Annotations.NewAnnotation.previewInDashboard().click({ force: true });