e2e: Update annotation marker selector (#67135)

This commit is contained in:
Adela Almasan 2023-04-24 13:51:15 -05:00 committed by GitHub
parent a6577cc6fd
commit c4c747cca6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 6 additions and 6 deletions

View File

@ -55,7 +55,7 @@ e2e.scenario({
e2e.components.Panels.Panel.title('Panel one')
.should('exist')
.within(() => {
e2e.pages.SoloPanel.Annotations.marker().should('exist').should('have.length', 4);
e2e.pages.Dashboard.Annotations.marker().should('exist').should('have.length', 4);
});
},
});

View File

@ -2,7 +2,7 @@ import { e2e } from '@grafana/e2e';
e2e.scenario({
describeName: 'Query editor',
itName: 'Undo should work in query editor for prometheus.',
itName: 'Undo should work in query editor for prometheus -- test CI.',
addScenarioDataSource: false,
addScenarioDashBoard: false,
skipScenario: false,

View File

@ -177,6 +177,9 @@ export const Pages = {
},
},
},
Annotations: {
marker: 'data-testid annotation-marker',
},
},
Dashboards: {
url: '/dashboards',
@ -249,9 +252,6 @@ export const Pages = {
},
SoloPanel: {
url: (page: string) => `/d-solo/${page}`,
Annotations: {
marker: 'data-testid annotation-marker',
},
},
PluginsList: {
page: 'Plugins list page',

View File

@ -127,7 +127,7 @@ export function AnnotationMarker({ annotation, timeZone, width }: Props) {
onMouseEnter={onMouseEnter}
onMouseLeave={onMouseLeave}
className={!isRegionAnnotation ? styles.markerWrapper : undefined}
data-testid={selectors.pages.SoloPanel.Annotations.marker}
data-testid={selectors.pages.Dashboard.Annotations.marker}
>
{marker}
</div>