mirror of
https://github.com/grafana/grafana.git
synced 2025-07-29 02:52:16 +08:00

* fix some e2e flows types * some type fixes * must... fix... more... * MOAR * MOREMOREMORE * 1 more
13 lines
483 B
TypeScript
13 lines
483 B
TypeScript
import { e2e } from '../index';
|
|
|
|
export const revertAllChanges = () => {
|
|
e2e.getScenarioContext().then(({ addedDashboards, addedDataSources, hasChangedUserPreferences }) => {
|
|
addedDashboards.forEach((dashboard) => e2e.flows.deleteDashboard({ ...dashboard, quick: true }));
|
|
addedDataSources.forEach((dataSource) => e2e.flows.deleteDataSource({ ...dataSource, quick: true }));
|
|
|
|
if (hasChangedUserPreferences) {
|
|
e2e.flows.setDefaultUserPreferences();
|
|
}
|
|
});
|
|
};
|