@grafana/plugin-e2e 2.1.9-canary.2053.17260283567.0 → 2.1.9-canary.2053.17261285607.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,6 @@ 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 fulfilled;
431
430
  constructor(ctx: PluginTestCtx, args?: AlertRuleArgs | undefined);
432
431
  /**
433
432
  * Navigates to the annotation edit page. If a dashboard uid was not provided, it's assumed that it's a new dashboard.
@@ -25,16 +25,12 @@ function _interopNamespaceDefault(e) {
25
25
 
26
26
  var semver__namespace = /*#__PURE__*/_interopNamespaceDefault(semver);
27
27
 
28
- var __defProp = Object.defineProperty;
29
- var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
30
- var __publicField = (obj, key, value) => __defNormalProp(obj, key + "" , value);
31
28
  const QUERY_AND_EXPRESSION_STEP_ID = "2";
32
29
  class AlertRuleEditPage extends GrafanaPage.GrafanaPage {
33
30
  constructor(ctx, args) {
34
31
  super(ctx, args);
35
32
  this.ctx = ctx;
36
33
  this.args = args;
37
- __publicField(this, "fulfilled", false);
38
34
  }
39
35
  /**
40
36
  * Navigates to the annotation edit page. If a dashboard uid was not provided, it's assumed that it's a new dashboard.
@@ -151,21 +147,16 @@ class AlertRuleEditPage extends GrafanaPage.GrafanaPage {
151
147
  */
152
148
  async evaluate(options) {
153
149
  await this.ctx.page.waitForTimeout(1e3);
154
- if (this.fulfilled) {
155
- await this.ctx.page.unroute(this.ctx.selectors.apis.Alerting.eval);
156
- this.fulfilled = false;
157
- }
158
150
  if (semver__namespace.gte(this.ctx.grafanaVersion, "10.0.0")) {
159
- this.ctx.page.route(this.ctx.selectors.apis.Alerting.eval, async (route) => {
151
+ await this.ctx.page.route(this.ctx.selectors.apis.Alerting.eval, async (route) => {
160
152
  const response = await route.fetch();
161
153
  if (!response.ok()) {
162
- this.fulfilled = true;
163
- return route.fulfill({ response });
154
+ await route.fulfill({ response });
155
+ return;
164
156
  }
165
157
  let body = await response.json();
166
158
  const statuses = Object.keys(body.results).map((key) => body.results[key].status);
167
- this.fulfilled = true;
168
- route.fulfill({
159
+ await route.fulfill({
169
160
  response,
170
161
  status: statuses.every((status) => status >= 200 && status < 300) ? 200 : statuses[0]
171
162
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-e2e",
3
- "version": "2.1.9-canary.2053.17260283567.0",
3
+ "version": "2.1.9-canary.2053.17261285607.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": "3f3f2d74646d1a892750d98bea495b7a7337f728"
50
+ "gitHead": "51110c9de7226f544c6b5f9c517bc26ea5ade1c2"
51
51
  }