@grafana/plugin-e2e 0.12.0-canary.688.e577e35.0 → 0.12.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/models/Panel.js +0 -18
- package/dist/models/PanelEditPage.js +0 -9
- package/package.json +2 -2
- package/dist/models/utils.js +0 -12
package/dist/models/Panel.js
CHANGED
|
@@ -35,24 +35,6 @@ class Panel extends GrafanaPage_1.GrafanaPage {
|
|
|
35
35
|
this.ctx = ctx;
|
|
36
36
|
this.locator = locator;
|
|
37
37
|
}
|
|
38
|
-
/**
|
|
39
|
-
* Returns a locator that resolves element(s) that contain the field name(s) that are currently displayed in the panel.
|
|
40
|
-
*
|
|
41
|
-
* Can be used to assert the field names displayed in the panel visualization. e.g
|
|
42
|
-
* await expect(panelEditPage.panel.getFieldNames()).toHaveValues(['Month', 'Stockholm', 'Berlin', 'Log Angeles']);
|
|
43
|
-
*/
|
|
44
|
-
getFieldNames() {
|
|
45
|
-
return this.locator().locator('[role="columnheader"]');
|
|
46
|
-
}
|
|
47
|
-
/**
|
|
48
|
-
* Returns a locator that resolves element(s) that contain the value(s) that are currently displayed in the panel.
|
|
49
|
-
*
|
|
50
|
-
* Can be used to assert the values displayed in the panel visualization. e.g
|
|
51
|
-
* await expect(panelEditPage.panel.getData()).toContainText(['1', '4', '14']);
|
|
52
|
-
*/
|
|
53
|
-
getData() {
|
|
54
|
-
return this.locator().locator('[role="cell"]');
|
|
55
|
-
}
|
|
56
38
|
/**
|
|
57
39
|
* Returns the locator for the panel error (if any)
|
|
58
40
|
*/
|
|
@@ -6,7 +6,6 @@ const DataSourcePicker_1 = require("./DataSourcePicker");
|
|
|
6
6
|
const GrafanaPage_1 = require("./GrafanaPage");
|
|
7
7
|
const TimeRange_1 = require("./TimeRange");
|
|
8
8
|
const Panel_1 = require("./Panel");
|
|
9
|
-
const utils_1 = require("./utils");
|
|
10
9
|
class PanelEditPage extends GrafanaPage_1.GrafanaPage {
|
|
11
10
|
ctx;
|
|
12
11
|
args;
|
|
@@ -35,14 +34,6 @@ class PanelEditPage extends GrafanaPage_1.GrafanaPage {
|
|
|
35
34
|
options.queryParams.append('editPanel', this.args.id);
|
|
36
35
|
await super.navigate(url, options);
|
|
37
36
|
}
|
|
38
|
-
async toggleTableView() {
|
|
39
|
-
await (0, utils_1.radioButtonSetChecked)(this.ctx.page, 'Table view', true);
|
|
40
|
-
this.panel = new Panel_1.Panel(this.ctx, () => this.ctx.page.getByTestId('Panel'));
|
|
41
|
-
}
|
|
42
|
-
async untoggleTableView() {
|
|
43
|
-
await (0, utils_1.radioButtonSetChecked)(this.ctx.page, 'Table view', false);
|
|
44
|
-
this.panel = new Panel_1.Panel(this.ctx, () => this.getByTestIdOrAriaLabel(this.ctx.selectors.components.Panels.Panel.title(''), { startsWith: true }));
|
|
45
|
-
}
|
|
46
37
|
/**
|
|
47
38
|
* Sets the title of the panel. This method will open the panel options, set the title and close the panel options.
|
|
48
39
|
*/
|
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.0",
|
|
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": "
|
|
48
|
+
"gitHead": "f6a7e4108b83a253156df57a42a5e9c55d73e4ed"
|
|
49
49
|
}
|
package/dist/models/utils.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.radioButtonSetChecked = void 0;
|
|
4
|
-
const radioButtonSetChecked = async (page, label, checked, options) => {
|
|
5
|
-
try {
|
|
6
|
-
await page.getByLabel(label, options).setChecked(checked);
|
|
7
|
-
}
|
|
8
|
-
catch (_) {
|
|
9
|
-
await page.getByText(label, options).setChecked(checked);
|
|
10
|
-
}
|
|
11
|
-
};
|
|
12
|
-
exports.radioButtonSetChecked = radioButtonSetChecked;
|