From 73e973f5f61020260e530858e95eeae6bee17083 Mon Sep 17 00:00:00 2001 From: kay delaney <45561153+kaydelaney@users.noreply.github.com> Date: Fri, 16 May 2025 13:32:07 +0100 Subject: [PATCH] Dashboards/E2E: Validate editing of dashboard title & description (#105473) --- .../dashboards-title-description.spec.ts | 32 +++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 e2e/dashboard-new-layouts/dashboards-title-description.spec.ts diff --git a/e2e/dashboard-new-layouts/dashboards-title-description.spec.ts b/e2e/dashboard-new-layouts/dashboards-title-description.spec.ts new file mode 100644 index 00000000000..0d82fb9f086 --- /dev/null +++ b/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'); + }); +});