mirror of https://github.com/grafana/grafana.git
20 lines
494 B
TypeScript
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();
|
|
});
|
|
});
|