Files
grafana/e2e-playwright/dashboard-cujs/global-teardown.spec.ts
Victor Marin dfa692440c Dashboards: Support list of dashboards for tests to run against (#111084)
* Allow specifying a list of dashboards, both normal and reloabable, that the tests can run against

* refactor

* refactor

* lint
2025-09-15 17:34:28 +03:00

20 lines
494 B
TypeScript

import { test } from '@playwright/test';
import { clearDashboardUIDs, getDashboardUIDs } from './dashboardUidsState';
test.describe('Dashboard CUJS Global Teardown', () => {
test('cleanup test dashboards', async ({ request }) => {
const dashboardUIDs = getDashboardUIDs();
if (!dashboardUIDs.length) {
return;
}
for (const dashboardUID of dashboardUIDs) {
await request.delete(`/api/dashboards/uid/${dashboardUID}`);
}
clearDashboardUIDs();
});
});