@agnos-ui/page-objects 0.0.1-alpha.3 → 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 +40 -0
- package/dist/lib/index.js +1 -1
- package/dist/lib/index.mjs +106 -56
- package/package.json +2 -2
package/dist/lib/index.d.ts
CHANGED
|
@@ -240,6 +240,46 @@ export declare const selectSelectors: {
|
|
|
240
240
|
rootComponent: string;
|
|
241
241
|
};
|
|
242
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
|
+
|
|
243
283
|
export declare interface State {
|
|
244
284
|
ariaLabel: string | null;
|
|
245
285
|
ariaValueNow: string | null;
|
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,7 +1,7 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
import { BasePO as
|
|
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
|
+
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- ?
|
|
7
7
|
rootComponent: ".modal",
|
|
@@ -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 q extends i {
|
|
|
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",
|
|
@@ -49,10 +49,10 @@ const R = {
|
|
|
49
49
|
pages: ".au-page",
|
|
50
50
|
ellipses: ".au-ellipsis"
|
|
51
51
|
};
|
|
52
|
-
class
|
|
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...
|
|
@@ -113,14 +113,14 @@ class O extends i {
|
|
|
113
113
|
return this.locatorRoot.locator(this.selectors.ellipses);
|
|
114
114
|
}
|
|
115
115
|
}
|
|
116
|
-
const
|
|
116
|
+
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 w extends i {
|
|
|
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 c = [...t.querySelectorAll(
|
|
137
|
+
return await this.locatorRoot.evaluate((t, e) => {
|
|
138
|
+
const c = [...t.querySelectorAll(e.star)], l = [], r = [];
|
|
139
139
|
for (const o of c)
|
|
140
|
-
l.push((o.textContent || "").trim()),
|
|
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"),
|
|
@@ -147,7 +147,7 @@ class w extends i {
|
|
|
147
147
|
disabled: t.getAttribute("aria-disabled"),
|
|
148
148
|
readonly: t.getAttribute("aria-readonly"),
|
|
149
149
|
stars: l,
|
|
150
|
-
classes:
|
|
150
|
+
classes: r
|
|
151
151
|
};
|
|
152
152
|
}, this.selectors);
|
|
153
153
|
}
|
|
@@ -156,10 +156,10 @@ const S = {
|
|
|
156
156
|
rootComponent: ".au-select"
|
|
157
157
|
// TODO add selector list
|
|
158
158
|
};
|
|
159
|
-
class k extends
|
|
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;
|
|
@@ -205,44 +205,44 @@ class k extends i {
|
|
|
205
205
|
async state() {
|
|
206
206
|
return await this.locatorRoot.evaluate((t) => {
|
|
207
207
|
var d;
|
|
208
|
-
const
|
|
208
|
+
const e = t.querySelector(".input-group"), c = t.querySelector("div.input-group-text"), l = e.querySelector("input"), r = [];
|
|
209
209
|
if (c) {
|
|
210
210
|
const b = c.querySelectorAll("div.badge");
|
|
211
211
|
for (const g of b) {
|
|
212
|
-
const
|
|
213
|
-
|
|
212
|
+
const m = [...g.children];
|
|
213
|
+
r.push([...m.map((p) => (p.textContent ?? "").trim())]);
|
|
214
214
|
}
|
|
215
215
|
}
|
|
216
216
|
const o = t.querySelector("ul.dropdown-menu"), h = o != null, u = [];
|
|
217
217
|
if (o != null) {
|
|
218
218
|
const b = o.querySelectorAll("li.dropdown-item");
|
|
219
219
|
for (const g of b) {
|
|
220
|
-
let
|
|
221
|
-
const
|
|
222
|
-
|
|
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
223
|
text: (d = g.textContent) == null ? void 0 : d.trim(),
|
|
224
|
-
hasCheckBox:
|
|
225
|
-
isChecked:
|
|
224
|
+
hasCheckBox: m,
|
|
225
|
+
isChecked: p
|
|
226
226
|
});
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
return {
|
|
230
230
|
text: l.value,
|
|
231
|
-
badges:
|
|
231
|
+
badges: r,
|
|
232
232
|
isOpen: h,
|
|
233
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
|
-
class
|
|
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 H extends i {
|
|
|
251
251
|
return this.locatorRoot.locator(this.selectors.closeButton);
|
|
252
252
|
}
|
|
253
253
|
}
|
|
254
|
-
class M extends
|
|
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,18 +312,18 @@ class M extends i {
|
|
|
312
312
|
}
|
|
313
313
|
async state() {
|
|
314
314
|
return await this.locatorRoot.evaluate((t) => {
|
|
315
|
-
const
|
|
316
|
-
for (const l of
|
|
317
|
-
const
|
|
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
318
|
c.push({
|
|
319
319
|
classes: l.className.trim().split(" "),
|
|
320
320
|
id: l.id,
|
|
321
|
-
isInDOM:
|
|
322
|
-
collapseId:
|
|
321
|
+
isInDOM: r !== null,
|
|
322
|
+
collapseId: r == null ? void 0 : r.id,
|
|
323
323
|
buttonId: o == null ? void 0 : o.id,
|
|
324
324
|
expanded: o == null ? void 0 : o.getAttribute("aria-expanded"),
|
|
325
325
|
disabled: o == null ? void 0 : o.getAttribute("aria-disabled"),
|
|
326
|
-
labeledBy:
|
|
326
|
+
labeledBy: r == null ? void 0 : r.getAttribute("aria-labelledby"),
|
|
327
327
|
buttonControls: o == null ? void 0 : o.getAttribute("aria-controls")
|
|
328
328
|
});
|
|
329
329
|
}
|
|
@@ -331,15 +331,15 @@ class M extends i {
|
|
|
331
331
|
});
|
|
332
332
|
}
|
|
333
333
|
}
|
|
334
|
-
const
|
|
334
|
+
const B = {
|
|
335
335
|
rootComponent: '[role="progressbar"]',
|
|
336
336
|
outerBar: ".progress",
|
|
337
337
|
innerBar: ".progress-bar"
|
|
338
338
|
};
|
|
339
|
-
class
|
|
339
|
+
class V extends n {
|
|
340
340
|
constructor() {
|
|
341
341
|
super(...arguments);
|
|
342
|
-
|
|
342
|
+
i(this, "selectors", structuredClone(B));
|
|
343
343
|
}
|
|
344
344
|
getComponentSelector() {
|
|
345
345
|
return this.selectors.rootComponent;
|
|
@@ -352,34 +352,84 @@ class E extends i {
|
|
|
352
352
|
}
|
|
353
353
|
async state() {
|
|
354
354
|
return this.locatorRoot.evaluate((t) => {
|
|
355
|
-
var l,
|
|
356
|
-
const
|
|
355
|
+
var l, r, o, h, u, d;
|
|
356
|
+
const e = t.querySelector(".progress-bar"), c = t.querySelector(".progress");
|
|
357
357
|
return {
|
|
358
358
|
ariaLabel: t.getAttribute("aria-label"),
|
|
359
359
|
ariaValueNow: t.getAttribute("aria-valuenow"),
|
|
360
360
|
ariaValueMin: t.getAttribute("aria-valuemin"),
|
|
361
361
|
ariaValueMax: t.getAttribute("aria-valuemax"),
|
|
362
362
|
ariaValueText: t.getAttribute("aria-valuetext"),
|
|
363
|
-
label: (l =
|
|
364
|
-
innerClasses: ((h = (o = (
|
|
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
365
|
outerHeight: (u = c == null ? void 0 : c.style) == null ? void 0 : u.height,
|
|
366
|
-
innerWidth: (d =
|
|
366
|
+
innerWidth: (d = e == null ? void 0 : e.style) == null ? void 0 : d.width
|
|
367
367
|
};
|
|
368
368
|
});
|
|
369
369
|
}
|
|
370
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
|
+
}
|
|
371
419
|
export {
|
|
372
420
|
M as AccordionPO,
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
421
|
+
w as AlertPO,
|
|
422
|
+
L as ModalPO,
|
|
423
|
+
q as PaginationPO,
|
|
424
|
+
V as ProgressbarPO,
|
|
425
|
+
O as RatingPO,
|
|
378
426
|
k as SelectPO,
|
|
379
|
-
|
|
427
|
+
z as SliderPO,
|
|
428
|
+
P as alertSelectors,
|
|
380
429
|
y as modalSelectors,
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
S as selectSelectors
|
|
430
|
+
v as paginationSelectors,
|
|
431
|
+
B as progressbarSelectors,
|
|
432
|
+
R as ratingSelectors,
|
|
433
|
+
S as selectSelectors,
|
|
434
|
+
f as sliderSelectors
|
|
385
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
|
}
|