2023-09-08 10:51:59 -05:00
|
|
|
import { e2e } from '../utils';
|
2023-04-26 21:28:58 -05:00
|
|
|
const DASHBOARD_ID = 'XMjIZPmik';
|
|
|
|
const DASHBOARD_NAME = 'Panel Tests - Graph Time Regions';
|
|
|
|
|
|
|
|
e2e.scenario({
|
|
|
|
describeName: 'Auto-migrate graph panel',
|
|
|
|
itName: 'Annotation markers exist for time regions',
|
|
|
|
addScenarioDataSource: false,
|
|
|
|
addScenarioDashBoard: false,
|
|
|
|
skipScenario: false,
|
|
|
|
scenario: () => {
|
|
|
|
e2e.flows.openDashboard({ uid: DASHBOARD_ID });
|
2023-09-11 05:20:54 -05:00
|
|
|
cy.contains(DASHBOARD_NAME).should('be.visible');
|
2023-04-26 21:28:58 -05:00
|
|
|
cy.contains('uplot-main-div').should('not.exist');
|
|
|
|
|
|
|
|
e2e.flows.openDashboard({ uid: DASHBOARD_ID, queryParams: { '__feature.autoMigrateOldPanels': true } });
|
|
|
|
|
2023-09-11 05:20:54 -05:00
|
|
|
cy.wait(1000);
|
2023-04-26 21:28:58 -05:00
|
|
|
|
|
|
|
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');
|
|
|
|
});
|
|
|
|
|
2023-04-27 10:20:07 -05:00
|
|
|
cy.get('body').children().find('.scrollbar-view').first().scrollTo('bottom');
|
2023-04-26 21:28:58 -05:00
|
|
|
|
|
|
|
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');
|
|
|
|
});
|
|
|
|
},
|
|
|
|
});
|