@smartbit4all/playwright-qa 0.2.2 → 0.2.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.
@@ -1 +1 @@
1
- {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/steps/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAqDtD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAczG;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBzG;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAcnG"}
1
+ {"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../src/steps/actions.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,IAAI,EAAE,OAAO,EAAE,MAAM,kBAAkB,CAAC;AAwDtD;;;;GAIG;AACH,wBAAsB,gBAAgB,CAAC,IAAI,EAAE,IAAI,EAAE,UAAU,EAAE,MAAM,EAAE,EAAE,KAAK,EAAE,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC,CAczG;AAED;;;;;;;GAOG;AACH,wBAAsB,cAAc,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,OAAO,CAAC,CAkBzG;AAED;;;;GAIG;AACH,wBAAsB,WAAW,CAAC,SAAS,EAAE,IAAI,GAAG,OAAO,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,OAAO,CAAC,IAAI,CAAC,CAcnG"}
@@ -13,10 +13,13 @@ function getPage(container) {
13
13
  /**
14
14
  * Resolves a menu item (leaf action or submenu trigger) inside an already-open panel by action code
15
15
  * first, then visible title — across all three menu implementations (Custom, Material, PrimeNG).
16
+ *
17
+ * `ui-action-button` exposes the bare action code as `data-testid` and the identifier-qualified code
18
+ * (`{code}_{identifier}`) as `data-testid2`, so both forms resolve the same item.
16
19
  */
17
20
  function resolveMenuItem(scope, text) {
18
- return scope.locator(`button[data-testid="${text}"], button:has-text("${text}"), ` +
19
- `[data-testid="${text}"], [data-automationid="${text}"], ` +
21
+ return scope.locator(`button[data-testid="${text}"], button[data-testid2="${text}"], button:has-text("${text}"), ` +
22
+ `[data-testid="${text}"], [data-testid2="${text}"], [data-automationid="${text}"], ` +
20
23
  `.p-menuitem-link:has-text("${text}"), .p-menuitem-content:has-text("${text}")`).first();
21
24
  }
22
25
  /** Waits until the number of panels matching `selector` exceeds `baseline`. False on timeout. */
@@ -1 +1 @@
1
- {"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/steps/actions.ts"],"names":[],"mappings":";;AA0DA,4CAcC;AAUD,wCAkBC;AAOD,kCAcC;AAxHD,iCAA4C;AAC5C,yCAAqF;AAErF,oGAAoG;AACpG,MAAM,kBAAkB,GAAG,IAAI,CAAC;AAEhC,SAAS,OAAO,CAAC,SAAyB;IACxC,OAAO,MAAM,IAAI,SAAS,CAAC,CAAC,CAAE,SAAqB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAE,SAAkB,CAAC;AACnF,CAAC;AAED;;;GAGG;AACH,SAAS,eAAe,CAAC,KAAc,EAAE,IAAY;IACnD,OAAO,KAAK,CAAC,OAAO,CAClB,uBAAuB,IAAI,wBAAwB,IAAI,MAAM;QAC7D,iBAAiB,IAAI,2BAA2B,IAAI,MAAM;QAC1D,8BAA8B,IAAI,qCAA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D,MAAM,IAAI,CAAC,KAAK,EAAE,CAAC;IACnB,MAAM,IAAA,yBAAkB,EAAC,IAAI,CAAC,CAAC;AACjC,CAAC"}
@@ -0,0 +1,19 @@
1
+ import type { Download, Locator, Page } from '@playwright/test';
2
+ /**
3
+ * Clicks a button that triggers a download and returns the resulting `Download` object.
4
+ *
5
+ * Playwright only exposes a triggered download via the `download` event — a plain `.click()`
6
+ * still fires the download in the browser (you may see it in the download indicator, sometimes
7
+ * as a `blob:` URI), but without this the test has no handle to it, so it can't be asserted or
8
+ * saved.
9
+ *
10
+ * Note: this listens on `page` itself. If the button opens the download in a new tab
11
+ * (`target="_blank"` / `window.open`), the `download` event fires on that new `Page` instead, and
12
+ * this helper won't see it.
13
+ *
14
+ * @param container page or scope (e.g. a dialog) containing the button
15
+ * @param text data-testid or visible text of the button, as used by `findButton`
16
+ * @param timeout max time to wait for the download to start, in ms
17
+ */
18
+ export declare function downloadWithButton(container: Page | Locator, text: string, timeout?: number): Promise<Download>;
19
+ //# sourceMappingURL=download.steps.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download.steps.d.ts","sourceRoot":"","sources":["../../src/steps/download.steps.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAOhE;;;;;;;;;;;;;;;GAeG;AACH,wBAAsB,kBAAkB,CACtC,SAAS,EAAE,IAAI,GAAG,OAAO,EACzB,IAAI,EAAE,MAAM,EACZ,OAAO,SAAQ,GACd,OAAO,CAAC,QAAQ,CAAC,CAOnB"}
@@ -0,0 +1,32 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.downloadWithButton = downloadWithButton;
4
+ const locators_1 = require("./locators");
5
+ function getPage(container) {
6
+ return 'page' in container ? container.page() : container;
7
+ }
8
+ /**
9
+ * Clicks a button that triggers a download and returns the resulting `Download` object.
10
+ *
11
+ * Playwright only exposes a triggered download via the `download` event — a plain `.click()`
12
+ * still fires the download in the browser (you may see it in the download indicator, sometimes
13
+ * as a `blob:` URI), but without this the test has no handle to it, so it can't be asserted or
14
+ * saved.
15
+ *
16
+ * Note: this listens on `page` itself. If the button opens the download in a new tab
17
+ * (`target="_blank"` / `window.open`), the `download` event fires on that new `Page` instead, and
18
+ * this helper won't see it.
19
+ *
20
+ * @param container page or scope (e.g. a dialog) containing the button
21
+ * @param text data-testid or visible text of the button, as used by `findButton`
22
+ * @param timeout max time to wait for the download to start, in ms
23
+ */
24
+ async function downloadWithButton(container, text, timeout = 30000) {
25
+ const page = getPage(container);
26
+ const [download] = await Promise.all([
27
+ page.waitForEvent('download', { timeout }),
28
+ (0, locators_1.findButton)(container, text).click(),
29
+ ]);
30
+ return download;
31
+ }
32
+ //# sourceMappingURL=download.steps.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"download.steps.js","sourceRoot":"","sources":["../../src/steps/download.steps.ts"],"names":[],"mappings":";;AAuBA,gDAWC;AAjCD,yCAAwC;AAExC,SAAS,OAAO,CAAC,SAAyB;IACxC,OAAO,MAAM,IAAI,SAAS,CAAC,CAAC,CAAE,SAAqB,CAAC,IAAI,EAAE,CAAC,CAAC,CAAE,SAAkB,CAAC;AACnF,CAAC;AAED;;;;;;;;;;;;;;;GAeG;AACI,KAAK,UAAU,kBAAkB,CACtC,SAAyB,EACzB,IAAY,EACZ,OAAO,GAAG,KAAK;IAEf,MAAM,IAAI,GAAG,OAAO,CAAC,SAAS,CAAC,CAAC;IAChC,MAAM,CAAC,QAAQ,CAAC,GAAG,MAAM,OAAO,CAAC,GAAG,CAAC;QACnC,IAAI,CAAC,YAAY,CAAC,UAAU,EAAE,EAAE,OAAO,EAAE,CAAC;QAC1C,IAAA,qBAAU,EAAC,SAAS,EAAE,IAAI,CAAC,CAAC,KAAK,EAAE;KACpC,CAAC,CAAC;IACH,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -4,6 +4,7 @@ export { navigateToMain, navigateInTree, } from './navigation.steps';
4
4
  export { topDialog, clickInDialog, } from './dialog.steps';
5
5
  export { findButton, findPopupMenu, findMenuItem, POPUP_PANEL_SELECTOR, CUSTOM_PANEL_SELECTOR, } from './locators';
6
6
  export { clickAction, openActionPath, } from './actions';
7
+ export { downloadWithButton, } from './download.steps';
7
8
  export { fillField, fillDate, fillDateTime, selectOption, selectMultiple, selectRadio, setCheckbox, setCheckboxGroup, setToggle, addChip, removeChip, setChips, uploadFile, toggleAccordion, setField, setFields, type FieldValue, } from './forms';
8
9
  export { dumpDom, type DomElementInfo, type DumpDomOptions, } from './debug';
9
10
  //# 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,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,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;AAExB,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,EACR,SAAS,EACT,KAAK,UAAU,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,SAAS,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,YAAY,EACZ,mBAAmB,EACnB,gBAAgB,EAChB,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;AAExB,OAAO,EACL,UAAU,EACV,aAAa,EACb,YAAY,EACZ,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,YAAY,CAAC;AAEpB,OAAO,EACL,WAAW,EACX,cAAc,GACf,MAAM,WAAW,CAAC;AAEnB,OAAO,EACL,kBAAkB,GACnB,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,SAAS,EACT,QAAQ,EACR,YAAY,EACZ,YAAY,EACZ,cAAc,EACd,WAAW,EACX,WAAW,EACX,gBAAgB,EAChB,SAAS,EACT,OAAO,EACP,UAAU,EACV,QAAQ,EACR,UAAU,EACV,eAAe,EACf,QAAQ,EACR,SAAS,EACT,KAAK,UAAU,GAChB,MAAM,SAAS,CAAC;AAEjB,OAAO,EACL,OAAO,EACP,KAAK,cAAc,EACnB,KAAK,cAAc,GACpB,MAAM,SAAS,CAAC"}
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.dumpDom = exports.setFields = exports.setField = exports.toggleAccordion = exports.uploadFile = exports.setChips = exports.removeChip = exports.addChip = exports.setToggle = exports.setCheckboxGroup = exports.setCheckbox = exports.selectRadio = exports.selectMultiple = exports.selectOption = exports.fillDateTime = exports.fillDate = exports.fillField = exports.openActionPath = exports.clickAction = exports.CUSTOM_PANEL_SELECTOR = exports.POPUP_PANEL_SELECTOR = exports.findMenuItem = exports.findPopupMenu = exports.findButton = exports.clickInDialog = exports.topDialog = exports.navigateInTree = exports.navigateToMain = exports.clearGridFilters = exports.applyGridFilters = exports.filterAndSelectGridRow = exports.checkAllGridRows = exports.checkGridRowsOnPage = exports.checkGridRow = exports.selectGridRow = exports.waitForAngularIdle = void 0;
3
+ exports.dumpDom = exports.setFields = exports.setField = exports.toggleAccordion = exports.uploadFile = exports.setChips = exports.removeChip = exports.addChip = exports.setToggle = exports.setCheckboxGroup = exports.setCheckbox = exports.selectRadio = exports.selectMultiple = exports.selectOption = exports.fillDateTime = exports.fillDate = exports.fillField = exports.downloadWithButton = exports.openActionPath = exports.clickAction = exports.CUSTOM_PANEL_SELECTOR = exports.POPUP_PANEL_SELECTOR = exports.findMenuItem = exports.findPopupMenu = exports.findButton = exports.clickInDialog = exports.topDialog = exports.navigateInTree = exports.navigateToMain = exports.clearGridFilters = exports.applyGridFilters = exports.filterAndSelectGridRow = exports.checkAllGridRows = exports.checkGridRowsOnPage = exports.checkGridRow = 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");
@@ -26,6 +26,8 @@ Object.defineProperty(exports, "CUSTOM_PANEL_SELECTOR", { enumerable: true, get:
26
26
  var actions_1 = require("./actions");
27
27
  Object.defineProperty(exports, "clickAction", { enumerable: true, get: function () { return actions_1.clickAction; } });
28
28
  Object.defineProperty(exports, "openActionPath", { enumerable: true, get: function () { return actions_1.openActionPath; } });
29
+ var download_steps_1 = require("./download.steps");
30
+ Object.defineProperty(exports, "downloadWithButton", { enumerable: true, get: function () { return download_steps_1.downloadWithButton; } });
29
31
  var forms_1 = require("./forms");
30
32
  Object.defineProperty(exports, "fillField", { enumerable: true, get: function () { return forms_1.fillField; } });
31
33
  Object.defineProperty(exports, "fillDate", { enumerable: true, get: function () { return forms_1.fillDate; } });
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAAnC,0GAAA,kBAAkB,OAAA;AAE3B,2CASsB;AARpB,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA;AACZ,iHAAA,mBAAmB,OAAA;AACnB,8GAAA,gBAAgB,OAAA;AAChB,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;AAGf,uCAMoB;AALlB,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AAGvB,qCAGmB;AAFjB,sGAAA,WAAW,OAAA;AACX,yGAAA,cAAc,OAAA;AAGhB,iCAkBiB;AAjBf,kGAAA,SAAS,OAAA;AACT,iGAAA,QAAQ,OAAA;AACR,qGAAA,YAAY,OAAA;AACZ,qGAAA,YAAY,OAAA;AACZ,uGAAA,cAAc,OAAA;AACd,oGAAA,WAAW,OAAA;AACX,oGAAA,WAAW,OAAA;AACX,yGAAA,gBAAgB,OAAA;AAChB,kGAAA,SAAS,OAAA;AACT,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,iGAAA,QAAQ,OAAA;AACR,mGAAA,UAAU,OAAA;AACV,wGAAA,eAAe,OAAA;AACf,iGAAA,QAAQ,OAAA;AACR,kGAAA,SAAS,OAAA;AAIX,iCAIiB;AAHf,gGAAA,OAAO,OAAA"}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/steps/index.ts"],"names":[],"mappings":";;;AAAA,+BAA4C;AAAnC,0GAAA,kBAAkB,OAAA;AAE3B,2CASsB;AARpB,2GAAA,aAAa,OAAA;AACb,0GAAA,YAAY,OAAA;AACZ,iHAAA,mBAAmB,OAAA;AACnB,8GAAA,gBAAgB,OAAA;AAChB,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;AAGf,uCAMoB;AALlB,sGAAA,UAAU,OAAA;AACV,yGAAA,aAAa,OAAA;AACb,wGAAA,YAAY,OAAA;AACZ,gHAAA,oBAAoB,OAAA;AACpB,iHAAA,qBAAqB,OAAA;AAGvB,qCAGmB;AAFjB,sGAAA,WAAW,OAAA;AACX,yGAAA,cAAc,OAAA;AAGhB,mDAE0B;AADxB,oHAAA,kBAAkB,OAAA;AAGpB,iCAkBiB;AAjBf,kGAAA,SAAS,OAAA;AACT,iGAAA,QAAQ,OAAA;AACR,qGAAA,YAAY,OAAA;AACZ,qGAAA,YAAY,OAAA;AACZ,uGAAA,cAAc,OAAA;AACd,oGAAA,WAAW,OAAA;AACX,oGAAA,WAAW,OAAA;AACX,yGAAA,gBAAgB,OAAA;AAChB,kGAAA,SAAS,OAAA;AACT,gGAAA,OAAO,OAAA;AACP,mGAAA,UAAU,OAAA;AACV,iGAAA,QAAQ,OAAA;AACR,mGAAA,UAAU,OAAA;AACV,wGAAA,eAAe,OAAA;AACf,iGAAA,QAAQ,OAAA;AACR,kGAAA,SAAS,OAAA;AAIX,iCAIiB;AAHf,gGAAA,OAAO,OAAA"}
@@ -1,7 +1,11 @@
1
1
  import type { Locator, Page } from '@playwright/test';
2
2
  /**
3
- * Finds a button by data-testid first, falling back to visible text.
3
+ * Finds a button by data-testid / data-testid2 first, falling back to visible text.
4
4
  * Works with both data-testid values and button labels for backward compatibility.
5
+ *
6
+ * `ui-action-button` renders the bare action code as `data-testid` and the code combined with the
7
+ * instance identifier (`{code}_{identifier}`) as `data-testid2`, so the same button is addressable
8
+ * by either the shared code or the identifier-qualified one.
5
9
  */
6
10
  export declare function findButton(container: Locator | Page, text: string): Locator;
7
11
  /**
@@ -19,13 +23,15 @@ export declare const POPUP_PANEL_SELECTOR = ".sb4-menu-panel, .mat-mdc-menu-pane
19
23
  export declare const CUSTOM_PANEL_SELECTOR = ".sb4-menu-panel";
20
24
  export declare function findPopupMenu(page: Page): Locator;
21
25
  /**
22
- * Finds a menu item by data-testid / data-automationid first, falling back to visible text.
26
+ * Finds a menu item by data-testid / data-testid2 / data-automationid first, falling back to
27
+ * visible text.
23
28
  *
24
29
  * Supports three menu implementations:
25
30
  * - smartbit4all custom menu (`.sb4-menu-panel`): every item is a `ui-action-button` rendered as
26
- * `<button data-testid="{action code}">`, in both the Material and PrimeNG component libraries
27
- * (only the button's own attributes differ). The `text` matches the action code (data-testid) or
28
- * the visible title. Used by grid/table action menus since #29411.
31
+ * `<button data-testid="{action code}" data-testid2="{action code}_{identifier}">`, in both the
32
+ * Material and PrimeNG component libraries (only the button's own attributes differ). The `text`
33
+ * matches the action code (data-testid), the identifier-qualified code (data-testid2) or the
34
+ * visible title. Used by grid/table action menus since #29411.
29
35
  * - Angular Material (`.mat-mdc-menu-panel`): `<button mat-menu-item data-testid>`.
30
36
  * - PrimeNG (`.p-menu`, `.p-tieredmenu`, `.p-contextmenu`): items expose `menuItem.automationId`
31
37
  * as the `data-automationid` DOM attribute (no data-testid).
@@ -1 +1 @@
1
- {"version":3,"file":"locators.d.ts","sourceRoot":"","sources":["../../src/steps/locators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;GAGG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAE3E;AAED;;;;;;;;GAQG;AACH,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,sHACoF,CAAC;AAEtH,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAEjD;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAS9D"}
1
+ {"version":3,"file":"locators.d.ts","sourceRoot":"","sources":["../../src/steps/locators.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAEtD;;;;;;;GAOG;AACH,wBAAgB,UAAU,CAAC,SAAS,EAAE,OAAO,GAAG,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAI3E;AAED;;;;;;;;GAQG;AACH,iFAAiF;AACjF,eAAO,MAAM,oBAAoB,sHACoF,CAAC;AAEtH,6FAA6F;AAC7F,eAAO,MAAM,qBAAqB,oBAAoB,CAAC;AAEvD,wBAAgB,aAAa,CAAC,IAAI,EAAE,IAAI,GAAG,OAAO,CAEjD;AAED;;;;;;;;;;;;;GAaG;AACH,wBAAgB,YAAY,CAAC,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,GAAG,OAAO,CAS9D"}
@@ -5,11 +5,17 @@ exports.findButton = findButton;
5
5
  exports.findPopupMenu = findPopupMenu;
6
6
  exports.findMenuItem = findMenuItem;
7
7
  /**
8
- * Finds a button by data-testid first, falling back to visible text.
8
+ * Finds a button by data-testid / data-testid2 first, falling back to visible text.
9
9
  * Works with both data-testid values and button labels for backward compatibility.
10
+ *
11
+ * `ui-action-button` renders the bare action code as `data-testid` and the code combined with the
12
+ * instance identifier (`{code}_{identifier}`) as `data-testid2`, so the same button is addressable
13
+ * by either the shared code or the identifier-qualified one.
10
14
  */
11
15
  function findButton(container, text) {
12
- return container.locator(`button[data-testid="${text}"], button:has-text("${text}")`).first();
16
+ return container
17
+ .locator(`button[data-testid="${text}"], button[data-testid2="${text}"], button:has-text("${text}")`)
18
+ .first();
13
19
  }
14
20
  /**
15
21
  * Finds the currently visible popup menu panel.
@@ -28,23 +34,25 @@ function findPopupMenu(page) {
28
34
  return page.locator(exports.POPUP_PANEL_SELECTOR).last();
29
35
  }
30
36
  /**
31
- * Finds a menu item by data-testid / data-automationid first, falling back to visible text.
37
+ * Finds a menu item by data-testid / data-testid2 / data-automationid first, falling back to
38
+ * visible text.
32
39
  *
33
40
  * Supports three menu implementations:
34
41
  * - smartbit4all custom menu (`.sb4-menu-panel`): every item is a `ui-action-button` rendered as
35
- * `<button data-testid="{action code}">`, in both the Material and PrimeNG component libraries
36
- * (only the button's own attributes differ). The `text` matches the action code (data-testid) or
37
- * the visible title. Used by grid/table action menus since #29411.
42
+ * `<button data-testid="{action code}" data-testid2="{action code}_{identifier}">`, in both the
43
+ * Material and PrimeNG component libraries (only the button's own attributes differ). The `text`
44
+ * matches the action code (data-testid), the identifier-qualified code (data-testid2) or the
45
+ * visible title. Used by grid/table action menus since #29411.
38
46
  * - Angular Material (`.mat-mdc-menu-panel`): `<button mat-menu-item data-testid>`.
39
47
  * - PrimeNG (`.p-menu`, `.p-tieredmenu`, `.p-contextmenu`): items expose `menuItem.automationId`
40
48
  * as the `data-automationid` DOM attribute (no data-testid).
41
49
  */
42
50
  function findMenuItem(page, text) {
43
- const sb4ByTestId = `.sb4-menu-panel button[data-testid="${text}"]`;
51
+ const sb4ByTestId = `.sb4-menu-panel button[data-testid="${text}"], .sb4-menu-panel button[data-testid2="${text}"]`;
44
52
  const sb4ByText = `.sb4-menu-panel button:has-text("${text}")`;
45
- const matByTestId = `.mat-mdc-menu-panel button.mat-mdc-menu-item[data-testid="${text}"]`;
53
+ const matByTestId = `.mat-mdc-menu-panel button.mat-mdc-menu-item[data-testid="${text}"], .mat-mdc-menu-panel button.mat-mdc-menu-item[data-testid2="${text}"]`;
46
54
  const matByText = `.mat-mdc-menu-panel button.mat-mdc-menu-item:has-text("${text}")`;
47
- const primeByTestId = `.p-menu-list [data-testid="${text}"], .p-menuitem [data-testid="${text}"]`;
55
+ const primeByTestId = `.p-menu-list [data-testid="${text}"], .p-menuitem [data-testid="${text}"], .p-menu-list [data-testid2="${text}"], .p-menuitem [data-testid2="${text}"]`;
48
56
  const primeByAutomationId = `.p-menu-list [data-automationid="${text}"], .p-menuitem [data-automationid="${text}"]`;
49
57
  const primeByText = `.p-menu-list .p-menuitem-link:has-text("${text}"), .p-menuitem-content:has-text("${text}")`;
50
58
  return page.locator(`${sb4ByTestId}, ${sb4ByText}, ${matByTestId}, ${matByText}, ${primeByTestId}, ${primeByAutomationId}, ${primeByText}`).first();
@@ -1 +1 @@
1
- {"version":3,"file":"locators.js","sourceRoot":"","sources":["../../src/steps/locators.ts"],"names":[],"mappings":";;;AAMA,gCAEC;AAkBD,sCAEC;AAcD,oCASC;AAjDD;;;GAGG;AACH,SAAgB,UAAU,CAAC,SAAyB,EAAE,IAAY;IAChE,OAAO,SAAS,CAAC,OAAO,CAAC,uBAAuB,IAAI,wBAAwB,IAAI,IAAI,CAAC,CAAC,KAAK,EAAE,CAAC;AAChG,CAAC;AAED;;;;;;;;GAQG;AACH,iFAAiF;AACpE,QAAA,oBAAoB,GAC/B,mHAAmH,CAAC;AAEtH,6FAA6F;AAChF,QAAA,qBAAqB,GAAG,iBAAiB,CAAC;AAEvD,SAAgB,aAAa,CAAC,IAAU;IACtC,OAAO,IAAI,CAAC,OAAO,CAAC,4BAAoB,CAAC,CAAC,IAAI,EAAE,CAAC;AACnD,CAAC;AAED;;;;;;;;;;;GAWG;AACH,SAAgB,YAAY,CAAC,IAAU,EAAE,IAAY;IACnD,MAAM,WAAW,GAAG,uCAAuC,IAAI,IAAI,CAAC;IACpE,MAAM,SAAS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AAI,CAAC;IAC/D,MAAM,WAAW,GAAG,6DAA6D,IAAI,kEAAkE,IAAI,IAAI,CAAC;IAChK,MAAM,SAAS,GAAG,0DAA0D,IAAI,IAAI,CAAC;IACrF,MAAM,aAAa,GAAG,8BAA8B,IAAI,iCAAiC,IAAI,mCAAmC,IAAI,kCAAkC,IAAI,IAAI,CAAC;IAC/K,MAAM,mBAAmB,GAAG,oCAAoC,IAAI,uCAAuC,IAAI,IAAI,CAAC;IACpH,MAAM,WAAW,GAAG,2CAA2C,IAAI,qCAAqC,IAAI,IAAI,CAAC;IACjH,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,WAAW,KAAK,SAAS,KAAK,WAAW,KAAK,SAAS,KAAK,aAAa,KAAK,mBAAmB,KAAK,WAAW,EAAE,CAAC,CAAC,KAAK,EAAE,CAAC;AACtJ,CAAC"}
package/package.json CHANGED
@@ -1,64 +1,64 @@
1
- {
2
- "name": "@smartbit4all/playwright-qa",
3
- "version": "0.2.2",
4
- "description": "Playwright-based testing and documentation framework for smartbit4all projects",
5
- "main": "dist/index.js",
6
- "types": "dist/index.d.ts",
7
- "exports": {
8
- ".": {
9
- "types": "./dist/index.d.ts",
10
- "default": "./dist/index.js"
11
- },
12
- "./steps": {
13
- "types": "./dist/steps/index.d.ts",
14
- "default": "./dist/steps/index.js"
15
- },
16
- "./utils": {
17
- "types": "./dist/utils/index.d.ts",
18
- "default": "./dist/utils/index.js"
19
- }
20
- },
21
- "typesVersions": {
22
- "*": {
23
- "steps": [
24
- "dist/steps/index.d.ts"
25
- ],
26
- "utils": [
27
- "dist/utils/index.d.ts"
28
- ]
29
- }
30
- },
31
- "files": [
32
- "dist",
33
- "templates"
34
- ],
35
- "scripts": {
36
- "build": "tsc",
37
- "test": "playwright test",
38
- "prepublishOnly": "npm run build",
39
- "publish:npm": "npm run test && npm publish --access public"
40
- },
41
- "engines": {
42
- "node": ">=20.0.0"
43
- },
44
- "peerDependencies": {
45
- "@playwright/test": ">=1.40.0"
46
- },
47
- "devDependencies": {
48
- "@playwright/test": "^1.50.0",
49
- "@types/node": "^25.2.3",
50
- "typescript": "^5.7.0"
51
- },
52
- "keywords": [
53
- "playwright",
54
- "testing",
55
- "screenshot",
56
- "qa",
57
- "smartbit4all"
58
- ],
59
- "license": "LGPL-3.0-or-later",
60
- "repository": {
61
- "type": "git",
62
- "url": "https://github.com/nickkoo/playwright-qa.git"
63
- }
64
- }
1
+ {
2
+ "name": "@smartbit4all/playwright-qa",
3
+ "version": "0.2.4",
4
+ "description": "Playwright-based testing and documentation framework for smartbit4all projects",
5
+ "main": "dist/index.js",
6
+ "types": "dist/index.d.ts",
7
+ "exports": {
8
+ ".": {
9
+ "types": "./dist/index.d.ts",
10
+ "default": "./dist/index.js"
11
+ },
12
+ "./steps": {
13
+ "types": "./dist/steps/index.d.ts",
14
+ "default": "./dist/steps/index.js"
15
+ },
16
+ "./utils": {
17
+ "types": "./dist/utils/index.d.ts",
18
+ "default": "./dist/utils/index.js"
19
+ }
20
+ },
21
+ "typesVersions": {
22
+ "*": {
23
+ "steps": [
24
+ "dist/steps/index.d.ts"
25
+ ],
26
+ "utils": [
27
+ "dist/utils/index.d.ts"
28
+ ]
29
+ }
30
+ },
31
+ "files": [
32
+ "dist",
33
+ "templates"
34
+ ],
35
+ "scripts": {
36
+ "build": "tsc",
37
+ "test": "playwright test",
38
+ "prepublishOnly": "npm run build",
39
+ "publish:npm": "npm run test && npm publish --access public"
40
+ },
41
+ "engines": {
42
+ "node": ">=20.0.0"
43
+ },
44
+ "peerDependencies": {
45
+ "@playwright/test": ">=1.40.0"
46
+ },
47
+ "devDependencies": {
48
+ "@playwright/test": "^1.50.0",
49
+ "@types/node": "^25.2.3",
50
+ "typescript": "^5.7.0"
51
+ },
52
+ "keywords": [
53
+ "playwright",
54
+ "testing",
55
+ "screenshot",
56
+ "qa",
57
+ "smartbit4all"
58
+ ],
59
+ "license": "LGPL-3.0-or-later",
60
+ "repository": {
61
+ "type": "git",
62
+ "url": "https://github.com/smartbit4all/platform-playwright-qa.git"
63
+ }
64
+ }
@@ -1,54 +1,54 @@
1
- # Azure DevOps pipeline for project Playwright QA tests
2
- # Add this to your project repo and configure BASE_URL
3
-
4
- trigger:
5
- branches:
6
- include:
7
- - main
8
-
9
- variables:
10
- BASE_URL: 'https://staging.example.com'
11
- LOCALE: 'hu'
12
-
13
- pool:
14
- vmImage: 'ubuntu-latest'
15
-
16
- steps:
17
- - task: NodeTool@0
18
- inputs:
19
- versionSpec: '20.x'
20
- displayName: 'Install Node.js'
21
-
22
- - script: npm ci
23
- workingDirectory: 'playwright-qa'
24
- displayName: 'Install dependencies'
25
-
26
- - script: npx playwright install --with-deps chromium
27
- workingDirectory: 'playwright-qa'
28
- displayName: 'Install Playwright browsers'
29
-
30
- - script: npx playwright test
31
- workingDirectory: 'playwright-qa'
32
- displayName: 'Run Playwright tests'
33
- env:
34
- BASE_URL: $(BASE_URL)
35
- LOCALE: $(LOCALE)
36
-
37
- - task: PublishTestResults@2
38
- condition: always()
39
- inputs:
40
- testResultsFormat: 'JUnit'
41
- testResultsFiles: 'playwright-qa/test-results/*.xml'
42
- testRunTitle: 'Playwright QA Tests'
43
-
44
- - task: PublishPipelineArtifact@1
45
- condition: always()
46
- inputs:
47
- targetPath: 'playwright-qa/screenshots/latest'
48
- artifact: 'screenshots'
49
-
50
- - task: PublishPipelineArtifact@1
51
- condition: always()
52
- inputs:
53
- targetPath: 'playwright-qa/playwright-report'
54
- artifact: 'playwright-report'
1
+ # Azure DevOps pipeline for project Playwright QA tests
2
+ # Add this to your project repo and configure BASE_URL
3
+
4
+ trigger:
5
+ branches:
6
+ include:
7
+ - main
8
+
9
+ variables:
10
+ BASE_URL: 'https://staging.example.com'
11
+ LOCALE: 'hu'
12
+
13
+ pool:
14
+ vmImage: 'ubuntu-latest'
15
+
16
+ steps:
17
+ - task: NodeTool@0
18
+ inputs:
19
+ versionSpec: '20.x'
20
+ displayName: 'Install Node.js'
21
+
22
+ - script: npm ci
23
+ workingDirectory: 'playwright-qa'
24
+ displayName: 'Install dependencies'
25
+
26
+ - script: npx playwright install --with-deps chromium
27
+ workingDirectory: 'playwright-qa'
28
+ displayName: 'Install Playwright browsers'
29
+
30
+ - script: npx playwright test
31
+ workingDirectory: 'playwright-qa'
32
+ displayName: 'Run Playwright tests'
33
+ env:
34
+ BASE_URL: $(BASE_URL)
35
+ LOCALE: $(LOCALE)
36
+
37
+ - task: PublishTestResults@2
38
+ condition: always()
39
+ inputs:
40
+ testResultsFormat: 'JUnit'
41
+ testResultsFiles: 'playwright-qa/test-results/*.xml'
42
+ testRunTitle: 'Playwright QA Tests'
43
+
44
+ - task: PublishPipelineArtifact@1
45
+ condition: always()
46
+ inputs:
47
+ targetPath: 'playwright-qa/screenshots/latest'
48
+ artifact: 'screenshots'
49
+
50
+ - task: PublishPipelineArtifact@1
51
+ condition: always()
52
+ inputs:
53
+ targetPath: 'playwright-qa/playwright-report'
54
+ artifact: 'playwright-report'
@@ -1,14 +1,14 @@
1
- {
2
- "name": "PROJECT_NAME-playwright-qa",
3
- "private": true,
4
- "scripts": {
5
- "test": "playwright test"
6
- },
7
- "dependencies": {
8
- "@smartbit4all/playwright-qa": "^0.1.0"
9
- },
10
- "devDependencies": {
11
- "@playwright/test": "^1.50.0",
12
- "typescript": "^5.7.0"
13
- }
14
- }
1
+ {
2
+ "name": "PROJECT_NAME-playwright-qa",
3
+ "private": true,
4
+ "scripts": {
5
+ "test": "playwright test"
6
+ },
7
+ "dependencies": {
8
+ "@smartbit4all/playwright-qa": "^0.1.0"
9
+ },
10
+ "devDependencies": {
11
+ "@playwright/test": "^1.50.0",
12
+ "typescript": "^5.7.0"
13
+ }
14
+ }
@@ -1,18 +1,18 @@
1
- import { defineConfig } from '@playwright/test';
2
- import { getViewport } from '@smartbit4all/playwright-qa';
3
-
4
- export default defineConfig({
5
- testDir: './tests',
6
- testMatch: /\.(spec|test|suite)\.[jt]sx?$/,
7
- timeout: 60_000,
8
- use: {
9
- baseURL: process.env.BASE_URL || 'http://localhost:4200',
10
- viewport: getViewport(),
11
- },
12
- workers: 1,
13
- reporter: [
14
- ['list'],
15
- ['html', { open: 'never' }],
16
- ['junit', { outputFile: 'test-results/results.xml' }],
17
- ],
18
- });
1
+ import { defineConfig } from '@playwright/test';
2
+ import { getViewport } from '@smartbit4all/playwright-qa';
3
+
4
+ export default defineConfig({
5
+ testDir: './tests',
6
+ testMatch: /\.(spec|test|suite)\.[jt]sx?$/,
7
+ timeout: 60_000,
8
+ use: {
9
+ baseURL: process.env.BASE_URL || 'http://localhost:4200',
10
+ viewport: getViewport(),
11
+ },
12
+ workers: 1,
13
+ reporter: [
14
+ ['list'],
15
+ ['html', { open: 'never' }],
16
+ ['junit', { outputFile: 'test-results/results.xml' }],
17
+ ],
18
+ });
@@ -1,11 +1,11 @@
1
- {
2
- "compilerOptions": {
3
- "target": "ES2022",
4
- "module": "commonjs",
5
- "strict": true,
6
- "esModuleInterop": true,
7
- "skipLibCheck": true,
8
- "resolveJsonModule": true
9
- },
10
- "include": ["steps/**/*", "suites/**/*", "types/**/*"]
11
- }
1
+ {
2
+ "compilerOptions": {
3
+ "target": "ES2022",
4
+ "module": "commonjs",
5
+ "strict": true,
6
+ "esModuleInterop": true,
7
+ "skipLibCheck": true,
8
+ "resolveJsonModule": true
9
+ },
10
+ "include": ["steps/**/*", "suites/**/*", "types/**/*"]
11
+ }