Files
grafana/e2e-playwright/dashboards-suite/embedded-dashboard.spec.ts
T
Ashley Harrison 6408e3acaa E2E: Remove cypress dashboards-suite (#109038)
* add equivalent dashboard-time-zone test

* remove cypress dashboards-suite

* modify tests to work with schema-v2 + update workflow to run playwright instead

* fix package.json

* update CODEOWNERS

* fix start-server to include ARCH
2025-08-05 10:09:49 +01:00

33 lines
981 B
TypeScript

import { test, expect } from '@grafana/plugin-e2e';
test.use({
featureToggles: {
kubernetesDashboards: process.env.KUBERNETES_DASHBOARDS === 'true',
},
});
test.describe(
'Embedded dashboard',
{
tag: ['@dashboards'],
},
() => {
test('open test page', async ({ page, dashboardPage, selectors }) => {
await page.goto('/dashboards/embedding-test');
// Verify pie charts are rendered
const pieChartSlices = page.locator(
`[data-viz-panel-key="panel-11"] [data-testid^="${selectors.components.Panels.Visualization.PieChart.svgSlice}"]`
);
await expect(pieChartSlices).toHaveCount(5);
// Verify no url sync
await dashboardPage.getByGrafanaSelector(selectors.components.TimePicker.openButton).click();
await page.locator('label').filter({ hasText: 'Last 1 hour' }).click();
// Verify URL remains the same (no sync)
expect(page.url()).toMatch(/\/dashboards\/embedding-test$/);
});
}
);