@axinom/mosaic-e2e-ui-selectors 0.16.13-rc.2 → 0.16.13-rc.5
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/dist/cjs/component-models/actions.d.ts +5 -1
- package/dist/cjs/component-models/actions.d.ts.map +1 -1
- package/dist/cjs/component-models/actions.js +7 -2
- package/dist/cjs/component-models/actions.js.map +1 -1
- package/dist/cjs/component-models/form/radio-field.d.ts.map +1 -1
- package/dist/cjs/component-models/form/radio-field.js +2 -1
- package/dist/cjs/component-models/form/radio-field.js.map +1 -1
- package/dist/cjs/component-models/form/toggle-button-field.d.ts.map +1 -1
- package/dist/cjs/component-models/form/toggle-button-field.js +2 -1
- package/dist/cjs/component-models/form/toggle-button-field.js.map +1 -1
- package/dist/cjs/component-models/inline-menu.d.ts +6 -1
- package/dist/cjs/component-models/inline-menu.d.ts.map +1 -1
- package/dist/cjs/component-models/inline-menu.js +6 -1
- package/dist/cjs/component-models/inline-menu.js.map +1 -1
- package/dist/cjs/constants/confirm-dialog.d.ts +7 -0
- package/dist/cjs/constants/confirm-dialog.d.ts.map +1 -0
- package/dist/cjs/constants/confirm-dialog.js +10 -0
- package/dist/cjs/constants/confirm-dialog.js.map +1 -0
- package/dist/cjs/constants/index.d.ts +1 -0
- package/dist/cjs/constants/index.d.ts.map +1 -1
- package/dist/cjs/constants/index.js +1 -0
- package/dist/cjs/constants/index.js.map +1 -1
- package/dist/esm/component-models/actions.d.ts +5 -1
- package/dist/esm/component-models/actions.d.ts.map +1 -1
- package/dist/esm/component-models/actions.js +7 -2
- package/dist/esm/component-models/actions.js.map +1 -1
- package/dist/esm/component-models/form/radio-field.d.ts.map +1 -1
- package/dist/esm/component-models/form/radio-field.js +2 -1
- package/dist/esm/component-models/form/radio-field.js.map +1 -1
- package/dist/esm/component-models/form/toggle-button-field.d.ts.map +1 -1
- package/dist/esm/component-models/form/toggle-button-field.js +2 -1
- package/dist/esm/component-models/form/toggle-button-field.js.map +1 -1
- package/dist/esm/component-models/inline-menu.d.ts +6 -1
- package/dist/esm/component-models/inline-menu.d.ts.map +1 -1
- package/dist/esm/component-models/inline-menu.js +6 -1
- package/dist/esm/component-models/inline-menu.js.map +1 -1
- package/dist/esm/constants/confirm-dialog.d.ts +7 -0
- package/dist/esm/constants/confirm-dialog.d.ts.map +1 -0
- package/dist/esm/constants/confirm-dialog.js +7 -0
- package/dist/esm/constants/confirm-dialog.js.map +1 -0
- package/dist/esm/constants/index.d.ts +1 -0
- package/dist/esm/constants/index.d.ts.map +1 -1
- package/dist/esm/constants/index.js +1 -0
- package/dist/esm/constants/index.js.map +1 -1
- package/package.json +6 -2
- package/src/component-models/actions.ts +7 -2
- package/src/component-models/form/radio-field.ts +4 -1
- package/src/component-models/form/toggle-button-field.ts +3 -2
- package/src/component-models/inline-menu.ts +6 -1
- package/src/constants/confirm-dialog.ts +7 -0
- package/src/constants/index.ts +1 -0
|
@@ -10,7 +10,11 @@ export declare class Actions extends ComponentModel {
|
|
|
10
10
|
* @param xpath A relative xpath selector to this element from the parent.
|
|
11
11
|
*/
|
|
12
12
|
constructor(parent: Page | FrameLocator | ComponentModel, xpath?: string);
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* A locator to the confirm button which may show after clicking an action.
|
|
15
|
+
* The 'Simple' confirmation is rendered inside the action itself, while the
|
|
16
|
+
* 'Advanced' one is a ConfirmDialog portalled on the document body.
|
|
17
|
+
*/
|
|
14
18
|
readonly confirmButton: Locator;
|
|
15
19
|
/** A locator to the confirm button which may show after clicking an action. */
|
|
16
20
|
readonly quickViewButton: Locator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;GAEG;AACH,qBAAa,OAAQ,SAAQ,cAAc;IACzC;;;;OAIG;gBAED,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,cAAc,EAC5C,KAAK,SAAiC;IAKxC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,UAEpB;IAEF,+EAA+E;IAC/E,QAAQ,CAAC,eAAe,UAEf;IAET,kHAAkH;IAClH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIpC,iFAAiF;IACjF,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAKzC"}
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.Actions = void 0;
|
|
4
4
|
const component_model_js_1 = require("../component-model.js");
|
|
5
|
+
const confirm_dialog_js_1 = require("../constants/confirm-dialog.js");
|
|
5
6
|
/**
|
|
6
7
|
* An model for an Actions component with methods to retrieve individual actions.
|
|
7
8
|
*/
|
|
@@ -13,8 +14,12 @@ class Actions extends component_model_js_1.ComponentModel {
|
|
|
13
14
|
*/
|
|
14
15
|
constructor(parent, xpath = '//*[@data-test-id="actions"]') {
|
|
15
16
|
super(parent, xpath);
|
|
16
|
-
/**
|
|
17
|
-
|
|
17
|
+
/**
|
|
18
|
+
* A locator to the confirm button which may show after clicking an action.
|
|
19
|
+
* The 'Simple' confirmation is rendered inside the action itself, while the
|
|
20
|
+
* 'Advanced' one is a ConfirmDialog portalled on the document body.
|
|
21
|
+
*/
|
|
22
|
+
this.confirmButton = this.getGlobalLocator(`//*[@data-test-id="action"]//*[@data-test-id="confirm"] | ${confirm_dialog_js_1.confirmDialogXpath}//*[@data-test-id="confirm"]`);
|
|
18
23
|
/** A locator to the confirm button which may show after clicking an action. */
|
|
19
24
|
this.quickViewButton = this.getGlobalLocator(`//*[@data-test-id="action" and .//span[text()="Quick View"]]`).nth(0);
|
|
20
25
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":";;;AACA,8DAAuD;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":";;;AACA,8DAAuD;AACvD,sEAAoE;AAEpE;;GAEG;AACH,MAAa,OAAQ,SAAQ,mCAAc;IACzC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,8BAA8B;QAEtC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAGvB;;;;WAIG;QACM,kBAAa,GAAG,IAAI,CAAC,gBAAgB,CAC5C,6DAA6D,sCAAkB,8BAA8B,CAC9G,CAAC;QAEF,+EAA+E;QACtE,oBAAe,GAAG,IAAI,CAAC,gBAAgB,CAC9C,8DAA8D,CAC/D,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAdT,CAAC;IAgBD,kHAAkH;IAClH,SAAS,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,6BAA6B,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,iFAAiF;IACjF,gBAAgB,CAAC,KAAa;QAC5B,OAAO,IAAI,CAAC,gBAAgB,CAC1B,yEAAyE,KAAK,KAAK,CACpF,CAAC;IACJ,CAAC;CACF;AAtCD,0BAsCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,qBAAa,UAAW,SAAQ,cAAc;IAC5C,kBAAkB;IAClB,cAAuB,kBAAkB,IAAI,MAAM,CAElD;IAED,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,oCAEpB;IAEF,mEAAmE;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU5C,0GAA0G;IACpG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,qEAAqE;IAC/D,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;CAMlC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.RadioField = void 0;
|
|
4
|
+
const confirm_dialog_js_1 = require("../../constants/confirm-dialog.js");
|
|
4
5
|
const form_field_js_1 = require("./form-field.js");
|
|
5
6
|
/**
|
|
6
7
|
* A model for a RadioField component.
|
|
@@ -9,7 +10,7 @@ class RadioField extends form_field_js_1.TypedFormField {
|
|
|
9
10
|
constructor() {
|
|
10
11
|
super(...arguments);
|
|
11
12
|
/** A locator to the confirm button which may show after setting a value. */
|
|
12
|
-
this.confirmButton = this.
|
|
13
|
+
this.confirmButton = this.getGlobalLocator(`${confirm_dialog_js_1.confirmDialogXpath}//*[@data-test-id="confirm"]`);
|
|
13
14
|
}
|
|
14
15
|
/** @inheritdoc */
|
|
15
16
|
get fieldTypeValidator() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAEjD;;GAEG;AACH,MAAa,UAAW,SAAQ,8BAAc;IAA9C;;QAME,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"radio-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":";;;AAAA,yEAAuE;AACvE,mDAAiD;AAEjD;;GAEG;AACH,MAAa,UAAW,SAAQ,8BAAc;IAA9C;;QAME,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,gBAAgB,CAC5C,GAAG,sCAAkB,8BAA8B,CACpD,CAAC;IA6BJ,CAAC;IArCC,kBAAkB;IAClB,IAAuB,kBAAkB;QACvC,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAOD,mEAAmE;IACnE,KAAK,CAAC,QAAQ,CAAC,KAAa;QAC1B,eAAe;QACf,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CACxB,mBAAmB,KAAK,6BAA6B,CACtD,CAAC;QACF,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACvC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,0GAA0G;IAC1G,KAAK,CAAC,eAAe,CAAC,KAAa;QACjC,eAAe;QACf,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,KAAK,IAAI,CAAC,CAAC;QACzD,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACvC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,qEAAqE;IACrE,KAAK,CAAC,QAAQ;QACZ,eAAe;QACf,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAAC;QACpE,OAAO,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;CACF;AAtCD,gCAsCC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-button-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toggle-button-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;IACnD,kBAAkB;IAClB,cAAuB,kBAAkB,IAAI,MAAM,CAElD;IAED,uCAAuC;IACvC,SAAS,CAAC,QAAQ,CAAC,MAAM,oCAA+B;IAExD,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,oCAEpB;IAEF,sCAAsC;IAChC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,wDAAwD;IAClD,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;CAI/B"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.ToggleButtonField = void 0;
|
|
4
|
+
const confirm_dialog_js_1 = require("../../constants/confirm-dialog.js");
|
|
4
5
|
const form_field_js_1 = require("./form-field.js");
|
|
5
6
|
/**
|
|
6
7
|
* A model for a ToggleButtonField component.
|
|
@@ -11,7 +12,7 @@ class ToggleButtonField extends form_field_js_1.TypedFormField {
|
|
|
11
12
|
/** A locator to the button element. */
|
|
12
13
|
this.button = this.getLocator('//button');
|
|
13
14
|
/** A locator to the confirm button which may show after setting a value. */
|
|
14
|
-
this.confirmButton = this.
|
|
15
|
+
this.confirmButton = this.getGlobalLocator(`${confirm_dialog_js_1.confirmDialogXpath}//*[@data-test-id="confirm"]`);
|
|
15
16
|
}
|
|
16
17
|
/** @inheritdoc */
|
|
17
18
|
get fieldTypeValidator() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-button-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":";;;AAAA,mDAAiD;AAEjD;;GAEG;AACH,MAAa,iBAAkB,SAAQ,8BAAc;IAArD;;QAME,uCAAuC;QACpB,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAExD,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"toggle-button-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":";;;AAAA,yEAAuE;AACvE,mDAAiD;AAEjD;;GAEG;AACH,MAAa,iBAAkB,SAAQ,8BAAc;IAArD;;QAME,uCAAuC;QACpB,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAExD,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,gBAAgB,CAC5C,GAAG,sCAAkB,8BAA8B,CACpD,CAAC;IAYJ,CAAC;IAvBC,kBAAkB;IAClB,IAAuB,kBAAkB;QACvC,OAAO,kCAAkC,CAAC;IAC5C,CAAC;IAUD,sCAAsC;IACtC,KAAK,CAAC,MAAM;QACV,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,IAAI;QACR,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACpE,OAAO,OAAO,KAAK,MAAM,CAAC;IAC5B,CAAC;CACF;AAxBD,8CAwBC"}
|
|
@@ -13,7 +13,12 @@ export declare class InlineMenu extends Actions {
|
|
|
13
13
|
constructor(parent: Page | FrameLocator | ComponentModel, xpath?: string, nth?: number);
|
|
14
14
|
/** A locator to the button that opens the inline menu. */
|
|
15
15
|
readonly openButton: import("playwright-core").Locator;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* This method waits for the menu to close.
|
|
18
|
+
*
|
|
19
|
+
* Note that the menu collapses before the selected action's handler runs, so
|
|
20
|
+
* a closed menu only means the action was triggered, not that it completed.
|
|
21
|
+
*/
|
|
17
22
|
waitForClose(): Promise<void>;
|
|
18
23
|
}
|
|
19
24
|
//# sourceMappingURL=inline-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-menu.d.ts","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,qBAAa,UAAW,SAAQ,OAAO;IACrC;;;;OAIG;gBAED,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,cAAc,EAC5C,KAAK,SAA4C,EACjD,GAAG,CAAC,EAAE,MAAM;IAMd,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,oCAAqB;IAExC
|
|
1
|
+
{"version":3,"file":"inline-menu.d.ts","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,qBAAa,UAAW,SAAQ,OAAO;IACrC;;;;OAIG;gBAED,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,cAAc,EAC5C,KAAK,SAA4C,EACjD,GAAG,CAAC,EAAE,MAAM;IAMd,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,oCAAqB;IAExC;;;;;OAKG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAGpC"}
|
|
@@ -18,7 +18,12 @@ class InlineMenu extends actions_js_1.Actions {
|
|
|
18
18
|
this.openButton = this.getLocator();
|
|
19
19
|
this.openButton = new component_model_js_1.ComponentModel(parent, xpath, nth).getLocator();
|
|
20
20
|
}
|
|
21
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* This method waits for the menu to close.
|
|
23
|
+
*
|
|
24
|
+
* Note that the menu collapses before the selected action's handler runs, so
|
|
25
|
+
* a closed menu only means the action was triggered, not that it completed.
|
|
26
|
+
*/
|
|
22
27
|
async waitForClose() {
|
|
23
28
|
await this.getLocator().waitFor({ state: 'hidden' });
|
|
24
29
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-menu.js","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":";;;AACA,8DAAuD;AACvD,6CAAuC;AAEvC;;GAEG;AACH,MAAa,UAAW,SAAQ,oBAAO;IACrC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,yCAAyC,EACjD,GAAY;QAEZ,KAAK,CAAC,MAAM,EAAE,GAAG,KAAK,oDAAoD,CAAC,CAAC;QAI9E,0DAA0D;QACjD,eAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAJtC,IAAI,CAAC,UAAU,GAAG,IAAI,mCAAc,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IACxE,CAAC;IAKD
|
|
1
|
+
{"version":3,"file":"inline-menu.js","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":";;;AACA,8DAAuD;AACvD,6CAAuC;AAEvC;;GAEG;AACH,MAAa,UAAW,SAAQ,oBAAO;IACrC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,yCAAyC,EACjD,GAAY;QAEZ,KAAK,CAAC,MAAM,EAAE,GAAG,KAAK,oDAAoD,CAAC,CAAC;QAI9E,0DAA0D;QACjD,eAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAJtC,IAAI,CAAC,UAAU,GAAG,IAAI,mCAAc,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IACxE,CAAC;IAKD;;;;;OAKG;IACH,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC;CACF;AA3BD,gCA2BC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An xpath to the ConfirmDialog component. The dialog is rendered through a
|
|
3
|
+
* React portal on the document body, so it cannot be located relative to the
|
|
4
|
+
* component it is anchored to and has to be looked up globally.
|
|
5
|
+
*/
|
|
6
|
+
export declare const confirmDialogXpath = "//*[contains(@class,\"confirm-dialog-container\")]";
|
|
7
|
+
//# sourceMappingURL=confirm-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../../src/constants/confirm-dialog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,uDACqB,CAAC"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.confirmDialogXpath = void 0;
|
|
4
|
+
/**
|
|
5
|
+
* An xpath to the ConfirmDialog component. The dialog is rendered through a
|
|
6
|
+
* React portal on the document body, so it cannot be located relative to the
|
|
7
|
+
* component it is anchored to and has to be looked up globally.
|
|
8
|
+
*/
|
|
9
|
+
exports.confirmDialogXpath = '//*[contains(@class,"confirm-dialog-container")]';
|
|
10
|
+
//# sourceMappingURL=confirm-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-dialog.js","sourceRoot":"","sources":["../../../src/constants/confirm-dialog.ts"],"names":[],"mappings":";;;AAAA;;;;GAIG;AACU,QAAA,kBAAkB,GAC7B,kDAAkD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
@@ -15,4 +15,5 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
|
15
15
|
};
|
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
17
17
|
__exportStar(require("./action-label.js"), exports);
|
|
18
|
+
__exportStar(require("./confirm-dialog.js"), exports);
|
|
18
19
|
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;AAAA,oDAAkC;AAClC,sDAAoC"}
|
|
@@ -10,7 +10,11 @@ export declare class Actions extends ComponentModel {
|
|
|
10
10
|
* @param xpath A relative xpath selector to this element from the parent.
|
|
11
11
|
*/
|
|
12
12
|
constructor(parent: Page | FrameLocator | ComponentModel, xpath?: string);
|
|
13
|
-
/**
|
|
13
|
+
/**
|
|
14
|
+
* A locator to the confirm button which may show after clicking an action.
|
|
15
|
+
* The 'Simple' confirmation is rendered inside the action itself, while the
|
|
16
|
+
* 'Advanced' one is a ConfirmDialog portalled on the document body.
|
|
17
|
+
*/
|
|
14
18
|
readonly confirmButton: Locator;
|
|
15
19
|
/** A locator to the confirm button which may show after clicking an action. */
|
|
16
20
|
readonly quickViewButton: Locator;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.d.ts","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,OAAO,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvD;;GAEG;AACH,qBAAa,OAAQ,SAAQ,cAAc;IACzC;;;;OAIG;gBAED,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,cAAc,EAC5C,KAAK,SAAiC;IAKxC;;;;OAIG;IACH,QAAQ,CAAC,aAAa,UAEpB;IAEF,+EAA+E;IAC/E,QAAQ,CAAC,eAAe,UAEf;IAET,kHAAkH;IAClH,SAAS,CAAC,QAAQ,EAAE,MAAM,GAAG,OAAO;IAIpC,iFAAiF;IACjF,gBAAgB,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO;CAKzC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import {} from '@playwright/test';
|
|
2
2
|
import { ComponentModel } from '../component-model.js';
|
|
3
|
+
import { confirmDialogXpath } from '../constants/confirm-dialog.js';
|
|
3
4
|
/**
|
|
4
5
|
* An model for an Actions component with methods to retrieve individual actions.
|
|
5
6
|
*/
|
|
@@ -11,8 +12,12 @@ export class Actions extends ComponentModel {
|
|
|
11
12
|
*/
|
|
12
13
|
constructor(parent, xpath = '//*[@data-test-id="actions"]') {
|
|
13
14
|
super(parent, xpath);
|
|
14
|
-
/**
|
|
15
|
-
|
|
15
|
+
/**
|
|
16
|
+
* A locator to the confirm button which may show after clicking an action.
|
|
17
|
+
* The 'Simple' confirmation is rendered inside the action itself, while the
|
|
18
|
+
* 'Advanced' one is a ConfirmDialog portalled on the document body.
|
|
19
|
+
*/
|
|
20
|
+
this.confirmButton = this.getGlobalLocator(`//*[@data-test-id="action"]//*[@data-test-id="confirm"] | ${confirmDialogXpath}//*[@data-test-id="confirm"]`);
|
|
16
21
|
/** A locator to the confirm button which may show after clicking an action. */
|
|
17
22
|
this.quickViewButton = this.getGlobalLocator(`//*[@data-test-id="action" and .//span[text()="Quick View"]]`).nth(0);
|
|
18
23
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../../src/component-models/actions.ts"],"names":[],"mappings":"AAAA,OAAO,EAA8C,MAAM,kBAAkB,CAAC;AAC9E,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,gCAAgC,CAAC;AAEpE;;GAEG;AACH,MAAM,OAAO,OAAQ,SAAQ,cAAc;IACzC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,8BAA8B;QAEtC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAGvB;;;;WAIG;QACM,kBAAa,GAAG,IAAI,CAAC,gBAAgB,CAC5C,6DAA6D,kBAAkB,8BAA8B,CAC9G,CAAC;QAEF,+EAA+E;QACtE,oBAAe,GAAG,IAAI,CAAC,gBAAgB,CAC9C,8DAA8D,CAC/D,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IAdT,CAAC;IAgBD,kHAAkH;IAClH,SAAS,CAAC,QAAgB;QACxB,OAAO,IAAI,CAAC,gBAAgB,CAAC,6BAA6B,CAAC,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;IAC5E,CAAC;IAED,iFAAiF;IACjF,gBAAgB,CAAC,KAAa;QAC5B,OAAO,IAAI,CAAC,gBAAgB,CAC1B,yEAAyE,KAAK,KAAK,CACpF,CAAC;IACJ,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"radio-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,qBAAa,UAAW,SAAQ,cAAc;IAC5C,kBAAkB;IAClB,cAAuB,kBAAkB,IAAI,MAAM,CAElD;IAED,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,oCAEpB;IAEF,mEAAmE;IAC7D,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAU5C,0GAA0G;IACpG,eAAe,CAAC,KAAK,EAAE,MAAM,GAAG,OAAO,CAAC,IAAI,CAAC;IAQnD,qEAAqE;IAC/D,QAAQ,IAAI,OAAO,CAAC,MAAM,CAAC;CAMlC"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { confirmDialogXpath } from '../../constants/confirm-dialog.js';
|
|
1
2
|
import { TypedFormField } from './form-field.js';
|
|
2
3
|
/**
|
|
3
4
|
* A model for a RadioField component.
|
|
@@ -6,7 +7,7 @@ export class RadioField extends TypedFormField {
|
|
|
6
7
|
constructor() {
|
|
7
8
|
super(...arguments);
|
|
8
9
|
/** A locator to the confirm button which may show after setting a value. */
|
|
9
|
-
this.confirmButton = this.
|
|
10
|
+
this.confirmButton = this.getGlobalLocator(`${confirmDialogXpath}//*[@data-test-id="confirm"]`);
|
|
10
11
|
}
|
|
11
12
|
/** @inheritdoc */
|
|
12
13
|
get fieldTypeValidator() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"radio-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,cAAc;IAA9C;;QAME,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"radio-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/radio-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,cAAc;IAA9C;;QAME,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,gBAAgB,CAC5C,GAAG,kBAAkB,8BAA8B,CACpD,CAAC;IA6BJ,CAAC;IArCC,kBAAkB;IAClB,IAAuB,kBAAkB;QACvC,OAAO,2BAA2B,CAAC;IACrC,CAAC;IAOD,mEAAmE;IACnE,KAAK,CAAC,QAAQ,CAAC,KAAa;QAC1B,eAAe;QACf,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CACxB,mBAAmB,KAAK,6BAA6B,CACtD,CAAC;QACF,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACvC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,0GAA0G;IAC1G,KAAK,CAAC,eAAe,CAAC,KAAa;QACjC,eAAe;QACf,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,EAAE,GAAG,IAAI,CAAC,UAAU,CAAC,mBAAmB,KAAK,IAAI,CAAC,CAAC;QACzD,MAAM,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;QACvC,MAAM,EAAE,CAAC,KAAK,EAAE,CAAC;IACnB,CAAC;IAED,qEAAqE;IACrE,KAAK,CAAC,QAAQ;QACZ,eAAe;QACf,MAAM,IAAI,CAAC,eAAe,EAAE,CAAC;QAC7B,MAAM,KAAK,GAAG,IAAI,CAAC,UAAU,CAAC,oCAAoC,CAAC,CAAC;QACpE,OAAO,CAAC,MAAM,KAAK,CAAC,UAAU,EAAE,CAAC,IAAI,EAAE,CAAC;IAC1C,CAAC;CACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-button-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"toggle-button-field.d.ts","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,qBAAa,iBAAkB,SAAQ,cAAc;IACnD,kBAAkB;IAClB,cAAuB,kBAAkB,IAAI,MAAM,CAElD;IAED,uCAAuC;IACvC,SAAS,CAAC,QAAQ,CAAC,MAAM,oCAA+B;IAExD,4EAA4E;IAC5E,QAAQ,CAAC,aAAa,oCAEpB;IAEF,sCAAsC;IAChC,MAAM,IAAI,OAAO,CAAC,IAAI,CAAC;IAI7B,wDAAwD;IAClD,IAAI,IAAI,OAAO,CAAC,OAAO,CAAC;CAI/B"}
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { confirmDialogXpath } from '../../constants/confirm-dialog.js';
|
|
1
2
|
import { TypedFormField } from './form-field.js';
|
|
2
3
|
/**
|
|
3
4
|
* A model for a ToggleButtonField component.
|
|
@@ -8,7 +9,7 @@ export class ToggleButtonField extends TypedFormField {
|
|
|
8
9
|
/** A locator to the button element. */
|
|
9
10
|
this.button = this.getLocator('//button');
|
|
10
11
|
/** A locator to the confirm button which may show after setting a value. */
|
|
11
|
-
this.confirmButton = this.
|
|
12
|
+
this.confirmButton = this.getGlobalLocator(`${confirmDialogXpath}//*[@data-test-id="confirm"]`);
|
|
12
13
|
}
|
|
13
14
|
/** @inheritdoc */
|
|
14
15
|
get fieldTypeValidator() {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toggle-button-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,cAAc;IAArD;;QAME,uCAAuC;QACpB,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAExD,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"toggle-button-field.js","sourceRoot":"","sources":["../../../../src/component-models/form/toggle-button-field.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,mCAAmC,CAAC;AACvE,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD;;GAEG;AACH,MAAM,OAAO,iBAAkB,SAAQ,cAAc;IAArD;;QAME,uCAAuC;QACpB,WAAM,GAAG,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,CAAC;QAExD,4EAA4E;QACnE,kBAAa,GAAG,IAAI,CAAC,gBAAgB,CAC5C,GAAG,kBAAkB,8BAA8B,CACpD,CAAC;IAYJ,CAAC;IAvBC,kBAAkB;IAClB,IAAuB,kBAAkB;QACvC,OAAO,kCAAkC,CAAC;IAC5C,CAAC;IAUD,sCAAsC;IACtC,KAAK,CAAC,MAAM;QACV,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,EAAE,CAAC;IAC5B,CAAC;IAED,wDAAwD;IACxD,KAAK,CAAC,IAAI;QACR,MAAM,OAAO,GAAG,MAAM,IAAI,CAAC,MAAM,CAAC,YAAY,CAAC,mBAAmB,CAAC,CAAC;QACpE,OAAO,OAAO,KAAK,MAAM,CAAC;IAC5B,CAAC;CACF"}
|
|
@@ -13,7 +13,12 @@ export declare class InlineMenu extends Actions {
|
|
|
13
13
|
constructor(parent: Page | FrameLocator | ComponentModel, xpath?: string, nth?: number);
|
|
14
14
|
/** A locator to the button that opens the inline menu. */
|
|
15
15
|
readonly openButton: import("playwright-core").Locator;
|
|
16
|
-
/**
|
|
16
|
+
/**
|
|
17
|
+
* This method waits for the menu to close.
|
|
18
|
+
*
|
|
19
|
+
* Note that the menu collapses before the selected action's handler runs, so
|
|
20
|
+
* a closed menu only means the action was triggered, not that it completed.
|
|
21
|
+
*/
|
|
17
22
|
waitForClose(): Promise<void>;
|
|
18
23
|
}
|
|
19
24
|
//# sourceMappingURL=inline-menu.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-menu.d.ts","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,qBAAa,UAAW,SAAQ,OAAO;IACrC;;;;OAIG;gBAED,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,cAAc,EAC5C,KAAK,SAA4C,EACjD,GAAG,CAAC,EAAE,MAAM;IAMd,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,oCAAqB;IAExC
|
|
1
|
+
{"version":3,"file":"inline-menu.d.ts","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,YAAY,EAAE,KAAK,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,qBAAa,UAAW,SAAQ,OAAO;IACrC;;;;OAIG;gBAED,MAAM,EAAE,IAAI,GAAG,YAAY,GAAG,cAAc,EAC5C,KAAK,SAA4C,EACjD,GAAG,CAAC,EAAE,MAAM;IAMd,0DAA0D;IAC1D,QAAQ,CAAC,UAAU,oCAAqB;IAExC;;;;;OAKG;IACG,YAAY,IAAI,OAAO,CAAC,IAAI,CAAC;CAGpC"}
|
|
@@ -16,7 +16,12 @@ export class InlineMenu extends Actions {
|
|
|
16
16
|
this.openButton = this.getLocator();
|
|
17
17
|
this.openButton = new ComponentModel(parent, xpath, nth).getLocator();
|
|
18
18
|
}
|
|
19
|
-
/**
|
|
19
|
+
/**
|
|
20
|
+
* This method waits for the menu to close.
|
|
21
|
+
*
|
|
22
|
+
* Note that the menu collapses before the selected action's handler runs, so
|
|
23
|
+
* a closed menu only means the action was triggered, not that it completed.
|
|
24
|
+
*/
|
|
20
25
|
async waitForClose() {
|
|
21
26
|
await this.getLocator().waitFor({ state: 'hidden' });
|
|
22
27
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inline-menu.js","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,OAAO;IACrC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,yCAAyC,EACjD,GAAY;QAEZ,KAAK,CAAC,MAAM,EAAE,GAAG,KAAK,oDAAoD,CAAC,CAAC;QAI9E,0DAA0D;QACjD,eAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAJtC,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IACxE,CAAC;IAKD
|
|
1
|
+
{"version":3,"file":"inline-menu.js","sourceRoot":"","sources":["../../../src/component-models/inline-menu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgC,MAAM,kBAAkB,CAAC;AAChE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,OAAO,EAAE,MAAM,cAAc,CAAC;AAEvC;;GAEG;AACH,MAAM,OAAO,UAAW,SAAQ,OAAO;IACrC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,yCAAyC,EACjD,GAAY;QAEZ,KAAK,CAAC,MAAM,EAAE,GAAG,KAAK,oDAAoD,CAAC,CAAC;QAI9E,0DAA0D;QACjD,eAAU,GAAG,IAAI,CAAC,UAAU,EAAE,CAAC;QAJtC,IAAI,CAAC,UAAU,GAAG,IAAI,cAAc,CAAC,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC,CAAC,UAAU,EAAE,CAAC;IACxE,CAAC;IAKD;;;;;OAKG;IACH,KAAK,CAAC,YAAY;QAChB,MAAM,IAAI,CAAC,UAAU,EAAE,CAAC,OAAO,CAAC,EAAE,KAAK,EAAE,QAAQ,EAAE,CAAC,CAAC;IACvD,CAAC;CACF"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An xpath to the ConfirmDialog component. The dialog is rendered through a
|
|
3
|
+
* React portal on the document body, so it cannot be located relative to the
|
|
4
|
+
* component it is anchored to and has to be looked up globally.
|
|
5
|
+
*/
|
|
6
|
+
export declare const confirmDialogXpath = "//*[contains(@class,\"confirm-dialog-container\")]";
|
|
7
|
+
//# sourceMappingURL=confirm-dialog.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-dialog.d.ts","sourceRoot":"","sources":["../../../src/constants/confirm-dialog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,uDACqB,CAAC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An xpath to the ConfirmDialog component. The dialog is rendered through a
|
|
3
|
+
* React portal on the document body, so it cannot be located relative to the
|
|
4
|
+
* component it is anchored to and has to be looked up globally.
|
|
5
|
+
*/
|
|
6
|
+
export const confirmDialogXpath = '//*[contains(@class,"confirm-dialog-container")]';
|
|
7
|
+
//# sourceMappingURL=confirm-dialog.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"confirm-dialog.js","sourceRoot":"","sources":["../../../src/constants/confirm-dialog.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AACH,MAAM,CAAC,MAAM,kBAAkB,GAC7B,kDAAkD,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC"}
|
|
1
|
+
{"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/constants/index.ts"],"names":[],"mappings":"AAAA,cAAc,mBAAmB,CAAC;AAClC,cAAc,qBAAqB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,12 +1,16 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-e2e-ui-selectors",
|
|
3
|
-
"version": "0.16.13-rc.
|
|
3
|
+
"version": "0.16.13-rc.5",
|
|
4
4
|
"engines": {
|
|
5
5
|
"node": ">=20.19.0"
|
|
6
6
|
},
|
|
7
7
|
"description": "Component models for testing Axinom Mosaic applications with Playwright.",
|
|
8
8
|
"author": "Axinom",
|
|
9
9
|
"license": "PROPRIETARY",
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/Axinom/Navy.git"
|
|
13
|
+
},
|
|
10
14
|
"keywords": [
|
|
11
15
|
"axinom",
|
|
12
16
|
"mosaic",
|
|
@@ -65,5 +69,5 @@
|
|
|
65
69
|
"publishConfig": {
|
|
66
70
|
"access": "public"
|
|
67
71
|
},
|
|
68
|
-
"gitHead": "
|
|
72
|
+
"gitHead": "5fb6f2808a8355353f3f89c373913941ecd6b802"
|
|
69
73
|
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { type FrameLocator, type Locator, type Page } from '@playwright/test';
|
|
2
2
|
import { ComponentModel } from '../component-model.js';
|
|
3
|
+
import { confirmDialogXpath } from '../constants/confirm-dialog.js';
|
|
3
4
|
|
|
4
5
|
/**
|
|
5
6
|
* An model for an Actions component with methods to retrieve individual actions.
|
|
@@ -17,9 +18,13 @@ export class Actions extends ComponentModel {
|
|
|
17
18
|
super(parent, xpath);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
/**
|
|
21
|
+
/**
|
|
22
|
+
* A locator to the confirm button which may show after clicking an action.
|
|
23
|
+
* The 'Simple' confirmation is rendered inside the action itself, while the
|
|
24
|
+
* 'Advanced' one is a ConfirmDialog portalled on the document body.
|
|
25
|
+
*/
|
|
21
26
|
readonly confirmButton = this.getGlobalLocator(
|
|
22
|
-
`//*[@data-test-id="action"]//*[@data-test-id="confirm"]`,
|
|
27
|
+
`//*[@data-test-id="action"]//*[@data-test-id="confirm"] | ${confirmDialogXpath}//*[@data-test-id="confirm"]`,
|
|
23
28
|
);
|
|
24
29
|
|
|
25
30
|
/** A locator to the confirm button which may show after clicking an action. */
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { confirmDialogXpath } from '../../constants/confirm-dialog.js';
|
|
1
2
|
import { TypedFormField } from './form-field.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -10,7 +11,9 @@ export class RadioField extends TypedFormField {
|
|
|
10
11
|
}
|
|
11
12
|
|
|
12
13
|
/** A locator to the confirm button which may show after setting a value. */
|
|
13
|
-
readonly confirmButton = this.
|
|
14
|
+
readonly confirmButton = this.getGlobalLocator(
|
|
15
|
+
`${confirmDialogXpath}//*[@data-test-id="confirm"]`,
|
|
16
|
+
);
|
|
14
17
|
|
|
15
18
|
/** This method verifies the field type and set the field value. */
|
|
16
19
|
async setValue(value: string): Promise<void> {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { confirmDialogXpath } from '../../constants/confirm-dialog.js';
|
|
1
2
|
import { TypedFormField } from './form-field.js';
|
|
2
3
|
|
|
3
4
|
/**
|
|
@@ -13,8 +14,8 @@ export class ToggleButtonField extends TypedFormField {
|
|
|
13
14
|
protected readonly button = this.getLocator('//button');
|
|
14
15
|
|
|
15
16
|
/** A locator to the confirm button which may show after setting a value. */
|
|
16
|
-
readonly confirmButton = this.
|
|
17
|
-
|
|
17
|
+
readonly confirmButton = this.getGlobalLocator(
|
|
18
|
+
`${confirmDialogXpath}//*[@data-test-id="confirm"]`,
|
|
18
19
|
);
|
|
19
20
|
|
|
20
21
|
/** This method toggles the button. */
|
|
@@ -23,7 +23,12 @@ export class InlineMenu extends Actions {
|
|
|
23
23
|
/** A locator to the button that opens the inline menu. */
|
|
24
24
|
readonly openButton = this.getLocator();
|
|
25
25
|
|
|
26
|
-
/**
|
|
26
|
+
/**
|
|
27
|
+
* This method waits for the menu to close.
|
|
28
|
+
*
|
|
29
|
+
* Note that the menu collapses before the selected action's handler runs, so
|
|
30
|
+
* a closed menu only means the action was triggered, not that it completed.
|
|
31
|
+
*/
|
|
27
32
|
async waitForClose(): Promise<void> {
|
|
28
33
|
await this.getLocator().waitFor({ state: 'hidden' });
|
|
29
34
|
}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* An xpath to the ConfirmDialog component. The dialog is rendered through a
|
|
3
|
+
* React portal on the document body, so it cannot be located relative to the
|
|
4
|
+
* component it is anchored to and has to be looked up globally.
|
|
5
|
+
*/
|
|
6
|
+
export const confirmDialogXpath =
|
|
7
|
+
'//*[contains(@class,"confirm-dialog-container")]';
|
package/src/constants/index.ts
CHANGED