@grafana/plugin-e2e 0.12.0 → 0.12.1

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.
@@ -3,9 +3,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.overrideFeatureToggles = void 0;
4
4
  // this script is evaluated in the browser context, so we cannot use typescript
5
5
  const overrideFeatureToggles = (featureToggles) => {
6
- const timeout = 5;
6
+ const timeout = 1;
7
7
  const waitForGrafanaBootData = (cb) => {
8
- if (window.grafanaBootData) {
8
+ if (window?.grafanaBootData?.settings?.featureToggles) {
9
9
  cb();
10
10
  }
11
11
  else {
@@ -14,7 +14,7 @@ const overrideFeatureToggles = (featureToggles) => {
14
14
  };
15
15
  // wait for Grafana boot data to be added to the window object
16
16
  waitForGrafanaBootData(() => {
17
- const version = window?.grafanaBootData?.settings?.buildInfo?.version;
17
+ console.log('@grafana/plugin-e2e: setting the following feature toggles', featureToggles);
18
18
  // override feature toggles with the ones provided by the test
19
19
  window.grafanaBootData.settings.featureToggles = {
20
20
  ...window.grafanaBootData.settings.featureToggles,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-e2e",
3
- "version": "0.12.0",
3
+ "version": "0.12.1",
4
4
  "main": "./dist/index.js",
5
5
  "types": "./dist/index.d.ts",
6
6
  "files": [
@@ -45,5 +45,5 @@
45
45
  "semver": "^7.5.4",
46
46
  "uuid": "^9.0.1"
47
47
  },
48
- "gitHead": "f6a7e4108b83a253156df57a42a5e9c55d73e4ed"
48
+ "gitHead": "87daa3381c7b43ce74ade6bee586acb4b3970494"
49
49
  }