@agnos-ui/page-objects 0.0.1-alpha.1 → 0.0.1-alpha.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.
- package/dist/lib/index.d.ts +70 -0
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.mjs +142 -53
- package/package.json +2 -2
package/dist/lib/index.d.ts
CHANGED
|
@@ -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,56 @@ export declare const selectSelectors: {
|
|
|
222
240
|
rootComponent: string;
|
|
223
241
|
};
|
|
224
242
|
|
|
243
|
+
export declare class SliderPO extends BasePO {
|
|
244
|
+
selectors: {
|
|
245
|
+
rootComponent: string;
|
|
246
|
+
clickableArea: string;
|
|
247
|
+
handle: string;
|
|
248
|
+
minLabelHorizontal: string;
|
|
249
|
+
maxLabelHorizontal: string;
|
|
250
|
+
minLabelVertical: string;
|
|
251
|
+
maxLabelVertical: string;
|
|
252
|
+
sliderProgress: string;
|
|
253
|
+
};
|
|
254
|
+
getComponentSelector(): string;
|
|
255
|
+
get locatorHandle(): Locator;
|
|
256
|
+
get locatorMinLabelHorizontal(): Locator;
|
|
257
|
+
get locatorMaxLabelHorizontal(): Locator;
|
|
258
|
+
get locatorMinLabelVertical(): Locator;
|
|
259
|
+
get locatorMaxLabelVertical(): Locator;
|
|
260
|
+
sliderHandleState(): Promise<{
|
|
261
|
+
style: string | null;
|
|
262
|
+
value: string | null;
|
|
263
|
+
min: string | null;
|
|
264
|
+
max: string | null;
|
|
265
|
+
text: string | null;
|
|
266
|
+
disabled: string | null;
|
|
267
|
+
readonly: string | null;
|
|
268
|
+
}[]>;
|
|
269
|
+
sliderProgressState(): Promise<(string | null)[]>;
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
export declare const sliderSelectors: {
|
|
273
|
+
rootComponent: string;
|
|
274
|
+
clickableArea: string;
|
|
275
|
+
handle: string;
|
|
276
|
+
minLabelHorizontal: string;
|
|
277
|
+
maxLabelHorizontal: string;
|
|
278
|
+
minLabelVertical: string;
|
|
279
|
+
maxLabelVertical: string;
|
|
280
|
+
sliderProgress: string;
|
|
281
|
+
};
|
|
282
|
+
|
|
283
|
+
export declare interface State {
|
|
284
|
+
ariaLabel: string | null;
|
|
285
|
+
ariaValueNow: string | null;
|
|
286
|
+
ariaValueMin: string | null;
|
|
287
|
+
ariaValueMax: string | null;
|
|
288
|
+
ariaValueText: string | null;
|
|
289
|
+
label: string | null | undefined;
|
|
290
|
+
innerClasses: string[];
|
|
291
|
+
outerHeight: string | undefined;
|
|
292
|
+
innerWidth: string | undefined;
|
|
293
|
+
}
|
|
294
|
+
|
|
225
295
|
export { }
|
package/dist/lib/index.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";var
|
|
1
|
+
"use strict";var B=Object.defineProperty;var O=(s,a,t)=>a in s?B(s,a,{enumerable:!0,configurable:!0,writable:!0,value:t}):s[a]=t;var i=(s,a,t)=>(O(s,typeof a!="symbol"?a+"":a,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("@agnos-ui/base-po"),x={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 f extends n.BasePO{constructor(){super(...arguments);i(this,"selectors",structuredClone(x))}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 H extends n.BasePO{constructor(){super(...arguments);i(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 C={rootComponent:".au-rating",star:".au-rating-star"};class I extends n.BasePO{constructor(){super(...arguments);i(this,"selectors",structuredClone(C))}getComponentSelector(){return this.selectors.rootComponent}locatorStar(t){return this.locatorRoot.locator(this.selectors.star).nth(t)}async state(){return await this.locatorRoot.evaluate((t,e)=>{const c=[...t.querySelectorAll(e.star)],l=[],r=[];for(const o of c)l.push((o.textContent||"").trim()),r.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:r}},this.selectors)}}const S={rootComponent:".au-select"};class q extends n.BasePO{constructor(){super(...arguments);i(this,"selectors",structuredClone(S))}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 e=t.querySelector(".input-group"),c=t.querySelector("div.input-group-text"),l=e.querySelector("input"),r=[];if(c){const b=c.querySelectorAll("div.badge");for(const g of b){const m=[...g.children];r.push([...m.map(p=>(p.textContent??"").trim())])}}const o=t.querySelector("ul.dropdown-menu"),h=o!=null,u=[];if(o!=null){const b=o.querySelectorAll("li.dropdown-item");for(const g of b){let m=!1,p=!1;const A=g.querySelector("input.form-check-input");A&&(m=!0,p=A.checked),u.push({text:(d=g.textContent)==null?void 0:d.trim(),hasCheckBox:m,isChecked:p})}}return{text:l.value,badges:r,isOpen:h,list:u}})}}const y={rootComponent:".alert",closeButton:".btn-close"};class L extends n.BasePO{constructor(){super(...arguments);i(this,"selectors",structuredClone(y))}getComponentSelector(){return this.selectors.rootComponent}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}}class M extends n.BasePO{constructor(){super(...arguments);i(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 e=[...t.querySelectorAll(".accordion-item")],c=[];for(const l of e){const r=l.querySelector(".accordion-collapse"),o=l.querySelector(".accordion-button");c.push({classes:l.className.trim().split(" "),id:l.id,isInDOM:r!==null,collapseId:r==null?void 0:r.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:r==null?void 0:r.getAttribute("aria-labelledby"),buttonControls:o==null?void 0:o.getAttribute("aria-controls")})}return{rootClasses:t.className.trim().split(" "),items:c}})}}const v={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class k extends n.BasePO{constructor(){super(...arguments);i(this,"selectors",structuredClone(v))}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,r,o,h,u,d;const e=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=e==null?void 0:e.textContent)==null?void 0:l.trim(),innerClasses:((h=(o=(r=e==null?void 0:e.className)==null?void 0:r.trim())==null?void 0:o.split(" "))==null?void 0:h.sort())??[],outerHeight:(u=c==null?void 0:c.style)==null?void 0:u.height,innerWidth:(d=e==null?void 0:e.style)==null?void 0:d.width}})}}const R={rootComponent:".au-slider",clickableArea:".au-slider-clickable-area",handle:".au-slider-handle",minLabelHorizontal:".au-slider-label-min",maxLabelHorizontal:".au-slider-label-max",minLabelVertical:".au-slider-label-vertical-min",maxLabelVertical:".au-slider-label-vertical-max",sliderProgress:".au-slider-progress"};class w extends n.BasePO{constructor(){super(...arguments);i(this,"selectors",structuredClone(R))}getComponentSelector(){return this.selectors.rootComponent}get locatorHandle(){return this.locatorRoot.locator(this.selectors.handle)}get locatorMinLabelHorizontal(){return this.locatorRoot.locator(this.selectors.minLabelHorizontal)}get locatorMaxLabelHorizontal(){return this.locatorRoot.locator(this.selectors.maxLabelHorizontal)}get locatorMinLabelVertical(){return this.locatorRoot.locator(this.selectors.minLabelVertical)}get locatorMaxLabelVertical(){return this.locatorRoot.locator(this.selectors.maxLabelVertical)}async sliderHandleState(){return this.locatorRoot.locator(this.selectors.handle).evaluateAll(t=>t.map(e=>({style:e.getAttribute("style"),value:e.getAttribute("aria-valuenow"),min:e.getAttribute("aria-valuemin"),max:e.getAttribute("aria-valuemax"),text:e.getAttribute("aria-valuetext"),disabled:e.getAttribute("aria-disabled"),readonly:e.getAttribute("aria-readonly")})))}async sliderProgressState(){return this.locatorRoot.locator(this.selectors.sliderProgress).evaluateAll(t=>t.map(e=>e.getAttribute("style")))}}exports.AccordionPO=M;exports.AlertPO=L;exports.ModalPO=f;exports.PaginationPO=H;exports.ProgressbarPO=k;exports.RatingPO=I;exports.SelectPO=q;exports.SliderPO=w;exports.alertSelectors=y;exports.modalSelectors=x;exports.paginationSelectors=P;exports.progressbarSelectors=v;exports.ratingSelectors=C;exports.selectSelectors=S;exports.sliderSelectors=R;
|
package/dist/lib/index.mjs
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
1
|
+
var x = Object.defineProperty;
|
|
2
|
+
var C = (s, a, t) => a in s ? x(s, a, { enumerable: !0, configurable: !0, writable: !0, value: t }) : s[a] = t;
|
|
3
|
+
var i = (s, a, t) => (C(s, typeof a != "symbol" ? a + "" : a, t), t);
|
|
4
4
|
import { BasePO as n } from "@agnos-ui/base-po";
|
|
5
5
|
const y = {
|
|
6
6
|
// TODO: should we use bootstrap-independent classes starting with au- ?
|
|
@@ -12,10 +12,10 @@ const y = {
|
|
|
12
12
|
body: ".modal-body",
|
|
13
13
|
footer: ".modal-footer"
|
|
14
14
|
};
|
|
15
|
-
class
|
|
15
|
+
class L extends n {
|
|
16
16
|
constructor() {
|
|
17
17
|
super(...arguments);
|
|
18
|
-
|
|
18
|
+
i(this, "selectors", structuredClone(y));
|
|
19
19
|
}
|
|
20
20
|
getComponentSelector() {
|
|
21
21
|
return this.selectors.rootComponent;
|
|
@@ -39,7 +39,7 @@ class I extends n {
|
|
|
39
39
|
return this.locatorRoot.locator(this.selectors.backdrop);
|
|
40
40
|
}
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const v = {
|
|
43
43
|
rootComponent: ".au-pagination",
|
|
44
44
|
activePage: ".active",
|
|
45
45
|
previousPage: ".au-previous",
|
|
@@ -52,7 +52,7 @@ const B = {
|
|
|
52
52
|
class q extends n {
|
|
53
53
|
constructor() {
|
|
54
54
|
super(...arguments);
|
|
55
|
-
|
|
55
|
+
i(this, "selectors", structuredClone(v));
|
|
56
56
|
}
|
|
57
57
|
// TODO should we add this in the list of selector ?
|
|
58
58
|
// Depend on the setSelectors usage...
|
|
@@ -117,10 +117,10 @@ const R = {
|
|
|
117
117
|
rootComponent: ".au-rating",
|
|
118
118
|
star: ".au-rating-star"
|
|
119
119
|
};
|
|
120
|
-
class
|
|
120
|
+
class O extends n {
|
|
121
121
|
constructor() {
|
|
122
122
|
super(...arguments);
|
|
123
|
-
|
|
123
|
+
i(this, "selectors", structuredClone(R));
|
|
124
124
|
}
|
|
125
125
|
getComponentSelector() {
|
|
126
126
|
return this.selectors.rootComponent;
|
|
@@ -134,10 +134,10 @@ class k extends n {
|
|
|
134
134
|
// TODO to be pushed to the test itself
|
|
135
135
|
// We already discuss with Guillaume Saas not to put this in the basic PO which should only return locator basically
|
|
136
136
|
async state() {
|
|
137
|
-
return await this.locatorRoot.evaluate((t,
|
|
138
|
-
const
|
|
139
|
-
for (const o of
|
|
140
|
-
|
|
137
|
+
return await this.locatorRoot.evaluate((t, e) => {
|
|
138
|
+
const c = [...t.querySelectorAll(e.star)], l = [], r = [];
|
|
139
|
+
for (const o of c)
|
|
140
|
+
l.push((o.textContent || "").trim()), r.push(o.className.split(" "));
|
|
141
141
|
return {
|
|
142
142
|
rootClasses: t.className.trim().split(" "),
|
|
143
143
|
value: t.getAttribute("aria-valuenow"),
|
|
@@ -146,7 +146,7 @@ class k extends n {
|
|
|
146
146
|
text: t.getAttribute("aria-valuetext"),
|
|
147
147
|
disabled: t.getAttribute("aria-disabled"),
|
|
148
148
|
readonly: t.getAttribute("aria-readonly"),
|
|
149
|
-
stars:
|
|
149
|
+
stars: l,
|
|
150
150
|
classes: r
|
|
151
151
|
};
|
|
152
152
|
}, this.selectors);
|
|
@@ -156,10 +156,10 @@ const S = {
|
|
|
156
156
|
rootComponent: ".au-select"
|
|
157
157
|
// TODO add selector list
|
|
158
158
|
};
|
|
159
|
-
class
|
|
159
|
+
class k extends n {
|
|
160
160
|
constructor() {
|
|
161
161
|
super(...arguments);
|
|
162
|
-
|
|
162
|
+
i(this, "selectors", structuredClone(S));
|
|
163
163
|
}
|
|
164
164
|
getComponentSelector() {
|
|
165
165
|
return this.selectors.rootComponent;
|
|
@@ -204,45 +204,45 @@ class O extends n {
|
|
|
204
204
|
// We already discuss with Guillaume Saas not to put this in the basic PO which should only return locator basically
|
|
205
205
|
async state() {
|
|
206
206
|
return await this.locatorRoot.evaluate((t) => {
|
|
207
|
-
var
|
|
208
|
-
const
|
|
209
|
-
if (
|
|
210
|
-
const
|
|
211
|
-
for (const
|
|
212
|
-
const
|
|
213
|
-
r.push([...
|
|
207
|
+
var d;
|
|
208
|
+
const e = t.querySelector(".input-group"), c = t.querySelector("div.input-group-text"), l = e.querySelector("input"), r = [];
|
|
209
|
+
if (c) {
|
|
210
|
+
const b = c.querySelectorAll("div.badge");
|
|
211
|
+
for (const g of b) {
|
|
212
|
+
const m = [...g.children];
|
|
213
|
+
r.push([...m.map((p) => (p.textContent ?? "").trim())]);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
|
-
const o = t.querySelector("ul.dropdown-menu"),
|
|
216
|
+
const o = t.querySelector("ul.dropdown-menu"), h = o != null, u = [];
|
|
217
217
|
if (o != null) {
|
|
218
|
-
const
|
|
219
|
-
for (const
|
|
220
|
-
let
|
|
221
|
-
const
|
|
222
|
-
|
|
223
|
-
text: (
|
|
224
|
-
hasCheckBox:
|
|
225
|
-
isChecked:
|
|
218
|
+
const b = o.querySelectorAll("li.dropdown-item");
|
|
219
|
+
for (const g of b) {
|
|
220
|
+
let m = !1, p = !1;
|
|
221
|
+
const A = g.querySelector("input.form-check-input");
|
|
222
|
+
A && (m = !0, p = A.checked), u.push({
|
|
223
|
+
text: (d = g.textContent) == null ? void 0 : d.trim(),
|
|
224
|
+
hasCheckBox: m,
|
|
225
|
+
isChecked: p
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
return {
|
|
230
|
-
text:
|
|
230
|
+
text: l.value,
|
|
231
231
|
badges: r,
|
|
232
|
-
isOpen:
|
|
233
|
-
list:
|
|
232
|
+
isOpen: h,
|
|
233
|
+
list: u
|
|
234
234
|
};
|
|
235
235
|
});
|
|
236
236
|
}
|
|
237
237
|
}
|
|
238
|
-
const
|
|
238
|
+
const P = {
|
|
239
239
|
rootComponent: ".alert",
|
|
240
240
|
closeButton: ".btn-close"
|
|
241
241
|
};
|
|
242
242
|
class w extends n {
|
|
243
243
|
constructor() {
|
|
244
244
|
super(...arguments);
|
|
245
|
-
|
|
245
|
+
i(this, "selectors", structuredClone(P));
|
|
246
246
|
}
|
|
247
247
|
getComponentSelector() {
|
|
248
248
|
return this.selectors.rootComponent;
|
|
@@ -251,10 +251,10 @@ class w extends n {
|
|
|
251
251
|
return this.locatorRoot.locator(this.selectors.closeButton);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
class
|
|
254
|
+
class M extends n {
|
|
255
255
|
constructor() {
|
|
256
256
|
super(...arguments);
|
|
257
|
-
|
|
257
|
+
i(this, "selectors", {
|
|
258
258
|
item: ".accordion-item",
|
|
259
259
|
collapse: ".accordion-collapse",
|
|
260
260
|
body: ".accordion-body",
|
|
@@ -312,12 +312,12 @@ class E extends n {
|
|
|
312
312
|
}
|
|
313
313
|
async state() {
|
|
314
314
|
return await this.locatorRoot.evaluate((t) => {
|
|
315
|
-
const
|
|
316
|
-
for (const
|
|
317
|
-
const r =
|
|
318
|
-
|
|
319
|
-
classes:
|
|
320
|
-
id:
|
|
315
|
+
const e = [...t.querySelectorAll(".accordion-item")], c = [];
|
|
316
|
+
for (const l of e) {
|
|
317
|
+
const r = l.querySelector(".accordion-collapse"), o = l.querySelector(".accordion-button");
|
|
318
|
+
c.push({
|
|
319
|
+
classes: l.className.trim().split(" "),
|
|
320
|
+
id: l.id,
|
|
321
321
|
isInDOM: r !== null,
|
|
322
322
|
collapseId: r == null ? void 0 : r.id,
|
|
323
323
|
buttonId: o == null ? void 0 : o.id,
|
|
@@ -327,20 +327,109 @@ class E extends n {
|
|
|
327
327
|
buttonControls: o == null ? void 0 : o.getAttribute("aria-controls")
|
|
328
328
|
});
|
|
329
329
|
}
|
|
330
|
-
return { rootClasses: t.className.trim().split(" "), items:
|
|
330
|
+
return { rootClasses: t.className.trim().split(" "), items: c };
|
|
331
|
+
});
|
|
332
|
+
}
|
|
333
|
+
}
|
|
334
|
+
const B = {
|
|
335
|
+
rootComponent: '[role="progressbar"]',
|
|
336
|
+
outerBar: ".progress",
|
|
337
|
+
innerBar: ".progress-bar"
|
|
338
|
+
};
|
|
339
|
+
class V extends n {
|
|
340
|
+
constructor() {
|
|
341
|
+
super(...arguments);
|
|
342
|
+
i(this, "selectors", structuredClone(B));
|
|
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, r, o, h, u, d;
|
|
356
|
+
const e = 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 = e == null ? void 0 : e.textContent) == null ? void 0 : l.trim(),
|
|
364
|
+
innerClasses: ((h = (o = (r = e == null ? void 0 : e.className) == null ? void 0 : r.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 = e == null ? void 0 : e.style) == null ? void 0 : d.width
|
|
367
|
+
};
|
|
331
368
|
});
|
|
332
369
|
}
|
|
333
370
|
}
|
|
371
|
+
const f = {
|
|
372
|
+
rootComponent: ".au-slider",
|
|
373
|
+
clickableArea: ".au-slider-clickable-area",
|
|
374
|
+
handle: ".au-slider-handle",
|
|
375
|
+
minLabelHorizontal: ".au-slider-label-min",
|
|
376
|
+
maxLabelHorizontal: ".au-slider-label-max",
|
|
377
|
+
minLabelVertical: ".au-slider-label-vertical-min",
|
|
378
|
+
maxLabelVertical: ".au-slider-label-vertical-max",
|
|
379
|
+
sliderProgress: ".au-slider-progress"
|
|
380
|
+
};
|
|
381
|
+
class z extends n {
|
|
382
|
+
constructor() {
|
|
383
|
+
super(...arguments);
|
|
384
|
+
i(this, "selectors", structuredClone(f));
|
|
385
|
+
}
|
|
386
|
+
getComponentSelector() {
|
|
387
|
+
return this.selectors.rootComponent;
|
|
388
|
+
}
|
|
389
|
+
get locatorHandle() {
|
|
390
|
+
return this.locatorRoot.locator(this.selectors.handle);
|
|
391
|
+
}
|
|
392
|
+
get locatorMinLabelHorizontal() {
|
|
393
|
+
return this.locatorRoot.locator(this.selectors.minLabelHorizontal);
|
|
394
|
+
}
|
|
395
|
+
get locatorMaxLabelHorizontal() {
|
|
396
|
+
return this.locatorRoot.locator(this.selectors.maxLabelHorizontal);
|
|
397
|
+
}
|
|
398
|
+
get locatorMinLabelVertical() {
|
|
399
|
+
return this.locatorRoot.locator(this.selectors.minLabelVertical);
|
|
400
|
+
}
|
|
401
|
+
get locatorMaxLabelVertical() {
|
|
402
|
+
return this.locatorRoot.locator(this.selectors.maxLabelVertical);
|
|
403
|
+
}
|
|
404
|
+
async sliderHandleState() {
|
|
405
|
+
return this.locatorRoot.locator(this.selectors.handle).evaluateAll((t) => t.map((e) => ({
|
|
406
|
+
style: e.getAttribute("style"),
|
|
407
|
+
value: e.getAttribute("aria-valuenow"),
|
|
408
|
+
min: e.getAttribute("aria-valuemin"),
|
|
409
|
+
max: e.getAttribute("aria-valuemax"),
|
|
410
|
+
text: e.getAttribute("aria-valuetext"),
|
|
411
|
+
disabled: e.getAttribute("aria-disabled"),
|
|
412
|
+
readonly: e.getAttribute("aria-readonly")
|
|
413
|
+
})));
|
|
414
|
+
}
|
|
415
|
+
async sliderProgressState() {
|
|
416
|
+
return this.locatorRoot.locator(this.selectors.sliderProgress).evaluateAll((t) => t.map((e) => e.getAttribute("style")));
|
|
417
|
+
}
|
|
418
|
+
}
|
|
334
419
|
export {
|
|
335
|
-
|
|
420
|
+
M as AccordionPO,
|
|
336
421
|
w as AlertPO,
|
|
337
|
-
|
|
422
|
+
L as ModalPO,
|
|
338
423
|
q as PaginationPO,
|
|
339
|
-
|
|
340
|
-
O as
|
|
341
|
-
|
|
424
|
+
V as ProgressbarPO,
|
|
425
|
+
O as RatingPO,
|
|
426
|
+
k as SelectPO,
|
|
427
|
+
z as SliderPO,
|
|
428
|
+
P as alertSelectors,
|
|
342
429
|
y as modalSelectors,
|
|
343
|
-
|
|
430
|
+
v as paginationSelectors,
|
|
431
|
+
B as progressbarSelectors,
|
|
344
432
|
R as ratingSelectors,
|
|
345
|
-
S as selectSelectors
|
|
433
|
+
S as selectSelectors,
|
|
434
|
+
f as sliderSelectors
|
|
346
435
|
};
|
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.4"
|
|
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.4"
|
|
39
39
|
}
|