@smartbit4all/playwright-qa 0.1.3 → 0.1.4

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.
@@ -0,0 +1,10 @@
1
+ import type { Page, Locator } from '@playwright/test';
2
+ /**
3
+ * Returns the topmost (last) open dialog (Angular Material or PrimeNG).
4
+ */
5
+ export declare function topDialog(page: Page): Locator;
6
+ /**
7
+ * Clicks a button inside the topmost dialog by its visible text.
8
+ */
9
+ export declare function clickInDialog(page: Page, buttonText: string): Promise<void>;
10
+ //# sourceMappingURL=dialog.steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.steps.d.ts","sourceRoot":"","sources":["../../src/steps/dialog.steps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAKtD;;GAEG;AACH,wBAAgB,SAAS,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAE7C;AAED;;GAEG;AACH,wBAAsB,aAAa,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC,CAIjF"}
@@ -0,0 +1,21 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.topDialog = topDialog;
4
+ exports.clickInDialog = clickInDialog;
5
+ const wait_1 = require("./wait");
6
+ const DIALOG_SELECTOR = 'mat-dialog-container, .p-dialog';
7
+ /**
8
+ * Returns the topmost (last) open dialog (Angular Material or PrimeNG).
9
+ */
10
+ function topDialog(page) {
11
+ return page.locator(DIALOG_SELECTOR).last();
12
+ }
13
+ /**
14
+ * Clicks a button inside the topmost dialog by its visible text.
15
+ */
16
+ async function clickInDialog(page, buttonText) {
17
+ const dialog = topDialog(page);
18
+ await dialog.locator('button', { hasText: buttonText }).click();
19
+ await (0, wait_1.waitForAngularIdle)(page);
20
+ }
21
+ //# sourceMappingURL=dialog.steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"dialog.steps.js","sourceRoot":"","sources":["../../src/steps/dialog.steps.ts"],"names":[],"mappings":";;AAQA,8BAEC;AAKD,sCAIC;AAlBD,iCAA4C;AAE5C,MAAM,eAAe,GAAG,iCAAiC,CAAC;AAE1D;;GAEG;AACH,SAAgB,SAAS,CAAC,IAAU;IAClC,OAAO,IAAI,CAAC,OAAO,CAAC,eAAe,CAAC,CAAC,IAAI,EAAE,CAAC;AAC9C,CAAC;AAED;;GAEG;AACI,KAAK,UAAU,aAAa,CAAC,IAAU,EAAE,UAAkB;IAChE,MAAM,MAAM,GAAG,SAAS,CAAC,IAAI,CAAC,CAAC;IAC/B,MAAM,MAAM,CAAC,OAAO,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;IAChE,MAAM,IAAA,yBAAkB,EAAC,IAAI,CAAC,CAAC;AACjC,CAAC"}
@@ -1,4 +1,5 @@
1
1
  export { waitForAngularIdle } from './wait';
2
2
  export { selectGridRow, filterAndSelectGridRow, applyGridFilters, clearGridFilters, type RowFilter, } from './grid.steps';
3
3
  export { navigateToMain, navigateInTree, } from './navigation.steps';
4
+ export { topDialog, clickInDialog, } from './dialog.steps';
4
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,SAAS,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,cAAc,EACd,cAAc,GACf,MAAM,oBAAoB,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAE5C,OAAO,EACL,aAAa,EACb,sBAAsB,EACtB,gBAAgB,EAChB,gBAAgB,EAChB,KAAK,SAAS,GACf,MAAM,cAAc,CAAC;AAEtB,OAAO,EACL,cAAc,EACd,cAAc,GACf,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,SAAS,EACT,aAAa,GACd,MAAM,gBAAgB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.navigateInTree = exports.navigateToMain = exports.clearGridFilters = exports.applyGridFilters = exports.filterAndSelectGridRow = exports.selectGridRow = exports.waitForAngularIdle = void 0;
3
+ exports.clickInDialog = exports.topDialog = exports.navigateInTree = exports.navigateToMain = exports.clearGridFilters = exports.applyGridFilters = exports.filterAndSelectGridRow = exports.selectGridRow = exports.waitForAngularIdle = void 0;
4
4
  var wait_1 = require("./wait");
5
5
  Object.defineProperty(exports, "waitForAngularIdle", { enumerable: true, get: function () { return wait_1.waitForAngularIdle; } });
6
6
  var grid_steps_1 = require("./grid.steps");
@@ -11,4 +11,7 @@ Object.defineProperty(exports, "clearGridFilters", { enumerable: true, get: func
11
11
  var navigation_steps_1 = require("./navigation.steps");
12
12
  Object.defineProperty(exports, "navigateToMain", { enumerable: true, get: function () { return navigation_steps_1.navigateToMain; } });
13
13
  Object.defineProperty(exports, "navigateInTree", { enumerable: true, get: function () { return navigation_steps_1.navigateInTree; } });
14
+ var dialog_steps_1 = require("./dialog.steps");
15
+ Object.defineProperty(exports, "topDialog", { enumerable: true, get: function () { return dialog_steps_1.topDialog; } });
16
+ Object.defineProperty(exports, "clickInDialog", { enumerable: true, get: function () { return dialog_steps_1.clickInDialog; } });
14
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAAnC,0GAAA,kBAAkB,OAAA;AAE3B,2CAMsB;AALpB,2GAAA,aAAa,OAAA;AACb,oHAAA,sBAAsB,OAAA;AACtB,8GAAA,gBAAgB,OAAA;AAChB,8GAAA,gBAAgB,OAAA;AAIlB,uDAG4B;AAF1B,kHAAA,cAAc,OAAA;AACd,kHAAA,cAAc,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAAnC,0GAAA,kBAAkB,OAAA;AAE3B,2CAMsB;AALpB,2GAAA,aAAa,OAAA;AACb,oHAAA,sBAAsB,OAAA;AACtB,8GAAA,gBAAgB,OAAA;AAChB,8GAAA,gBAAgB,OAAA;AAIlB,uDAG4B;AAF1B,kHAAA,cAAc,OAAA;AACd,kHAAA,cAAc,OAAA;AAGhB,+CAGwB;AAFtB,yGAAA,SAAS,OAAA;AACT,6GAAA,aAAa,OAAA"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smartbit4all/playwright-qa",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "Playwright-based testing and documentation framework for smartbit4all projects",
5
5
  "main": "dist/index.js",
6
6
  "types": "dist/index.d.ts",