@axinom/mosaic-e2e-ui-selectors 0.16.3-rc.1 → 0.16.3-rc.11
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.
|
@@ -14,15 +14,15 @@ class Actions extends component_model_1.ComponentModel {
|
|
|
14
14
|
constructor(parent, xpath = '//*[@data-test-id="actions"]') {
|
|
15
15
|
super(parent, xpath);
|
|
16
16
|
/** A locator to the confirm button which may show after clicking an action. */
|
|
17
|
-
this.confirmButton = this.
|
|
17
|
+
this.confirmButton = this.getGlobalLocator(`//*[@data-test-id="action"]//*[@data-test-id="confirm"]`);
|
|
18
18
|
}
|
|
19
19
|
/** This method finds an action button by position. Position is 1 indexed. Negative numbers count from the end. */
|
|
20
20
|
getAction(position) {
|
|
21
|
-
return this.
|
|
21
|
+
return this.getGlobalLocator('//*[@data-test-id="action"]').nth(position);
|
|
22
22
|
}
|
|
23
23
|
/** This method finds an action button by label. The label must match exactly. */
|
|
24
24
|
getActionByLabel(label) {
|
|
25
|
-
return this.
|
|
25
|
+
return this.getGlobalLocator(`//*[@data-test-id="action" and .//*[@data-test-id="label" and text()="${label}"]]`);
|
|
26
26
|
}
|
|
27
27
|
}
|
|
28
28
|
exports.Actions = Actions;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/component-models/actions.ts"],"names":[],"mappings":";;;AACA,wDAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,gCAAc;IACzC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,8BAA8B;QAEtC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAGvB,+EAA+E;QACtE,kBAAa,GAAG,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"actions.js","sourceRoot":"","sources":["../../src/component-models/actions.ts"],"names":[],"mappings":";;;AACA,wDAAoD;AAEpD;;GAEG;AACH,MAAa,OAAQ,SAAQ,gCAAc;IACzC;;;;OAIG;IACH,YACE,MAA4C,EAC5C,KAAK,GAAG,8BAA8B;QAEtC,KAAK,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QAGvB,+EAA+E;QACtE,kBAAa,GAAG,IAAI,CAAC,gBAAgB,CAC5C,yDAAyD,CAC1D,CAAC;IALF,CAAC;IAOD,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;AA7BD,0BA6BC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@axinom/mosaic-e2e-ui-selectors",
|
|
3
|
-
"version": "0.16.3-rc.
|
|
3
|
+
"version": "0.16.3-rc.11",
|
|
4
4
|
"description": "Component models for testing Axinom Mosaic applications with Playwright.",
|
|
5
5
|
"author": "Axinom",
|
|
6
6
|
"license": "PROPRIETARY",
|
|
@@ -33,5 +33,5 @@
|
|
|
33
33
|
"publishConfig": {
|
|
34
34
|
"access": "public"
|
|
35
35
|
},
|
|
36
|
-
"gitHead": "
|
|
36
|
+
"gitHead": "11dc7f94f3b4c81df720b8adfe901cd44407e693"
|
|
37
37
|
}
|
|
@@ -18,18 +18,18 @@ export class Actions extends ComponentModel {
|
|
|
18
18
|
}
|
|
19
19
|
|
|
20
20
|
/** A locator to the confirm button which may show after clicking an action. */
|
|
21
|
-
readonly confirmButton = this.
|
|
21
|
+
readonly confirmButton = this.getGlobalLocator(
|
|
22
22
|
`//*[@data-test-id="action"]//*[@data-test-id="confirm"]`,
|
|
23
23
|
);
|
|
24
24
|
|
|
25
25
|
/** This method finds an action button by position. Position is 1 indexed. Negative numbers count from the end. */
|
|
26
26
|
getAction(position: number): Locator {
|
|
27
|
-
return this.
|
|
27
|
+
return this.getGlobalLocator('//*[@data-test-id="action"]').nth(position);
|
|
28
28
|
}
|
|
29
29
|
|
|
30
30
|
/** This method finds an action button by label. The label must match exactly. */
|
|
31
31
|
getActionByLabel(label: string): Locator {
|
|
32
|
-
return this.
|
|
32
|
+
return this.getGlobalLocator(
|
|
33
33
|
`//*[@data-test-id="action" and .//*[@data-test-id="label" and text()="${label}"]]`,
|
|
34
34
|
);
|
|
35
35
|
}
|