The open and composable observability and data visualization platform. Visualize metrics, logs, and traces from multiple sources like Prometheus, Loki, Elasticsearch, InfluxDB, Postgres and many more.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 
grafana/e2e/dashboard-new-layouts/dashboards-title-descriptio...

32 lines
1.3 KiB

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');
});
});