@grafana/plugin-e2e 0.13.1 → 0.13.2

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,3 +1,4 @@
1
+ import { Response } from '@playwright/test';
1
2
  import { DataSource, NavigateOptions, PluginTestCtx, TriggerQueryOptions } from '../types';
2
3
  import { GrafanaPage } from './GrafanaPage';
3
4
  export declare class DataSourceConfigPage extends GrafanaPage {
@@ -19,5 +20,5 @@ export declare class DataSourceConfigPage extends GrafanaPage {
19
20
  *
20
21
  * Optionally, you can skip waiting for the response by passing in { skipWaitForResponse: true } as the options parameter
21
22
  */
22
- saveAndTest(options?: TriggerQueryOptions): Promise<void | import("playwright-core").Response>;
23
+ saveAndTest(options?: TriggerQueryOptions): Promise<Response>;
23
24
  }
@@ -34,7 +34,8 @@ class DataSourceConfigPage extends GrafanaPage_1.GrafanaPage {
34
34
  */
35
35
  async saveAndTest(options) {
36
36
  if (options?.skipWaitForResponse) {
37
- return this.getByTestIdOrAriaLabel(this.ctx.selectors.pages.DataSource.saveAndTest).click();
37
+ await this.getByTestIdOrAriaLabel(this.ctx.selectors.pages.DataSource.saveAndTest).click();
38
+ return this.ctx.page.waitForResponse('');
38
39
  }
39
40
  const saveResponsePromise = this.ctx.page.waitForResponse((resp) => resp.url().includes(this.ctx.selectors.apis.DataSource.datasourceByUID(this.datasource.uid)));
40
41
  const healthResponsePromise = this.ctx.page.waitForResponse((resp) => resp
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@grafana/plugin-e2e",
3
- "version": "0.13.1",
3
+ "version": "0.13.2",
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": "f1ea13c6dc4f748e8bf91ff3af87ee93fc92961b"
48
+ "gitHead": "e33d8bcf282d0642b0207c07eee75c68a0611f02"
49
49
  }