Files
grafana/e2e/plugin-e2e/plugin-e2e-api-tests/as-admin-user/dashboard.spec.ts
Erik Sundell c29ed503db Test plugins: Add datasource test plugin with field tests (#95472)
* add new test plugin

* add some field validation tests

* update lockfile

* fix bad test file name
2024-11-01 08:25:27 +01:00

16 lines
599 B
TypeScript

import { expect, test } from '@grafana/plugin-e2e';
const REACT_TABLE_DASHBOARD = { uid: 'U_bZIMRMk' };
test('add panel in already existing dashboard', async ({ gotoDashboardPage, page }) => {
const dashboardPage = await gotoDashboardPage(REACT_TABLE_DASHBOARD);
await dashboardPage.addPanel();
await expect(page.url()).toContain('editPanel');
});
test('add panel in new dashboard', async ({ dashboardPage, page }) => {
const panelEditPage = await dashboardPage.addPanel();
await expect(panelEditPage.panel.locator).toBeVisible();
await expect(page.url()).toContain('editPanel');
});