@agnos-ui/base-po 0.3.1 → 0.4.0-next.0
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/lib/index.js +1 -1
- package/dist/lib/index.mjs +12 -16
- package/package.json +2 -2
package/dist/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var f=Object.defineProperty;var g=o=>{throw TypeError(o)};var m=(o,t,e)=>t in o?f(o,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):o[t]=e;var p=(o,t,e)=>m(o,typeof t!="symbol"?t+"":t,e),d=(o,t,e)=>t.has(o)||g("Cannot "+e);var s=(o,t,e)=>(d(o,t,"read from private field"),e?e.call(o):t.get(o)),c=(o,t,e)=>t.has(o)?g("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(o):t.set(o,e),n=(o,t,e,i)=>(d(o,t,"write to private field"),i?i.call(o,e):t.set(o,e),e);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});function h(o){return"waitFor"in o}var r,a,l;class R{constructor(t,e=null){c(this,r);c(this,a);c(this,l);p(this,"_page");n(this,r,t),n(this,a,e),this._page=h(t)?t.page():t}get locatorRoot(){let t=s(this,l);if(!t){const e=this.getComponentSelector();let i=s(this,r);if(e){i=i.locator(e);const u=s(this,a);u!==null&&(i=i.nth(u))}t=h(i)?i:i.locator("html"),n(this,l,t)}return t}getComponentSelector(){return""}async waitLoaded(){h(this.locatorRoot)&&await this.locatorRoot.waitFor()}}r=new WeakMap,a=new WeakMap,l=new WeakMap;exports.BasePO=R;
|
package/dist/lib/index.mjs
CHANGED
|
@@ -1,33 +1,29 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
|
|
4
|
-
if (!t.has(o))
|
|
5
|
-
throw TypeError("Cannot " + e);
|
|
1
|
+
var f = Object.defineProperty;
|
|
2
|
+
var u = (o) => {
|
|
3
|
+
throw TypeError(o);
|
|
6
4
|
};
|
|
7
|
-
var
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
t instanceof WeakSet ? t.add(o) : t.set(o, e);
|
|
11
|
-
}, n = (o, t, e, i) => (g(o, t, "write to private field"), i ? i.call(o, e) : t.set(o, e), e);
|
|
5
|
+
var m = (o, t, e) => t in o ? f(o, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : o[t] = e;
|
|
6
|
+
var g = (o, t, e) => m(o, typeof t != "symbol" ? t + "" : t, e), R = (o, t, e) => t.has(o) || u("Cannot " + e);
|
|
7
|
+
var l = (o, t, e) => (R(o, t, "read from private field"), e ? e.call(o) : t.get(o)), s = (o, t, e) => t.has(o) ? u("Cannot add the same private member more than once") : t instanceof WeakSet ? t.add(o) : t.set(o, e), n = (o, t, e, i) => (R(o, t, "write to private field"), i ? i.call(o, e) : t.set(o, e), e);
|
|
12
8
|
function h(o) {
|
|
13
9
|
return "waitFor" in o;
|
|
14
10
|
}
|
|
15
11
|
var r, a, c;
|
|
16
|
-
class
|
|
12
|
+
class w {
|
|
17
13
|
/**
|
|
18
14
|
*
|
|
19
15
|
* @param container - Container locator (page if there is no container) where the component is located
|
|
20
16
|
* @param index - If you have multiple components **inside the container**, you must provide the index to select the component to work with. You can omit this parameter if you have a single component.
|
|
21
17
|
*/
|
|
22
18
|
constructor(t, e = null) {
|
|
23
|
-
s(this, r
|
|
24
|
-
s(this, a
|
|
25
|
-
s(this, c
|
|
19
|
+
s(this, r);
|
|
20
|
+
s(this, a);
|
|
21
|
+
s(this, c);
|
|
26
22
|
/**
|
|
27
23
|
* Playwright page object from which the page object has been created.
|
|
28
24
|
* It can be convenient for situation where you can't work (internally) with the locatorRoot
|
|
29
25
|
*/
|
|
30
|
-
|
|
26
|
+
g(this, "_page");
|
|
31
27
|
n(this, r, t), n(this, a, e), this._page = h(t) ? t.page() : t;
|
|
32
28
|
}
|
|
33
29
|
/**
|
|
@@ -88,5 +84,5 @@ class d {
|
|
|
88
84
|
}
|
|
89
85
|
r = new WeakMap(), a = new WeakMap(), c = new WeakMap();
|
|
90
86
|
export {
|
|
91
|
-
|
|
87
|
+
w as BasePO
|
|
92
88
|
};
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/base-po",
|
|
3
3
|
"description": "Base class to build page objects for end-to-end tests with Playwright.",
|
|
4
|
-
"version": "0.
|
|
4
|
+
"version": "0.4.0-next.0",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"e2e",
|
|
7
7
|
"page-object",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
}
|
|
58
58
|
},
|
|
59
59
|
"peerDependencies": {
|
|
60
|
-
"@playwright/test": "
|
|
60
|
+
"@playwright/test": "^1.44.1"
|
|
61
61
|
},
|
|
62
62
|
"files": [
|
|
63
63
|
"dist/lib"
|