@grafana/plugin-e2e 1.8.3-canary.1155.e5daed5.0 → 1.8.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -37,6 +37,7 @@ export declare const versionedPages: {
37
37
  '9.5.0': (title: string) => string;
38
38
  };
39
39
  addNewPanel: {
40
+ '11.1.0': string;
40
41
  "8.0.0": string;
41
42
  };
42
43
  itemButtonAddViz: {
@@ -42,6 +42,7 @@ exports.versionedPages = {
42
42
  '9.5.0': (title) => `data-testid ${title}`,
43
43
  },
44
44
  addNewPanel: {
45
+ '11.1.0': 'data-testid Add new panel',
45
46
  [constants_1.MIN_GRAFANA_VERSION]: 'Add new panel',
46
47
  },
47
48
  itemButtonAddViz: {
@@ -98,8 +98,8 @@ class DashboardPage extends GrafanaPage_1.GrafanaPage {
98
98
  */
99
99
  async addPanel() {
100
100
  const { components, pages } = this.ctx.selectors;
101
- // From Grafana 10.3.0, one needs to click the edit button before adding a new panel in already existing dashboards
102
- if (semver.gte(this.ctx.grafanaVersion, '10.3.0') && this.dashboard?.uid) {
101
+ // From Grafana 11.3.0, one needs to click the edit button before adding a new panel in already existing dashboards
102
+ if (semver.gte(this.ctx.grafanaVersion, '11.3.0') && this.dashboard?.uid) {
103
103
  await this.getByGrafanaSelector(components.NavToolbar.editDashboard.editButton).click();
104
104
  }
105
105
  if (semver.gte(this.ctx.grafanaVersion, '10.0.0')) {
@@ -107,6 +107,9 @@ class DashboardPage extends GrafanaPage_1.GrafanaPage {
107
107
  await this.getByGrafanaSelector(pages.AddDashboard.itemButton(pages.AddDashboard.itemButtonAddViz)).click();
108
108
  }
109
109
  else {
110
+ if (this.dashboard?.uid) {
111
+ await this.getByGrafanaSelector(components.PageToolbar.item('Add panel')).click();
112
+ }
110
113
  await this.getByGrafanaSelector(pages.AddDashboard.addNewPanel).click();
111
114
  }
112
115
  const panelId = await this.ctx.page.evaluate(() => {
@@ -37,7 +37,7 @@ export declare class PanelEditPage extends GrafanaPage {
37
37
  getVisualizationName(): Locator;
38
38
  /**
39
39
  * Clicks the "Back to dashboard" button in the panel editor
40
- * In versions prior to 10.3.0, this method clicks the "Apply" button instead
40
+ * In versions prior to 11.3.0, this method clicks the "Apply" button instead
41
41
  */
42
42
  backToDashboard(): Promise<DashboardPage>;
43
43
  /**
@@ -128,14 +128,17 @@ class PanelEditPage extends GrafanaPage_1.GrafanaPage {
128
128
  }
129
129
  /**
130
130
  * Clicks the "Back to dashboard" button in the panel editor
131
- * In versions prior to 10.3.0, this method clicks the "Apply" button instead
131
+ * In versions prior to 11.3.0, this method clicks the "Apply" button instead
132
132
  */
133
133
  async backToDashboard() {
134
134
  if (semver.gte(this.ctx.grafanaVersion, '11.3.0')) {
135
135
  await this.getByGrafanaSelector(this.ctx.selectors.components.NavToolbar.editDashboard.backToDashboardButton).click();
136
136
  }
137
+ else if (semver.gte(this.ctx.grafanaVersion, '9.0.0')) {
138
+ await this.ctx.page.getByTestId(this.ctx.selectors.components.PanelEditor.applyButton).click();
139
+ }
137
140
  else {
138
- await this.getByGrafanaSelector(this.ctx.selectors.components.PanelEditor.applyButton).click();
141
+ await this.ctx.page.getByLabel('panel editor apply').click();
139
142
  }
140
143
  return new DashboardPage_1.DashboardPage(this.ctx, this.args);
141
144
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-e2e",
3
- "version": "1.8.3-canary.1155.e5daed5.0",
3
+ "version": "1.8.3",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -56,5 +56,5 @@
56
56
  "start": "cls || clear"
57
57
  }
58
58
  },
59
- "gitHead": "e5daed54c4086e9f24885ced1abe8e379c713a19"
59
+ "gitHead": "9b9994a9e454c877cb7058fe690ab4467f4ddb38"
60
60
  }