The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/e2e/various-suite/graph-auto-migrate.spec.ts

51 lines
1.6 KiB

import { e2e } from '../utils';
const DASHBOARD_ID = 'XMjIZPmik';
const DASHBOARD_NAME = 'Panel Tests - Graph Time Regions';
describe('Auto-migrate graph panel', () => {
beforeEach(() => {
e2e.flows.login(e2e.env('USERNAME'), e2e.env('PASSWORD'));
});
it('Annotation markers exist for time regions', () => {
e2e.flows.openDashboard({ uid: DASHBOARD_ID });
cy.contains(DASHBOARD_NAME).should('be.visible');
cy.contains('uplot-main-div').should('not.exist');
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { '__feature.autoMigrateOldPanels': true } });
cy.wait(1000);
e2e.components.Panels.Panel.title('Business Hours')
.should('exist')
.within(() => {
e2e.pages.Dashboard.Annotations.marker().should('exist');
});
e2e.components.Panels.Panel.title("Sunday's 20-23")
.should('exist')
.within(() => {
e2e.pages.Dashboard.Annotations.marker().should('exist');
});
e2e.components.Panels.Panel.title('Each day of week')
.should('exist')
.within(() => {
e2e.pages.Dashboard.Annotations.marker().should('exist');
});
cy.get('body').children().find('.scrollbar-view').first().scrollTo('bottom');
e2e.components.Panels.Panel.title('05:00')
.should('exist')
.within(() => {
e2e.pages.Dashboard.Annotations.marker().should('exist');
});
e2e.components.Panels.Panel.title('From 22:00 to 00:30 (crossing midnight)')
.should('exist')
.within(() => {
e2e.pages.Dashboard.Annotations.marker().should('exist');
});
});
});