Skip to content

Commit

Permalink
adding the case properly
Browse files Browse the repository at this point in the history
  • Loading branch information
tolzhabayev committed Nov 28, 2024
1 parent a5b3cfb commit c473e9b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions packages/plugin-e2e/src/models/pages/DashboardPage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,13 +94,12 @@ export class DashboardPage extends GrafanaPage {
if (this.dashboard?.uid) {
await this.getByGrafanaSelector(components.PageToolbar.item('Add panel')).click();
}
if (semver.gte(this.ctx.grafanaVersion, '8.0.0') && semver.lte(this.ctx.grafanaVersion, '8.5.0')) {
await this.getByGrafanaSelector('Add panel').click();
}
await this.getByGrafanaSelector(pages.AddDashboard.addNewPanel).click();
}

if (semver.gte(this.ctx.grafanaVersion, '8.0.0')) {
await this.getByGrafanaSelector('Add panel').click();
}

const panelId = await this.ctx.page.evaluate(() => {
const urlParams = new URLSearchParams(window.location.search);
return urlParams.get('editPanel');
Expand Down

0 comments on commit c473e9b

Please sign in to comment.