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-playwright/dashboard-new-layouts/dashboards-title-descriptio...

47 lines
1.7 KiB

import { test, expect } from '@grafana/plugin-e2e';
test.use({
featureToggles: {
kubernetesDashboards: true,
dashboardNewLayouts: true,
groupByVariable: true,
},
});
const PAGE_UNDER_TEST = 'ed155665/annotation-filtering';
test.describe(
'Dashboard',
{
tag: ['@dashboards'],
},
() => {
test('can change dashboard description and title', async ({ gotoDashboardPage, selectors, page }) => {
const dashboardPage = await gotoDashboardPage({ uid: PAGE_UNDER_TEST });
await dashboardPage.getByGrafanaSelector(selectors.components.NavToolbar.editDashboard.editButton).click();
// Check that current dashboard title is visible in breadcrumb
await expect(
dashboardPage.getByGrafanaSelector(selectors.components.Breadcrumbs.breadcrumb('Annotation filtering'))
).toBeVisible();
const titleInput = page.locator('[aria-label="dashboard-options Title field property editor"] input');
await expect(titleInput).toHaveValue('Annotation filtering');
await titleInput.fill('New dashboard title');
await expect(titleInput).toHaveValue('New dashboard title');
// Check that new dashboard title is reflected in breadcrumb
await expect(
dashboardPage.getByGrafanaSelector(selectors.components.Breadcrumbs.breadcrumb('New dashboard title'))
).toBeVisible();
// Check that we can successfully change the dashboard description
const descriptionTextArea = page.locator(
'[aria-label="dashboard-options Description field property editor"] textarea'
);
await descriptionTextArea.fill('Dashboard description');
await expect(descriptionTextArea).toHaveValue('Dashboard description');
});
}
);