@agnos-ui/page-objects 0.0.1-alpha.0 → 0.0.1-alpha.3
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.d.ts +37 -7
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.mjs +110 -72
- package/package.json +2 -2
- package/dist/lib/tsdoc-metadata.json +0 -11
package/dist/lib/index.d.ts
CHANGED
|
@@ -52,7 +52,7 @@ export declare class AlertPO extends BasePO {
|
|
|
52
52
|
closeButton: string;
|
|
53
53
|
};
|
|
54
54
|
getComponentSelector(): string;
|
|
55
|
-
locatorCloseButton(): Locator;
|
|
55
|
+
get locatorCloseButton(): Locator;
|
|
56
56
|
}
|
|
57
57
|
|
|
58
58
|
export declare const alertSelectors: {
|
|
@@ -71,12 +71,12 @@ export declare class ModalPO extends BasePO {
|
|
|
71
71
|
footer: string;
|
|
72
72
|
};
|
|
73
73
|
getComponentSelector(): string;
|
|
74
|
-
locatorHeader(): Locator;
|
|
75
|
-
locatorTitle(): Locator;
|
|
76
|
-
locatorBody(): Locator;
|
|
77
|
-
locatorFooter(): Locator;
|
|
78
|
-
locatorCloseButton(): Locator;
|
|
79
|
-
locatorBackdrop(): Locator;
|
|
74
|
+
get locatorHeader(): Locator;
|
|
75
|
+
get locatorTitle(): Locator;
|
|
76
|
+
get locatorBody(): Locator;
|
|
77
|
+
get locatorFooter(): Locator;
|
|
78
|
+
get locatorCloseButton(): Locator;
|
|
79
|
+
get locatorBackdrop(): Locator;
|
|
80
80
|
}
|
|
81
81
|
|
|
82
82
|
export declare const modalSelectors: {
|
|
@@ -149,6 +149,24 @@ export declare const paginationSelectors: {
|
|
|
149
149
|
ellipses: string;
|
|
150
150
|
};
|
|
151
151
|
|
|
152
|
+
export declare class ProgressbarPO extends BasePO {
|
|
153
|
+
selectors: {
|
|
154
|
+
rootComponent: string;
|
|
155
|
+
outerBar: string;
|
|
156
|
+
innerBar: string;
|
|
157
|
+
};
|
|
158
|
+
getComponentSelector(): string;
|
|
159
|
+
get locatorOuterBar(): Locator;
|
|
160
|
+
get locatorInnerBar(): Locator;
|
|
161
|
+
state(): Promise<State>;
|
|
162
|
+
}
|
|
163
|
+
|
|
164
|
+
export declare const progressbarSelectors: {
|
|
165
|
+
rootComponent: string;
|
|
166
|
+
outerBar: string;
|
|
167
|
+
innerBar: string;
|
|
168
|
+
};
|
|
169
|
+
|
|
152
170
|
export declare class RatingPO extends BasePO {
|
|
153
171
|
selectors: {
|
|
154
172
|
rootComponent: string;
|
|
@@ -222,4 +240,16 @@ export declare const selectSelectors: {
|
|
|
222
240
|
rootComponent: string;
|
|
223
241
|
};
|
|
224
242
|
|
|
243
|
+
export declare interface State {
|
|
244
|
+
ariaLabel: string | null;
|
|
245
|
+
ariaValueNow: string | null;
|
|
246
|
+
ariaValueMin: string | null;
|
|
247
|
+
ariaValueMax: string | null;
|
|
248
|
+
ariaValueText: string | null;
|
|
249
|
+
label: string | null | undefined;
|
|
250
|
+
innerClasses: string[];
|
|
251
|
+
outerHeight: string | undefined;
|
|
252
|
+
innerWidth: string | undefined;
|
|
253
|
+
}
|
|
254
|
+
|
|
225
255
|
export { }
|
package/dist/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var R=Object.defineProperty;var v=(a,s,t)=>s in a?R(a,s,{enumerable:!0,configurable:!0,writable:!0,value:t}):a[s]=t;var n=(a,s,t)=>(v(a,typeof s!="symbol"?s+"":s,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const i=require("@agnos-ui/base-po"),A={rootComponent:".modal",closeButton:".btn-close",backdrop:"xpath=./preceding-sibling::div[contains(@class,'modal-backdrop')]",header:".modal-header",title:".modal-title",body:".modal-body",footer:".modal-footer"};class O extends i.BasePO{constructor(){super(...arguments);n(this,"selectors",structuredClone(A))}getComponentSelector(){return this.selectors.rootComponent}get locatorHeader(){return this.locatorRoot.locator(this.selectors.header)}get locatorTitle(){return this.locatorHeader.locator(this.selectors.title)}get locatorBody(){return this.locatorRoot.locator(this.selectors.body)}get locatorFooter(){return this.locatorRoot.locator(this.selectors.footer)}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}get locatorBackdrop(){return this.locatorRoot.locator(this.selectors.backdrop)}}const P={rootComponent:".au-pagination",activePage:".active",previousPage:".au-previous",nextPage:".au-next",firstPage:".au-first",lastPage:".au-last",pages:".au-page",ellipses:".au-ellipsis"};class f extends i.BasePO{constructor(){super(...arguments);n(this,"selectors",structuredClone(P))}getComponentSelector(){return this.selectors.rootComponent}get locatorActivePage(){return this.locatorRoot.locator(this.selectors.activePage)}get locatorPreviousButton(){return this.locatorRoot.locator(this.selectors.previousPage)}get locatorNextButton(){return this.locatorRoot.locator(this.selectors.nextPage)}get locatorFirstButton(){return this.locatorRoot.locator(this.selectors.firstPage)}get locatorLastButton(){return this.locatorRoot.locator(this.selectors.lastPage)}get locatorPages(){return this.locatorRoot.locator(this.selectors.pages)}locatorNthPage(t){return this.locatorRoot.locator(this.selectors.pages).nth(t-1)}locatorPage(t){return this.locatorRoot.locator(this.selectors.pages,{hasText:t})}get locatorEllipses(){return this.locatorRoot.locator(this.selectors.ellipses)}}const S={rootComponent:".au-rating",star:".au-rating-star"};class I extends i.BasePO{constructor(){super(...arguments);n(this,"selectors",structuredClone(S))}getComponentSelector(){return this.selectors.rootComponent}locatorStar(t){return this.locatorRoot.locator(this.selectors.star).nth(t)}async state(){return await this.locatorRoot.evaluate((t,r)=>{const c=[...t.querySelectorAll(r.star)],l=[],e=[];for(const o of c)l.push((o.textContent||"").trim()),e.push(o.className.split(" "));return{rootClasses:t.className.trim().split(" "),value:t.getAttribute("aria-valuenow"),min:t.getAttribute("aria-valuemin"),max:t.getAttribute("aria-valuemax"),text:t.getAttribute("aria-valuetext"),disabled:t.getAttribute("aria-disabled"),readonly:t.getAttribute("aria-readonly"),stars:l,classes:e}},this.selectors)}}const y={rootComponent:".au-select"};class q extends i.BasePO{constructor(){super(...arguments);n(this,"selectors",structuredClone(y))}getComponentSelector(){return this.selectors.rootComponent}get locatorInput(){return this.locatorRoot.locator("div.input-group").locator("input")}get locatorMenu(){return this.locatorRoot.locator(".dropdown-menu")}locatorMenuItem(t){return this.locatorMenu.getByText(t).nth(0)}get locatorBadges(){return this.locatorRoot.locator("div.input-group").locator(".input-group-text")}locatorBadgeItem(t){return this.locatorBadges.locator("div.badge").filter({hasText:t}).nth(0)}locatorBadgeItemCross(t){return this.locatorBadgeItem(t).getByRole("button")}async state(){return await this.locatorRoot.evaluate(t=>{var d;const r=t.querySelector(".input-group"),c=t.querySelector("div.input-group-text"),l=r.querySelector("input"),e=[];if(c){const b=c.querySelectorAll("div.badge");for(const h of b){const p=[...h.children];e.push([...p.map(m=>(m.textContent??"").trim())])}}const o=t.querySelector("ul.dropdown-menu"),g=o!=null,u=[];if(o!=null){const b=o.querySelectorAll("li.dropdown-item");for(const h of b){let p=!1,m=!1;const C=h.querySelector("input.form-check-input");C&&(p=!0,m=C.checked),u.push({text:(d=h.textContent)==null?void 0:d.trim(),hasCheckBox:p,isChecked:m})}}return{text:l.value,badges:e,isOpen:g,list:u}})}}const x={rootComponent:".alert",closeButton:".btn-close"};class w extends i.BasePO{constructor(){super(...arguments);n(this,"selectors",structuredClone(x))}getComponentSelector(){return this.selectors.rootComponent}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}}class k extends i.BasePO{constructor(){super(...arguments);n(this,"selectors",{item:".accordion-item",collapse:".accordion-collapse",body:".accordion-body",header:".accordion-header",buttons:".accordion-button"})}getComponentSelector(){return".accordion"}get locatorAccordionItems(){return this.locatorRoot.locator(this.selectors.item)}locatorAccordionItem(t){return this.locatorRoot.locator(this.selectors.item).nth(t)}get locatorAccordionCollapses(){return this.locatorAccordionItems.locator(this.selectors.collapse)}locatorAccordionCollapse(t){return this.locatorAccordionItem(t).locator(this.selectors.collapse)}get locatorAccordionBodies(){return this.locatorAccordionCollapses.locator(this.selectors.body)}locatorAccordionBody(t){return this.locatorAccordionCollapse(t).locator(this.selectors.body)}get locatorAccordionHeaders(){return this.locatorAccordionItems.locator(this.selectors.header)}locatorAccordionHeader(t){return this.locatorAccordionItem(t).locator(this.selectors.header)}get locatorAccordionButtons(){return this.locatorAccordionHeaders.locator(this.selectors.buttons)}locatorAccordionButton(t){return this.locatorAccordionHeader(t).locator(this.selectors.buttons)}async state(){return await this.locatorRoot.evaluate(t=>{const r=[...t.querySelectorAll(".accordion-item")],c=[];for(const l of r){const e=l.querySelector(".accordion-collapse"),o=l.querySelector(".accordion-button");c.push({classes:l.className.trim().split(" "),id:l.id,isInDOM:e!==null,collapseId:e==null?void 0:e.id,buttonId:o==null?void 0:o.id,expanded:o==null?void 0:o.getAttribute("aria-expanded"),disabled:o==null?void 0:o.getAttribute("aria-disabled"),labeledBy:e==null?void 0:e.getAttribute("aria-labelledby"),buttonControls:o==null?void 0:o.getAttribute("aria-controls")})}return{rootClasses:t.className.trim().split(" "),items:c}})}}const B={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class M extends i.BasePO{constructor(){super(...arguments);n(this,"selectors",structuredClone(B))}getComponentSelector(){return this.selectors.rootComponent}get locatorOuterBar(){return this.locatorRoot.locator(this.selectors.outerBar)}get locatorInnerBar(){return this.locatorRoot.locator(this.selectors.innerBar)}async state(){return this.locatorRoot.evaluate(t=>{var l,e,o,g,u,d;const r=t.querySelector(".progress-bar"),c=t.querySelector(".progress");return{ariaLabel:t.getAttribute("aria-label"),ariaValueNow:t.getAttribute("aria-valuenow"),ariaValueMin:t.getAttribute("aria-valuemin"),ariaValueMax:t.getAttribute("aria-valuemax"),ariaValueText:t.getAttribute("aria-valuetext"),label:(l=r==null?void 0:r.textContent)==null?void 0:l.trim(),innerClasses:((g=(o=(e=r==null?void 0:r.className)==null?void 0:e.trim())==null?void 0:o.split(" "))==null?void 0:g.sort())??[],outerHeight:(u=c==null?void 0:c.style)==null?void 0:u.height,innerWidth:(d=r==null?void 0:r.style)==null?void 0:d.width}})}}exports.AccordionPO=k;exports.AlertPO=w;exports.ModalPO=O;exports.PaginationPO=f;exports.ProgressbarPO=M;exports.RatingPO=I;exports.SelectPO=q;exports.alertSelectors=x;exports.modalSelectors=A;exports.paginationSelectors=P;exports.progressbarSelectors=B;exports.ratingSelectors=S;exports.selectSelectors=y;
|
package/dist/lib/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
var A = Object.defineProperty;
|
|
2
|
-
var x = (
|
|
3
|
-
var
|
|
4
|
-
import { BasePO as
|
|
2
|
+
var x = (a, s, t) => s in a ? A(a, s, { enumerable: !0, configurable: !0, writable: !0, value: t }) : a[s] = t;
|
|
3
|
+
var n = (a, s, t) => (x(a, typeof s != "symbol" ? s + "" : s, t), t);
|
|
4
|
+
import { BasePO as i } from "@agnos-ui/base-po";
|
|
5
5
|
const y = {
|
|
6
6
|
// TODO: should we use bootstrap-independent classes starting with au- ?
|
|
7
7
|
rootComponent: ".modal",
|
|
@@ -12,35 +12,34 @@ const y = {
|
|
|
12
12
|
body: ".modal-body",
|
|
13
13
|
footer: ".modal-footer"
|
|
14
14
|
};
|
|
15
|
-
class
|
|
15
|
+
class q extends i {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
|
-
|
|
18
|
+
n(this, "selectors", structuredClone(y));
|
|
19
19
|
}
|
|
20
20
|
getComponentSelector() {
|
|
21
21
|
return this.selectors.rootComponent;
|
|
22
22
|
}
|
|
23
|
-
|
|
24
|
-
locatorHeader() {
|
|
23
|
+
get locatorHeader() {
|
|
25
24
|
return this.locatorRoot.locator(this.selectors.header);
|
|
26
25
|
}
|
|
27
|
-
locatorTitle() {
|
|
28
|
-
return this.locatorHeader
|
|
26
|
+
get locatorTitle() {
|
|
27
|
+
return this.locatorHeader.locator(this.selectors.title);
|
|
29
28
|
}
|
|
30
|
-
locatorBody() {
|
|
29
|
+
get locatorBody() {
|
|
31
30
|
return this.locatorRoot.locator(this.selectors.body);
|
|
32
31
|
}
|
|
33
|
-
locatorFooter() {
|
|
32
|
+
get locatorFooter() {
|
|
34
33
|
return this.locatorRoot.locator(this.selectors.footer);
|
|
35
34
|
}
|
|
36
|
-
locatorCloseButton() {
|
|
35
|
+
get locatorCloseButton() {
|
|
37
36
|
return this.locatorRoot.locator(this.selectors.closeButton);
|
|
38
37
|
}
|
|
39
|
-
locatorBackdrop() {
|
|
38
|
+
get locatorBackdrop() {
|
|
40
39
|
return this.locatorRoot.locator(this.selectors.backdrop);
|
|
41
40
|
}
|
|
42
41
|
}
|
|
43
|
-
const
|
|
42
|
+
const R = {
|
|
44
43
|
rootComponent: ".au-pagination",
|
|
45
44
|
activePage: ".active",
|
|
46
45
|
previousPage: ".au-previous",
|
|
@@ -50,10 +49,10 @@ const B = {
|
|
|
50
49
|
pages: ".au-page",
|
|
51
50
|
ellipses: ".au-ellipsis"
|
|
52
51
|
};
|
|
53
|
-
class
|
|
52
|
+
class O extends i {
|
|
54
53
|
constructor() {
|
|
55
54
|
super(...arguments);
|
|
56
|
-
|
|
55
|
+
n(this, "selectors", structuredClone(R));
|
|
57
56
|
}
|
|
58
57
|
// TODO should we add this in the list of selector ?
|
|
59
58
|
// Depend on the setSelectors usage...
|
|
@@ -114,14 +113,14 @@ class q extends n {
|
|
|
114
113
|
return this.locatorRoot.locator(this.selectors.ellipses);
|
|
115
114
|
}
|
|
116
115
|
}
|
|
117
|
-
const
|
|
116
|
+
const v = {
|
|
118
117
|
rootComponent: ".au-rating",
|
|
119
118
|
star: ".au-rating-star"
|
|
120
119
|
};
|
|
121
|
-
class
|
|
120
|
+
class w extends i {
|
|
122
121
|
constructor() {
|
|
123
122
|
super(...arguments);
|
|
124
|
-
|
|
123
|
+
n(this, "selectors", structuredClone(v));
|
|
125
124
|
}
|
|
126
125
|
getComponentSelector() {
|
|
127
126
|
return this.selectors.rootComponent;
|
|
@@ -135,10 +134,10 @@ class k extends n {
|
|
|
135
134
|
// TODO to be pushed to the test itself
|
|
136
135
|
// We already discuss with Guillaume Saas not to put this in the basic PO which should only return locator basically
|
|
137
136
|
async state() {
|
|
138
|
-
return await this.locatorRoot.evaluate((t,
|
|
139
|
-
const
|
|
140
|
-
for (const o of
|
|
141
|
-
|
|
137
|
+
return await this.locatorRoot.evaluate((t, r) => {
|
|
138
|
+
const c = [...t.querySelectorAll(r.star)], l = [], e = [];
|
|
139
|
+
for (const o of c)
|
|
140
|
+
l.push((o.textContent || "").trim()), e.push(o.className.split(" "));
|
|
142
141
|
return {
|
|
143
142
|
rootClasses: t.className.trim().split(" "),
|
|
144
143
|
value: t.getAttribute("aria-valuenow"),
|
|
@@ -147,8 +146,8 @@ class k extends n {
|
|
|
147
146
|
text: t.getAttribute("aria-valuetext"),
|
|
148
147
|
disabled: t.getAttribute("aria-disabled"),
|
|
149
148
|
readonly: t.getAttribute("aria-readonly"),
|
|
150
|
-
stars:
|
|
151
|
-
classes:
|
|
149
|
+
stars: l,
|
|
150
|
+
classes: e
|
|
152
151
|
};
|
|
153
152
|
}, this.selectors);
|
|
154
153
|
}
|
|
@@ -157,10 +156,10 @@ const S = {
|
|
|
157
156
|
rootComponent: ".au-select"
|
|
158
157
|
// TODO add selector list
|
|
159
158
|
};
|
|
160
|
-
class
|
|
159
|
+
class k extends i {
|
|
161
160
|
constructor() {
|
|
162
161
|
super(...arguments);
|
|
163
|
-
|
|
162
|
+
n(this, "selectors", structuredClone(S));
|
|
164
163
|
}
|
|
165
164
|
getComponentSelector() {
|
|
166
165
|
return this.selectors.rootComponent;
|
|
@@ -205,57 +204,57 @@ class O extends n {
|
|
|
205
204
|
// We already discuss with Guillaume Saas not to put this in the basic PO which should only return locator basically
|
|
206
205
|
async state() {
|
|
207
206
|
return await this.locatorRoot.evaluate((t) => {
|
|
208
|
-
var
|
|
209
|
-
const
|
|
210
|
-
if (
|
|
211
|
-
const
|
|
212
|
-
for (const
|
|
213
|
-
const
|
|
214
|
-
|
|
207
|
+
var d;
|
|
208
|
+
const r = t.querySelector(".input-group"), c = t.querySelector("div.input-group-text"), l = r.querySelector("input"), e = [];
|
|
209
|
+
if (c) {
|
|
210
|
+
const b = c.querySelectorAll("div.badge");
|
|
211
|
+
for (const g of b) {
|
|
212
|
+
const p = [...g.children];
|
|
213
|
+
e.push([...p.map((m) => (m.textContent ?? "").trim())]);
|
|
215
214
|
}
|
|
216
215
|
}
|
|
217
|
-
const o = t.querySelector("ul.dropdown-menu"),
|
|
216
|
+
const o = t.querySelector("ul.dropdown-menu"), h = o != null, u = [];
|
|
218
217
|
if (o != null) {
|
|
219
|
-
const
|
|
220
|
-
for (const
|
|
221
|
-
let
|
|
222
|
-
const
|
|
223
|
-
|
|
224
|
-
text: (
|
|
225
|
-
hasCheckBox:
|
|
226
|
-
isChecked:
|
|
218
|
+
const b = o.querySelectorAll("li.dropdown-item");
|
|
219
|
+
for (const g of b) {
|
|
220
|
+
let p = !1, m = !1;
|
|
221
|
+
const C = g.querySelector("input.form-check-input");
|
|
222
|
+
C && (p = !0, m = C.checked), u.push({
|
|
223
|
+
text: (d = g.textContent) == null ? void 0 : d.trim(),
|
|
224
|
+
hasCheckBox: p,
|
|
225
|
+
isChecked: m
|
|
227
226
|
});
|
|
228
227
|
}
|
|
229
228
|
}
|
|
230
229
|
return {
|
|
231
|
-
text:
|
|
232
|
-
badges:
|
|
233
|
-
isOpen:
|
|
234
|
-
list:
|
|
230
|
+
text: l.value,
|
|
231
|
+
badges: e,
|
|
232
|
+
isOpen: h,
|
|
233
|
+
list: u
|
|
235
234
|
};
|
|
236
235
|
});
|
|
237
236
|
}
|
|
238
237
|
}
|
|
239
|
-
const
|
|
238
|
+
const B = {
|
|
240
239
|
rootComponent: ".alert",
|
|
241
240
|
closeButton: ".btn-close"
|
|
242
241
|
};
|
|
243
|
-
class
|
|
242
|
+
class H extends i {
|
|
244
243
|
constructor() {
|
|
245
244
|
super(...arguments);
|
|
246
|
-
|
|
245
|
+
n(this, "selectors", structuredClone(B));
|
|
247
246
|
}
|
|
248
247
|
getComponentSelector() {
|
|
249
248
|
return this.selectors.rootComponent;
|
|
250
249
|
}
|
|
251
|
-
locatorCloseButton() {
|
|
250
|
+
get locatorCloseButton() {
|
|
252
251
|
return this.locatorRoot.locator(this.selectors.closeButton);
|
|
253
252
|
}
|
|
254
253
|
}
|
|
255
|
-
class
|
|
254
|
+
class M extends i {
|
|
256
255
|
constructor() {
|
|
257
256
|
super(...arguments);
|
|
258
|
-
|
|
257
|
+
n(this, "selectors", {
|
|
259
258
|
item: ".accordion-item",
|
|
260
259
|
collapse: ".accordion-collapse",
|
|
261
260
|
body: ".accordion-body",
|
|
@@ -313,35 +312,74 @@ class E extends n {
|
|
|
313
312
|
}
|
|
314
313
|
async state() {
|
|
315
314
|
return await this.locatorRoot.evaluate((t) => {
|
|
316
|
-
const
|
|
317
|
-
for (const
|
|
318
|
-
const
|
|
319
|
-
|
|
320
|
-
classes:
|
|
321
|
-
id:
|
|
322
|
-
isInDOM:
|
|
323
|
-
collapseId:
|
|
315
|
+
const r = [...t.querySelectorAll(".accordion-item")], c = [];
|
|
316
|
+
for (const l of r) {
|
|
317
|
+
const e = l.querySelector(".accordion-collapse"), o = l.querySelector(".accordion-button");
|
|
318
|
+
c.push({
|
|
319
|
+
classes: l.className.trim().split(" "),
|
|
320
|
+
id: l.id,
|
|
321
|
+
isInDOM: e !== null,
|
|
322
|
+
collapseId: e == null ? void 0 : e.id,
|
|
324
323
|
buttonId: o == null ? void 0 : o.id,
|
|
325
324
|
expanded: o == null ? void 0 : o.getAttribute("aria-expanded"),
|
|
326
325
|
disabled: o == null ? void 0 : o.getAttribute("aria-disabled"),
|
|
327
|
-
labeledBy:
|
|
326
|
+
labeledBy: e == null ? void 0 : e.getAttribute("aria-labelledby"),
|
|
328
327
|
buttonControls: o == null ? void 0 : o.getAttribute("aria-controls")
|
|
329
328
|
});
|
|
330
329
|
}
|
|
331
|
-
return { rootClasses: t.className.trim().split(" "), items:
|
|
330
|
+
return { rootClasses: t.className.trim().split(" "), items: c };
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
const P = {
|
|
335
|
+
rootComponent: '[role="progressbar"]',
|
|
336
|
+
outerBar: ".progress",
|
|
337
|
+
innerBar: ".progress-bar"
|
|
338
|
+
};
|
|
339
|
+
class E extends i {
|
|
340
|
+
constructor() {
|
|
341
|
+
super(...arguments);
|
|
342
|
+
n(this, "selectors", structuredClone(P));
|
|
343
|
+
}
|
|
344
|
+
getComponentSelector() {
|
|
345
|
+
return this.selectors.rootComponent;
|
|
346
|
+
}
|
|
347
|
+
get locatorOuterBar() {
|
|
348
|
+
return this.locatorRoot.locator(this.selectors.outerBar);
|
|
349
|
+
}
|
|
350
|
+
get locatorInnerBar() {
|
|
351
|
+
return this.locatorRoot.locator(this.selectors.innerBar);
|
|
352
|
+
}
|
|
353
|
+
async state() {
|
|
354
|
+
return this.locatorRoot.evaluate((t) => {
|
|
355
|
+
var l, e, o, h, u, d;
|
|
356
|
+
const r = t.querySelector(".progress-bar"), c = t.querySelector(".progress");
|
|
357
|
+
return {
|
|
358
|
+
ariaLabel: t.getAttribute("aria-label"),
|
|
359
|
+
ariaValueNow: t.getAttribute("aria-valuenow"),
|
|
360
|
+
ariaValueMin: t.getAttribute("aria-valuemin"),
|
|
361
|
+
ariaValueMax: t.getAttribute("aria-valuemax"),
|
|
362
|
+
ariaValueText: t.getAttribute("aria-valuetext"),
|
|
363
|
+
label: (l = r == null ? void 0 : r.textContent) == null ? void 0 : l.trim(),
|
|
364
|
+
innerClasses: ((h = (o = (e = r == null ? void 0 : r.className) == null ? void 0 : e.trim()) == null ? void 0 : o.split(" ")) == null ? void 0 : h.sort()) ?? [],
|
|
365
|
+
outerHeight: (u = c == null ? void 0 : c.style) == null ? void 0 : u.height,
|
|
366
|
+
innerWidth: (d = r == null ? void 0 : r.style) == null ? void 0 : d.width
|
|
367
|
+
};
|
|
332
368
|
});
|
|
333
369
|
}
|
|
334
370
|
}
|
|
335
371
|
export {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
372
|
+
M as AccordionPO,
|
|
373
|
+
H as AlertPO,
|
|
374
|
+
q as ModalPO,
|
|
375
|
+
O as PaginationPO,
|
|
376
|
+
E as ProgressbarPO,
|
|
377
|
+
w as RatingPO,
|
|
378
|
+
k as SelectPO,
|
|
379
|
+
B as alertSelectors,
|
|
343
380
|
y as modalSelectors,
|
|
344
|
-
|
|
345
|
-
|
|
381
|
+
R as paginationSelectors,
|
|
382
|
+
P as progressbarSelectors,
|
|
383
|
+
v as ratingSelectors,
|
|
346
384
|
S as selectSelectors
|
|
347
385
|
};
|
package/package.json
CHANGED
|
@@ -20,7 +20,7 @@
|
|
|
20
20
|
"build:api-extractor": "api-extractor run"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@agnos-ui/base-po": "0.0.1-alpha.
|
|
23
|
+
"@agnos-ui/base-po": "0.0.1-alpha.3"
|
|
24
24
|
},
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"@playwright/test": "*"
|
|
@@ -35,5 +35,5 @@
|
|
|
35
35
|
"url": "https://github.com/AmadeusITGroup/AgnosUI.git",
|
|
36
36
|
"directory": "page-objects"
|
|
37
37
|
},
|
|
38
|
-
"version": "0.0.1-alpha.
|
|
38
|
+
"version": "0.0.1-alpha.3"
|
|
39
39
|
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
// This file is read by tools that parse documentation comments conforming to the TSDoc standard.
|
|
2
|
-
// It should be published with your NPM package. It should not be tracked by Git.
|
|
3
|
-
{
|
|
4
|
-
"tsdocVersion": "0.12",
|
|
5
|
-
"toolPackages": [
|
|
6
|
-
{
|
|
7
|
-
"packageName": "@microsoft/api-extractor",
|
|
8
|
-
"packageVersion": "7.36.4"
|
|
9
|
-
}
|
|
10
|
-
]
|
|
11
|
-
}
|