mirror of
https://github.com/grafana/grafana.git
synced 2025-07-30 16:22:45 +08:00

* add more row grouping e2e * refactor dashboard create with dashboard import to speed up tests * add more tests for tabs layout * adjust flaky test
22 lines
621 B
TypeScript
22 lines
621 B
TypeScript
import { e2e } from '../..';
|
|
import testV2Dashboard from '../../../dashboards/TestV2Dashboard.json';
|
|
|
|
export interface ImportDashboardConfig {
|
|
title?: string;
|
|
}
|
|
|
|
export const importV2Dashboard = ({ title }: ImportDashboardConfig) => {
|
|
e2e.pages.ImportDashboard.visit();
|
|
e2e.components.DashboardImportPage.textarea().type(JSON.stringify(testV2Dashboard), {
|
|
delay: 0,
|
|
parseSpecialCharSequences: false,
|
|
});
|
|
|
|
e2e.components.DashboardImportPage.submit().click();
|
|
|
|
if (title) {
|
|
e2e.components.ImportDashboardForm.name().clear().type(title);
|
|
}
|
|
e2e.components.ImportDashboardForm.submit().click();
|
|
};
|