@grafana/plugin-e2e 2.2.0-canary.1970.17152851704.0 → 2.2.0-canary.2093.17459487840.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/README.md
CHANGED
|
@@ -24,7 +24,7 @@ Checkout our [`Get started`](https://grafana.com/developers/plugin-tools/e2e-tes
|
|
|
24
24
|
|
|
25
25
|
### Prerequisites
|
|
26
26
|
|
|
27
|
-
- You need to have a Grafana plugin [development environment](https://grafana.com/developers/plugin-tools/get-started/set-up
|
|
27
|
+
- You need to have a Grafana plugin [development environment](https://grafana.com/developers/plugin-tools/get-started/set-up/)
|
|
28
28
|
- Node.js 18+
|
|
29
29
|
- Basic Knowledge of Playwright. If you have not worked with Playwright before, we recommend following the [Getting started](https://playwright.dev/docs/intro) section in their documentation
|
|
30
30
|
|
|
@@ -148,14 +148,15 @@ class AlertRuleEditPage extends GrafanaPage.GrafanaPage {
|
|
|
148
148
|
async evaluate(options) {
|
|
149
149
|
await this.ctx.page.waitForTimeout(1e3);
|
|
150
150
|
if (semver__namespace.gte(this.ctx.grafanaVersion, "10.0.0")) {
|
|
151
|
-
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) => {
|
|
152
152
|
const response = await route.fetch();
|
|
153
153
|
if (!response.ok()) {
|
|
154
|
-
|
|
154
|
+
await route.fulfill({ response });
|
|
155
|
+
return;
|
|
155
156
|
}
|
|
156
157
|
let body = await response.json();
|
|
157
158
|
const statuses = Object.keys(body.results).map((key) => body.results[key].status);
|
|
158
|
-
route.fulfill({
|
|
159
|
+
await route.fulfill({
|
|
159
160
|
response,
|
|
160
161
|
status: statuses.every((status) => status >= 200 && status < 300) ? 200 : statuses[0]
|
|
161
162
|
});
|
|
@@ -169,6 +170,7 @@ class AlertRuleEditPage extends GrafanaPage.GrafanaPage {
|
|
|
169
170
|
if (semver__namespace.lt(this.ctx.grafanaVersion, "11.1.0")) {
|
|
170
171
|
evaluateButton = this.ctx.page.getByRole("button", { name: "Preview", exact: true });
|
|
171
172
|
}
|
|
173
|
+
await test.expect(evaluateButton).toBeVisible();
|
|
172
174
|
const evalReq = this.ctx.page.waitForRequest((req) => req.url().includes(this.ctx.selectors.apis.Alerting.eval), {
|
|
173
175
|
timeout: 5e3
|
|
174
176
|
}).catch(async () => {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@grafana/plugin-e2e",
|
|
3
|
-
"version": "2.2.0-canary.
|
|
3
|
+
"version": "2.2.0-canary.2093.17459487840.0",
|
|
4
4
|
"main": "./dist/index.js",
|
|
5
5
|
"types": "./dist/index.d.ts",
|
|
6
6
|
"files": [
|
|
@@ -37,15 +37,15 @@
|
|
|
37
37
|
"@playwright/test": "^1.52.0"
|
|
38
38
|
},
|
|
39
39
|
"devDependencies": {
|
|
40
|
-
"@playwright/test": "^1.
|
|
40
|
+
"@playwright/test": "^1.55.0",
|
|
41
41
|
"@types/uuid": "^10.0.0",
|
|
42
42
|
"dotenv": "^17.2.1"
|
|
43
43
|
},
|
|
44
44
|
"dependencies": {
|
|
45
|
-
"@grafana/e2e-selectors": "^12.
|
|
45
|
+
"@grafana/e2e-selectors": "^12.2.0-255920",
|
|
46
46
|
"semver": "^7.5.4",
|
|
47
47
|
"uuid": "^11.0.2",
|
|
48
48
|
"yaml": "^2.3.4"
|
|
49
49
|
},
|
|
50
|
-
"gitHead": "
|
|
50
|
+
"gitHead": "82e94c8995733085cdac8e266702cf6854ae42c4"
|
|
51
51
|
}
|