From b34b8ccd4aab458848c017d1ae1d59f76d63c3be Mon Sep 17 00:00:00 2001 From: Timur Olzhabayev Date: Thu, 28 Nov 2024 16:51:24 +0100 Subject: [PATCH] adjusting the conditions --- packages/plugin-e2e/src/models/pages/DashboardPage.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/plugin-e2e/src/models/pages/DashboardPage.ts b/packages/plugin-e2e/src/models/pages/DashboardPage.ts index 291a15ca1..3a0a63acf 100644 --- a/packages/plugin-e2e/src/models/pages/DashboardPage.ts +++ b/packages/plugin-e2e/src/models/pages/DashboardPage.ts @@ -96,8 +96,9 @@ export class DashboardPage extends GrafanaPage { } if (semver.gte(this.ctx.grafanaVersion, '8.0.0') && semver.lte(this.ctx.grafanaVersion, '8.5.0')) { await this.getByGrafanaSelector('Add panel').click(); + } else { + await this.getByGrafanaSelector(pages.AddDashboard.addNewPanel).click(); } - await this.getByGrafanaSelector(pages.AddDashboard.addNewPanel).click(); } const panelId = await this.ctx.page.evaluate(() => {