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';
|
|
|
|
|
2023-09-13 07:24:20 -05:00
|
|
|
describe('Auto-migrate graph panel', () => {
|
|
|
|
beforeEach(() => {
|
2023-09-27 05:33:00 -05:00
|
|
|
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
|
|
|
|
|
|
|
it('Annotation markers exist for time regions', () => {
|
2023-04-26 21:28:58 -05:00
|
|
|
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 } });
|
|
|
|
|
|
|
|
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');
|
|
|
|
});
|
2023-09-13 07:24:20 -05:00
|
|
|
});
|
2023-04-26 21:28:58 -05:00
|
|
|
});
|