mirror of https://github.com/grafana/grafana
Dashboards/E2E: Validate editing of dashboard title & description (#105473)
parent
d896f31c43
commit
73e973f5f6
@ -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…
Reference in new issue