@grafana/plugin-e2e 2.1.9-canary.2053.17260056832.0 → 2.1.9-canary.2053.17260283567.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.
package/dist/index.d.ts CHANGED
@@ -427,7 +427,7 @@ declare class AlertRuleQuery extends GrafanaPage {
427
427
  declare class AlertRuleEditPage extends GrafanaPage {
428
428
  readonly ctx: PluginTestCtx;
429
429
  readonly args?: AlertRuleArgs | undefined;
430
- private fullfilled;
430
+ private fulfilled;
431
431
  constructor(ctx: PluginTestCtx, args?: AlertRuleArgs | undefined);
432
432
  /**
433
433
  * Navigates to the annotation edit page. If a dashboard uid was not provided, it's assumed that it's a new dashboard.
@@ -34,7 +34,7 @@ class AlertRuleEditPage extends GrafanaPage.GrafanaPage {
34
34
  super(ctx, args);
35
35
  this.ctx = ctx;
36
36
  this.args = args;
37
- __publicField(this, "fullfilled", false);
37
+ __publicField(this, "fulfilled", false);
38
38
  }
39
39
  /**
40
40
  * Navigates to the annotation edit page. If a dashboard uid was not provided, it's assumed that it's a new dashboard.
@@ -151,19 +151,20 @@ class AlertRuleEditPage extends GrafanaPage.GrafanaPage {
151
151
  */
152
152
  async evaluate(options) {
153
153
  await this.ctx.page.waitForTimeout(1e3);
154
- if (this.fullfilled) {
154
+ if (this.fulfilled) {
155
155
  await this.ctx.page.unroute(this.ctx.selectors.apis.Alerting.eval);
156
+ this.fulfilled = false;
156
157
  }
157
158
  if (semver__namespace.gte(this.ctx.grafanaVersion, "10.0.0")) {
158
159
  this.ctx.page.route(this.ctx.selectors.apis.Alerting.eval, async (route) => {
159
160
  const response = await route.fetch();
160
161
  if (!response.ok()) {
161
- this.fullfilled = true;
162
+ this.fulfilled = true;
162
163
  return route.fulfill({ response });
163
164
  }
164
165
  let body = await response.json();
165
166
  const statuses = Object.keys(body.results).map((key) => body.results[key].status);
166
- this.fullfilled = true;
167
+ this.fulfilled = true;
167
168
  route.fulfill({
168
169
  response,
169
170
  status: statuses.every((status) => status >= 200 && status < 300) ? 200 : statuses[0]
@@ -178,12 +179,12 @@ class AlertRuleEditPage extends GrafanaPage.GrafanaPage {
178
179
  if (semver__namespace.lt(this.ctx.grafanaVersion, "11.1.0")) {
179
180
  evaluateButton = this.ctx.page.getByRole("button", { name: "Preview", exact: true });
180
181
  }
182
+ await test.expect(evaluateButton).toBeVisible();
181
183
  const evalReq = this.ctx.page.waitForRequest((req) => req.url().includes(this.ctx.selectors.apis.Alerting.eval), {
182
184
  timeout: 5e3
183
185
  }).catch(async () => {
184
186
  await evaluateButton.click();
185
187
  });
186
- await test.expect(evaluateButton).toBeVisible();
187
188
  await evaluateButton.click();
188
189
  await evalReq;
189
190
  return responsePromise;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-e2e",
3
- "version": "2.1.9-canary.2053.17260056832.0",
3
+ "version": "2.1.9-canary.2053.17260283567.0",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -47,5 +47,5 @@
47
47
  "uuid": "^11.0.2",
48
48
  "yaml": "^2.3.4"
49
49
  },
50
- "gitHead": "e37895f0b543c6dafaea7683deceb9dd13afcf9d"
50
+ "gitHead": "3f3f2d74646d1a892750d98bea495b7a7337f728"
51
51
  }