@grafana/plugin-ui 0.3.5 → 0.3.6

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.
@@ -1,12 +1,15 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.migrateRunButton = exports.migrateSetting = void 0;
4
- const e2e_1 = require("@grafana/e2e");
3
+ exports.migrateRunButton = exports.migrateSetting = exports.setup = void 0;
4
+ const setup = (e2e) => {
5
+ (0, exports.migrateRunButton)(e2e);
6
+ };
7
+ exports.setup = setup;
5
8
  // workaround for missing selector
6
- const migrateSetting = (item, kind) => {
7
- const orig = e2e_1.e2e.pages.Dashboard.Settings.General.sectionItems;
9
+ const migrateSetting = (e2e, item, kind) => {
10
+ const orig = e2e.pages.Dashboard.Settings.General.sectionItems;
8
11
  // @ts-ignore
9
- e2e_1.e2e.pages.Dashboard.Settings.General.sectionItems = (value) => {
12
+ e2e.pages.Dashboard.Settings.General.sectionItems = (value) => {
10
13
  if (value === item) {
11
14
  const link = cy.get(`.dashboard-settings__nav-item[href*="${kind}"]`);
12
15
  return link;
@@ -16,8 +19,8 @@ const migrateSetting = (item, kind) => {
16
19
  };
17
20
  exports.migrateSetting = migrateSetting;
18
21
  // workaround for missing selector
19
- const migrateRunButton = () => {
20
- e2e_1.e2e.components.RefreshPicker.runButton = () => {
22
+ const migrateRunButton = (e2e) => {
23
+ e2e.components.RefreshPicker.runButton = () => {
21
24
  return cy.get('[data-testid="data-testid RefreshPicker run button"]').last();
22
25
  };
23
26
  };
@@ -1 +1 @@
1
- {"version":3,"file":"migrate.js","sourceRoot":"","sources":["../../src/e2e/migrate.ts"],"names":[],"mappings":";;;AAAA,sCAAmC;AAEnC,kCAAkC;AAC3B,MAAM,cAAc,GAAG,CAAC,IAAiC,EAAE,IAAkC,EAAE,EAAE;IACpG,MAAM,IAAI,GAAG,SAAG,CAAC,KAAK,CAAC,SAAS,CAAC,QAAQ,CAAC,OAAO,CA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,IAAI,IAAI,CAAC,CAAA;YACrE,OAAO,IAAI,CAAC;SACb;QACD,OAAO,IAAI,CAAC;IACd,CAAC,CAAA;AACL,CAAC,CAAA;AAVY,QAAA,cAAc,kBAU1B;AAED,kCAAkC;AAC3B,MAAM,gBAAgB,GAAG,CAAC,GAAQ,EAAE,EAAE;IAC3C,GAAG,CAAC,UAAU,CAAC,aAAa,CAAC,SAAS,GAAG,GAAG,EAAE;QAC5C,OAAO,EAAE,CAAC,GAAG,CAAC,sDAAsD,CAAC,CAAC,IAAI,EAAE,CAAC;IAC/E,CAAC,CAAA;AACH,CAAC,CAAA;AAJY,QAAA,gBAAgB,oBAI5B"}
@@ -1,2 +1,3 @@
1
- export declare const migrateSetting: (item: 'Variables' | 'Annotations', kind: 'templating' | 'annotations') => void;
2
- export declare const migrateRunButton: () => void;
1
+ export declare const setup: (e2e: any) => void;
2
+ export declare const migrateSetting: (e2e: any, item: 'Variables' | 'Annotations', kind: 'templating' | 'annotations') => void;
3
+ export declare const migrateRunButton: (e2e: any) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-ui",
3
- "version": "0.3.5",
3
+ "version": "0.3.6",
4
4
  "repository": "git@github.com:grafana/plugin-ui.git",
5
5
  "author": "Grafana Labs",
6
6
  "main": "dist/index.js",