Dashboards: Add e2e test for Dashboard Outline (#106491)

pull/106550/head^2
kay delaney 1 month ago committed by GitHub
parent 7e88d8a7c5
commit b4e27fb333
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 26
      e2e/dashboard-new-layouts/dashboard-outline.spec.ts

@ -0,0 +1,26 @@
import { e2e } from '../utils';
const PAGE_UNDER_TEST = 'edediimbjhdz4b/a-tall-dashboard';
describe('Dashboard Outline', () => {
beforeEach(() => {
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
});
it('can use dashboard outline', () => {
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1` });
e2e.flows.scenes.toggleEditMode();
e2e.components.PanelEditor.Outline.section().click();
// Should be able to click Variables item in outline to see add variable button
e2e.components.PanelEditor.Outline.item('Variables').click();
e2e.components.PanelEditor.ElementEditPane.addVariableButton().should('exist');
// Clicking a panel should scroll that panel in view
cy.contains('Dashboard panel 48').should('not.exist');
e2e.components.PanelEditor.Outline.item('Panel #48').click();
cy.contains('Dashboard panel 48').should('exist');
});
});
Loading…
Cancel
Save