@grafana/plugin-e2e 3.0.2 → 3.0.3-canary.2339.19919219824.0

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.
@@ -101,8 +101,15 @@ class PanelEditPage extends GrafanaPage.GrafanaPage {
101
101
  }
102
102
  await this.getByGrafanaSelector(this.ctx.selectors.components.PanelEditor.toggleVizPicker).click();
103
103
  await this.getByGrafanaSelector(this.ctx.selectors.components.PluginVisualization.item(visualization)).click();
104
+ if (semver__namespace.lte(this.ctx.grafanaVersion, "12.3.0")) {
105
+ await test.expect(
106
+ this.getByGrafanaSelector(this.ctx.selectors.components.PanelEditor.toggleVizPicker),
107
+ `Could not set visualization to ${visualization}. Ensure the panel is installed.`
108
+ ).toHaveText(visualization);
109
+ return;
110
+ }
104
111
  await test.expect(
105
- this.getByGrafanaSelector(this.ctx.selectors.components.PanelEditor.toggleVizPicker),
112
+ this.getByGrafanaSelector("data-testid Panel editor OptionsPane header"),
106
113
  `Could not set visualization to ${visualization}. Ensure the panel is installed.`
107
114
  ).toHaveText(visualization);
108
115
  }
@@ -123,7 +130,10 @@ class PanelEditPage extends GrafanaPage.GrafanaPage {
123
130
  * Returns the name of the visualization currently selected in the panel editor
124
131
  */
125
132
  getVisualizationName() {
126
- return this.getByGrafanaSelector(this.ctx.selectors.components.PanelEditor.toggleVizPicker);
133
+ if (semver__namespace.lte(this.ctx.grafanaVersion, "12.3.0")) {
134
+ return this.getByGrafanaSelector(this.ctx.selectors.components.PanelEditor.toggleVizPicker);
135
+ }
136
+ return this.getByGrafanaSelector("data-testid Panel editor OptionsPane header");
127
137
  }
128
138
  /**
129
139
  * Clicks the "Back to dashboard" button in the panel editor
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-e2e",
3
- "version": "3.0.2",
3
+ "version": "3.0.3-canary.2339.19919219824.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -47,5 +47,5 @@
47
47
  "uuid": "^13.0.0",
48
48
  "yaml": "^2.3.4"
49
49
  },
50
- "gitHead": "3aed54e7d9d26d14dfbaa229806c3377391ccfcc"
50
+ "gitHead": "615188b0dfa626af73e3081db361878669cf6aab"
51
51
  }