Dashboards/E2E: Validate editing of dashboard title & description (#105473)

pull/104845/head
kay delaney 8 months ago committed by GitHub
parent d896f31c43
commit 73e973f5f6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 32
      e2e/dashboard-new-layouts/dashboards-title-description.spec.ts

@ -0,0 +1,32 @@
import { e2e } from '../utils';
const PAGE_UNDER_TEST = 'ed155665/annotation-filtering';
describe('Dashboard', () => {
beforeEach(() => {
e2e.flows.login(Cypress.env('USERNAME'), Cypress.env('PASSWORD'));
});
it('can change dashboard description and title', () => {
e2e.pages.Dashboards.visit();
e2e.flows.openDashboard({ uid: `${PAGE_UNDER_TEST}?orgId=1` });
e2e.flows.scenes.toggleEditMode();
// Check that current dashboard title is visible in breadcrumb
cy.get('[aria-label="Breadcrumbs"]').contains('Annotation filtering').should('exist');
const titleInput = () => cy.get('[aria-label="dashboard-options Title field property editor"] input');
titleInput().should('have.value', 'Annotation filtering').clear().type('New dashboard title');
titleInput().should('have.value', 'New dashboard title');
// Check that new dashboard title is reflected in breadcrumb
cy.get('[aria-label="Breadcrumbs"]').contains('New dashboard title').should('exist');
// Check that we can successfully change the dashboard description
const descriptionTextArea = () =>
cy.get('[aria-label="dashboard-options Description field property editor"] textarea');
descriptionTextArea().clear().type('Dashboard description');
descriptionTextArea().should('have.value', 'Dashboard description');
});
});
Loading…
Cancel
Save