@grafana/plugin-e2e 0.0.4-canary.616.8eb70b7.0 → 0.1.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.
|
@@ -276,9 +276,6 @@ export declare const versionedComponents: {
|
|
|
276
276
|
OptionsGroup: {
|
|
277
277
|
group: (title?: string) => string;
|
|
278
278
|
toggle: (title?: string) => string;
|
|
279
|
-
groupTitle: {
|
|
280
|
-
"8.0.0": string;
|
|
281
|
-
};
|
|
282
279
|
};
|
|
283
280
|
PluginVisualization: {
|
|
284
281
|
item: (title: string) => string;
|
|
@@ -280,9 +280,6 @@ exports.versionedComponents = {
|
|
|
280
280
|
OptionsGroup: {
|
|
281
281
|
group: (title) => (title ? `Options group ${title}` : 'Options group'),
|
|
282
282
|
toggle: (title) => (title ? `Options group ${title} toggle` : 'Options group toggle'),
|
|
283
|
-
groupTitle: {
|
|
284
|
-
[constants_1.MIN_GRAFANA_VERSION]: 'Panel options',
|
|
285
|
-
},
|
|
286
283
|
},
|
|
287
284
|
PluginVisualization: {
|
|
288
285
|
item: (title) => `Plugin visualization item ${title}`,
|
|
@@ -10,9 +10,7 @@ export declare class PanelEditPage extends GrafanaPage implements PanelError {
|
|
|
10
10
|
timeRange: TimeRange;
|
|
11
11
|
constructor(ctx: PluginTestCtx, args: DashboardEditViewArgs<string>);
|
|
12
12
|
goto(options?: NavigateOptions): Promise<void>;
|
|
13
|
-
setPanelTitle(title: string): Promise<void>;
|
|
14
13
|
setVisualization(visualization: Visualization): Promise<void>;
|
|
15
|
-
getVisualizationName(): Locator;
|
|
16
14
|
apply(): Promise<void>;
|
|
17
15
|
getQueryEditorRow(refId: string): Promise<Locator>;
|
|
18
16
|
getPanelError(): Locator;
|
|
@@ -51,25 +51,11 @@ class PanelEditPage extends GrafanaPage_1.GrafanaPage {
|
|
|
51
51
|
options.queryParams.append('editPanel', this.args.id);
|
|
52
52
|
await super.navigate(url, options);
|
|
53
53
|
}
|
|
54
|
-
async setPanelTitle(title) {
|
|
55
|
-
const { OptionsGroup } = this.ctx.selectors.components;
|
|
56
|
-
const vizInput = await this.getByTestIdOrAriaLabel(OptionsGroup.group(OptionsGroup.groupTitle))
|
|
57
|
-
.locator('input')
|
|
58
|
-
.first();
|
|
59
|
-
const isVisible = await vizInput.isVisible();
|
|
60
|
-
if (!isVisible) {
|
|
61
|
-
await this.getByTestIdOrAriaLabel(OptionsGroup.group(OptionsGroup.groupTitle)).locator('button').click();
|
|
62
|
-
}
|
|
63
|
-
await vizInput.fill(title);
|
|
64
|
-
}
|
|
65
54
|
async setVisualization(visualization) {
|
|
66
55
|
await this.getByTestIdOrAriaLabel(this.ctx.selectors.components.PanelEditor.toggleVizPicker).click();
|
|
67
56
|
await this.getByTestIdOrAriaLabel(this.ctx.selectors.components.PluginVisualization.item(visualization)).click();
|
|
68
57
|
await (0, test_1.expect)(this.getByTestIdOrAriaLabel(this.ctx.selectors.components.PanelEditor.toggleVizPicker), `Could not set visualization to ${visualization}. Ensure the panel is installed.`).toHaveText(visualization);
|
|
69
58
|
}
|
|
70
|
-
getVisualizationName() {
|
|
71
|
-
return this.getByTestIdOrAriaLabel(this.ctx.selectors.components.PanelEditor.toggleVizPicker);
|
|
72
|
-
}
|
|
73
59
|
async apply() {
|
|
74
60
|
await this.ctx.page.getByTestId(this.ctx.selectors.components.PanelEditor.applyButton).click();
|
|
75
61
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/plugin-e2e",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.1.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -44,5 +44,5 @@
|
|
|
44
44
|
"semver": "^7.5.4",
|
|
45
45
|
"uuid": "^9.0.1"
|
|
46
46
|
},
|
|
47
|
-
"gitHead": "
|
|
47
|
+
"gitHead": "cd4548fcbe0a49b97effddfdc44cb21b659afccf"
|
|
48
48
|
}
|