@agnos-ui/page-objects 0.4.0-next.0 → 0.4.0-next.1
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/.eslintrc.json +3 -0
- package/lib/accordion.po.ts +93 -0
- package/lib/alert.po.ts +34 -0
- package/lib/index.ts +9 -0
- package/lib/modal.po.ts +63 -0
- package/lib/pagination.po.ts +157 -0
- package/lib/progressbar.po.ts +53 -0
- package/lib/rating.po.ts +46 -0
- package/lib/select.po.ts +94 -0
- package/lib/slider.po.ts +73 -0
- package/lib/toast.po.ts +35 -0
- package/package.json +24 -36
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +8 -0
- package/vite.config.ts +17 -0
- package/dist/lib/index.d.ts +0 -358
- package/dist/lib/index.js +0 -1
- package/dist/lib/index.mjs +0 -501
package/dist/lib/index.mjs
DELETED
|
@@ -1,501 +0,0 @@
|
|
|
1
|
-
var C = Object.defineProperty;
|
|
2
|
-
var S = (n, c, t) => c in n ? C(n, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : n[c] = t;
|
|
3
|
-
var b = (n, c, t) => S(n, typeof c != "symbol" ? c + "" : c, t);
|
|
4
|
-
import { BasePO as p } from "@agnos-ui/base-po";
|
|
5
|
-
const v = {
|
|
6
|
-
// TODO: should we use bootstrap-independent classes starting with au- ?
|
|
7
|
-
rootComponent: ".modal",
|
|
8
|
-
closeButton: ".btn-close",
|
|
9
|
-
backdrop: "xpath=./preceding-sibling::div[contains(@class,'modal-backdrop')]",
|
|
10
|
-
header: ".modal-header",
|
|
11
|
-
title: ".modal-title",
|
|
12
|
-
body: ".modal-body",
|
|
13
|
-
footer: ".modal-footer"
|
|
14
|
-
};
|
|
15
|
-
class w extends p {
|
|
16
|
-
constructor() {
|
|
17
|
-
super(...arguments);
|
|
18
|
-
b(this, "selectors", structuredClone(v));
|
|
19
|
-
}
|
|
20
|
-
getComponentSelector() {
|
|
21
|
-
return this.selectors.rootComponent;
|
|
22
|
-
}
|
|
23
|
-
get locatorHeader() {
|
|
24
|
-
return this.locatorRoot.locator(this.selectors.header);
|
|
25
|
-
}
|
|
26
|
-
get locatorTitle() {
|
|
27
|
-
return this.locatorHeader.locator(this.selectors.title);
|
|
28
|
-
}
|
|
29
|
-
get locatorBody() {
|
|
30
|
-
return this.locatorRoot.locator(this.selectors.body);
|
|
31
|
-
}
|
|
32
|
-
get locatorFooter() {
|
|
33
|
-
return this.locatorRoot.locator(this.selectors.footer);
|
|
34
|
-
}
|
|
35
|
-
get locatorCloseButton() {
|
|
36
|
-
return this.locatorRoot.locator(this.selectors.closeButton);
|
|
37
|
-
}
|
|
38
|
-
get locatorBackdrop() {
|
|
39
|
-
return this.locatorRoot.locator(this.selectors.backdrop);
|
|
40
|
-
}
|
|
41
|
-
async state() {
|
|
42
|
-
return this.locatorRoot.evaluate(async (t, e) => {
|
|
43
|
-
var i, u, m, g, h, d, y, x, A;
|
|
44
|
-
const a = (i = t.querySelector(e.closeButton)) == null ? void 0 : i.getAttribute("aria-label"), s = (m = (u = t.querySelector(e.header)) == null ? void 0 : u.innerText) == null ? void 0 : m.trim(), r = (h = (g = t.querySelector(e.title)) == null ? void 0 : g.innerText) == null ? void 0 : h.trim(), o = (y = (d = t.querySelector(e.body)) == null ? void 0 : d.innerText) == null ? void 0 : y.trim(), l = (A = (x = t.querySelector(e.footer)) == null ? void 0 : x.innerText) == null ? void 0 : A.trim();
|
|
45
|
-
return {
|
|
46
|
-
rootClasses: t.className.trim().split(" ").sort(),
|
|
47
|
-
header: s,
|
|
48
|
-
title: r,
|
|
49
|
-
body: o,
|
|
50
|
-
footer: l,
|
|
51
|
-
closeButton: a
|
|
52
|
-
};
|
|
53
|
-
}, this.selectors);
|
|
54
|
-
}
|
|
55
|
-
}
|
|
56
|
-
const f = {
|
|
57
|
-
rootComponent: ".au-pagination",
|
|
58
|
-
activePage: ".active",
|
|
59
|
-
previousPage: ".au-previous",
|
|
60
|
-
nextPage: ".au-next",
|
|
61
|
-
firstPage: ".au-first",
|
|
62
|
-
lastPage: ".au-last",
|
|
63
|
-
pages: ".au-page",
|
|
64
|
-
ellipses: ".au-ellipsis"
|
|
65
|
-
};
|
|
66
|
-
class M extends p {
|
|
67
|
-
constructor() {
|
|
68
|
-
super(...arguments);
|
|
69
|
-
b(this, "selectors", structuredClone(f));
|
|
70
|
-
}
|
|
71
|
-
// TODO should we add this in the list of selector ?
|
|
72
|
-
// Depend on the setSelectors usage...
|
|
73
|
-
getComponentSelector() {
|
|
74
|
-
return this.selectors.rootComponent;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Gets the locator of the button is the current page in the pagination component.
|
|
78
|
-
*/
|
|
79
|
-
get locatorActivePage() {
|
|
80
|
-
return this.locatorRoot.locator(this.selectors.activePage);
|
|
81
|
-
}
|
|
82
|
-
/**
|
|
83
|
-
* Gets the locator of the button that once clicked moves to the previous page in the pagination component.
|
|
84
|
-
*/
|
|
85
|
-
get locatorPreviousButton() {
|
|
86
|
-
return this.locatorRoot.locator(this.selectors.previousPage);
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* Gets the locator of the button that once clicked moves to the next page in the pagination component.
|
|
90
|
-
*/
|
|
91
|
-
get locatorNextButton() {
|
|
92
|
-
return this.locatorRoot.locator(this.selectors.nextPage);
|
|
93
|
-
}
|
|
94
|
-
/**
|
|
95
|
-
* Gets the locator of the button that once clicked moves to the first page in the pagination component.
|
|
96
|
-
*/
|
|
97
|
-
get locatorFirstButton() {
|
|
98
|
-
return this.locatorRoot.locator(this.selectors.firstPage);
|
|
99
|
-
}
|
|
100
|
-
/**
|
|
101
|
-
* Gets the locator of the button that once clicked moves to the last page in the pagination component.
|
|
102
|
-
*/
|
|
103
|
-
get locatorLastButton() {
|
|
104
|
-
return this.locatorRoot.locator(this.selectors.lastPage);
|
|
105
|
-
}
|
|
106
|
-
/**
|
|
107
|
-
* Gets the locators of the pages
|
|
108
|
-
*/
|
|
109
|
-
get locatorPages() {
|
|
110
|
-
return this.locatorRoot.locator(this.selectors.pages);
|
|
111
|
-
}
|
|
112
|
-
/**
|
|
113
|
-
* Gets the locator of a page button in the pagination component given his position.
|
|
114
|
-
* @param pageNumber - The number of the page in the pagination object.
|
|
115
|
-
*/
|
|
116
|
-
locatorNthPage(t) {
|
|
117
|
-
return this.locatorRoot.locator(this.selectors.pages).nth(t - 1);
|
|
118
|
-
}
|
|
119
|
-
/**
|
|
120
|
-
* Gets the locator of a page button in the pagination component given a string.
|
|
121
|
-
* @param pageString - The string of the page in the pagination object.
|
|
122
|
-
*/
|
|
123
|
-
locatorPage(t) {
|
|
124
|
-
return this.locatorRoot.locator(this.selectors.pages, { hasText: t });
|
|
125
|
-
}
|
|
126
|
-
get locatorEllipses() {
|
|
127
|
-
return this.locatorRoot.locator(this.selectors.ellipses);
|
|
128
|
-
}
|
|
129
|
-
async state() {
|
|
130
|
-
return this.locatorRoot.evaluate((t) => {
|
|
131
|
-
const e = { rootClasses: [], disabled: null, pages: [], hrefs: [] }, a = [...t.querySelectorAll(".au-page")], s = [], r = [], o = {}, l = (d) => d == null ? void 0 : d.getAttribute("href"), i = t.querySelector("a.au-first"), u = t.querySelector("a.au-previous"), m = t.querySelector("a.au-next"), g = t.querySelector("a.au-last");
|
|
132
|
-
i && (o.first = l(i)), u && (o.previous = l(u)), m && (o.next = l(m)), g && (o.last = l(g));
|
|
133
|
-
for (const d of a)
|
|
134
|
-
r.push(d.getAttribute("href") || ""), s.push((d.textContent || "").trim());
|
|
135
|
-
const h = [...t.querySelectorAll("a.au-page[aria-disabled]")];
|
|
136
|
-
return e.pages = s, e.hrefs = r, e.hrefsNavigation = o, e.rootClasses = t.className.trim().split(" "), e.disabled = h.length === a.length ? "true" : null, t.querySelector("a.au-previous[aria-disabled]") ? e.isPreviousDisabled = !0 : u && (e.isPreviousDisabled = !1), t.querySelector("a.au-next[aria-disabled]") ? e.isNextDisabled = !0 : m && (e.isNextDisabled = !1), t.querySelector("a.au-first[aria-disabled]") ? e.isFirstDisabled = !0 : i && (e.isFirstDisabled = !1), t.querySelector("a.au-last[aria-disabled]") ? e.isLastDisabled = !0 : g && (e.isLastDisabled = !1), e;
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
}
|
|
140
|
-
const R = {
|
|
141
|
-
rootComponent: ".au-rating",
|
|
142
|
-
star: ".au-rating-star"
|
|
143
|
-
};
|
|
144
|
-
class O extends p {
|
|
145
|
-
constructor() {
|
|
146
|
-
super(...arguments);
|
|
147
|
-
b(this, "selectors", structuredClone(R));
|
|
148
|
-
}
|
|
149
|
-
getComponentSelector() {
|
|
150
|
-
return this.selectors.rootComponent;
|
|
151
|
-
}
|
|
152
|
-
/**
|
|
153
|
-
* Get the main title locator of the feature page
|
|
154
|
-
*/
|
|
155
|
-
locatorStar(t) {
|
|
156
|
-
return this.locatorRoot.locator(this.selectors.star).nth(t);
|
|
157
|
-
}
|
|
158
|
-
async state() {
|
|
159
|
-
return await this.locatorRoot.evaluate((t, e) => {
|
|
160
|
-
const a = [...t.querySelectorAll(e.star)], s = [], r = [];
|
|
161
|
-
for (const o of a)
|
|
162
|
-
s.push((o.textContent || "").trim()), r.push(o.className.split(" "));
|
|
163
|
-
return {
|
|
164
|
-
rootClasses: t.className.trim().split(" ").sort(),
|
|
165
|
-
value: t.getAttribute("aria-valuenow"),
|
|
166
|
-
min: t.getAttribute("aria-valuemin"),
|
|
167
|
-
max: t.getAttribute("aria-valuemax"),
|
|
168
|
-
text: t.getAttribute("aria-valuetext"),
|
|
169
|
-
disabled: t.getAttribute("aria-disabled"),
|
|
170
|
-
readonly: t.getAttribute("aria-readonly"),
|
|
171
|
-
stars: s,
|
|
172
|
-
classes: r
|
|
173
|
-
};
|
|
174
|
-
}, this.selectors);
|
|
175
|
-
}
|
|
176
|
-
}
|
|
177
|
-
const B = {
|
|
178
|
-
rootComponent: ".au-select"
|
|
179
|
-
// TODO add selector list
|
|
180
|
-
};
|
|
181
|
-
class V extends p {
|
|
182
|
-
constructor() {
|
|
183
|
-
super(...arguments);
|
|
184
|
-
b(this, "selectors", structuredClone(B));
|
|
185
|
-
}
|
|
186
|
-
getComponentSelector() {
|
|
187
|
-
return this.selectors.rootComponent;
|
|
188
|
-
}
|
|
189
|
-
/**
|
|
190
|
-
* Get the main title locator of the feature page
|
|
191
|
-
*/
|
|
192
|
-
get locatorInput() {
|
|
193
|
-
return this.locatorRoot.locator('input[type="text"]').nth(0);
|
|
194
|
-
}
|
|
195
|
-
/**
|
|
196
|
-
* Menu container
|
|
197
|
-
*/
|
|
198
|
-
get locatorMenu() {
|
|
199
|
-
return this.locatorRoot.locator(".dropdown-menu");
|
|
200
|
-
}
|
|
201
|
-
/**
|
|
202
|
-
* Return the first menu item locator including the text
|
|
203
|
-
*/
|
|
204
|
-
get locatorMenuItems() {
|
|
205
|
-
return this.locatorMenu.locator(".au-select-item");
|
|
206
|
-
}
|
|
207
|
-
/**
|
|
208
|
-
* Return the first menu item locator including the text
|
|
209
|
-
*/
|
|
210
|
-
locatorMenuItem(t) {
|
|
211
|
-
return this.locatorMenu.getByText(t).nth(0);
|
|
212
|
-
}
|
|
213
|
-
/**
|
|
214
|
-
* Bages container
|
|
215
|
-
*/
|
|
216
|
-
get locatorBadges() {
|
|
217
|
-
return this.locatorRoot.locator("div.au-select-badge");
|
|
218
|
-
}
|
|
219
|
-
/**
|
|
220
|
-
* Return the first badge locator including the text
|
|
221
|
-
*/
|
|
222
|
-
locatorBadgeItem(t) {
|
|
223
|
-
return this.locatorBadges.filter({ hasText: t }).nth(0);
|
|
224
|
-
}
|
|
225
|
-
async state() {
|
|
226
|
-
return await this.locatorRoot.evaluate((t) => {
|
|
227
|
-
var u, m;
|
|
228
|
-
const e = t.querySelector('div[role="combobox"]'), a = t.querySelector('input[type="text"]'), s = [];
|
|
229
|
-
if (e) {
|
|
230
|
-
const g = e.querySelectorAll("div.au-select-badge");
|
|
231
|
-
for (const h of g)
|
|
232
|
-
s.push((u = h == null ? void 0 : h.textContent) == null ? void 0 : u.trim());
|
|
233
|
-
}
|
|
234
|
-
const r = t.querySelector("ul.dropdown-menu"), o = r != null, l = [], i = [];
|
|
235
|
-
if (r != null) {
|
|
236
|
-
const g = r.querySelectorAll("li.dropdown-item");
|
|
237
|
-
for (const h of g) {
|
|
238
|
-
const d = (m = h.textContent) == null ? void 0 : m.trim();
|
|
239
|
-
l.push(d), h.classList.contains("selected") && i.push(d);
|
|
240
|
-
}
|
|
241
|
-
}
|
|
242
|
-
return {
|
|
243
|
-
text: a.value,
|
|
244
|
-
badges: s,
|
|
245
|
-
isOpen: o,
|
|
246
|
-
list: l,
|
|
247
|
-
checked: i
|
|
248
|
-
};
|
|
249
|
-
});
|
|
250
|
-
}
|
|
251
|
-
}
|
|
252
|
-
const q = {
|
|
253
|
-
rootComponent: ".alert",
|
|
254
|
-
body: ".alert-body",
|
|
255
|
-
closeButton: ".btn-close"
|
|
256
|
-
};
|
|
257
|
-
class E extends p {
|
|
258
|
-
constructor() {
|
|
259
|
-
super(...arguments);
|
|
260
|
-
b(this, "selectors", structuredClone(q));
|
|
261
|
-
}
|
|
262
|
-
getComponentSelector() {
|
|
263
|
-
return this.selectors.rootComponent;
|
|
264
|
-
}
|
|
265
|
-
get locatorCloseButton() {
|
|
266
|
-
return this.locatorRoot.locator(this.selectors.closeButton);
|
|
267
|
-
}
|
|
268
|
-
async state() {
|
|
269
|
-
return this.locatorRoot.evaluate((t, e) => {
|
|
270
|
-
var r, o, l;
|
|
271
|
-
const a = (o = (r = t.querySelector(e.body)) == null ? void 0 : r.innerText) == null ? void 0 : o.replace(/[^\x20-\x7E]/g, ""), s = (l = t.querySelector(e.closeButton)) == null ? void 0 : l.getAttribute("aria-label");
|
|
272
|
-
return {
|
|
273
|
-
rootClasses: t.className.trim().split(" ").sort(),
|
|
274
|
-
body: a,
|
|
275
|
-
closeButton: s
|
|
276
|
-
};
|
|
277
|
-
}, this.selectors);
|
|
278
|
-
}
|
|
279
|
-
}
|
|
280
|
-
class D extends p {
|
|
281
|
-
constructor() {
|
|
282
|
-
super(...arguments);
|
|
283
|
-
b(this, "selectors", {
|
|
284
|
-
item: ".accordion-item",
|
|
285
|
-
bodyContainer: ".accordion-collapse",
|
|
286
|
-
body: ".accordion-body",
|
|
287
|
-
header: ".accordion-header",
|
|
288
|
-
buttons: ".accordion-button"
|
|
289
|
-
});
|
|
290
|
-
}
|
|
291
|
-
getComponentSelector() {
|
|
292
|
-
return ".au-accordion";
|
|
293
|
-
}
|
|
294
|
-
/**
|
|
295
|
-
* Gets the locators of the items containing the header and the body-container inside
|
|
296
|
-
* the accordion
|
|
297
|
-
*/
|
|
298
|
-
get locatorAccordionItems() {
|
|
299
|
-
return this.locatorRoot.locator(this.selectors.item);
|
|
300
|
-
}
|
|
301
|
-
/**
|
|
302
|
-
* Gets the locators of the item specified by the itemIndex containing the header and the body-container inside
|
|
303
|
-
* the accordion
|
|
304
|
-
*/
|
|
305
|
-
locatorAccordionItem(t) {
|
|
306
|
-
return this.locatorRoot.locator(this.selectors.item).nth(t);
|
|
307
|
-
}
|
|
308
|
-
get locatorAccordionCBodyContainers() {
|
|
309
|
-
return this.locatorAccordionItems.locator(this.selectors.bodyContainer);
|
|
310
|
-
}
|
|
311
|
-
locatorAccordionBodyContainer(t) {
|
|
312
|
-
return this.locatorAccordionItem(t).locator(this.selectors.bodyContainer);
|
|
313
|
-
}
|
|
314
|
-
/**
|
|
315
|
-
* Gets the locator of the bodies of the accordion.
|
|
316
|
-
*/
|
|
317
|
-
get locatorAccordionBodies() {
|
|
318
|
-
return this.locatorAccordionCBodyContainers.locator(this.selectors.body);
|
|
319
|
-
}
|
|
320
|
-
locatorAccordionBody(t) {
|
|
321
|
-
return this.locatorAccordionBodyContainer(t).locator(this.selectors.body);
|
|
322
|
-
}
|
|
323
|
-
get locatorAccordionHeaders() {
|
|
324
|
-
return this.locatorAccordionItems.locator(this.selectors.header);
|
|
325
|
-
}
|
|
326
|
-
locatorAccordionHeader(t) {
|
|
327
|
-
return this.locatorAccordionItem(t).locator(this.selectors.header);
|
|
328
|
-
}
|
|
329
|
-
/**
|
|
330
|
-
* Gets the locators of the buttons that handle the accordion, present in the accordion header.
|
|
331
|
-
* It does not get the locators of the buttons present in the body, added by the developer.
|
|
332
|
-
*/
|
|
333
|
-
get locatorAccordionButtons() {
|
|
334
|
-
return this.locatorAccordionHeaders.locator(this.selectors.buttons);
|
|
335
|
-
}
|
|
336
|
-
locatorAccordionButton(t) {
|
|
337
|
-
return this.locatorAccordionHeader(t).locator(this.selectors.buttons);
|
|
338
|
-
}
|
|
339
|
-
async state() {
|
|
340
|
-
return await this.locatorRoot.evaluate((t) => {
|
|
341
|
-
const e = [...t.querySelectorAll(".accordion-item")], a = [];
|
|
342
|
-
for (const s of e) {
|
|
343
|
-
const r = s.querySelector(".accordion-collapse"), o = s.querySelector(".accordion-button");
|
|
344
|
-
a.push({
|
|
345
|
-
classes: s.className.trim().split(" "),
|
|
346
|
-
id: s.id,
|
|
347
|
-
isInDOM: r !== null,
|
|
348
|
-
bodyContainerId: r == null ? void 0 : r.id,
|
|
349
|
-
buttonId: o == null ? void 0 : o.id,
|
|
350
|
-
expanded: o == null ? void 0 : o.getAttribute("aria-expanded"),
|
|
351
|
-
disabled: o == null ? void 0 : o.getAttribute("aria-disabled"),
|
|
352
|
-
labeledBy: r == null ? void 0 : r.getAttribute("aria-labelledby"),
|
|
353
|
-
buttonControls: o == null ? void 0 : o.getAttribute("aria-controls")
|
|
354
|
-
});
|
|
355
|
-
}
|
|
356
|
-
return { rootClasses: t.className.trim().split(" "), items: a };
|
|
357
|
-
});
|
|
358
|
-
}
|
|
359
|
-
}
|
|
360
|
-
const P = {
|
|
361
|
-
rootComponent: '[role="progressbar"]',
|
|
362
|
-
outerBar: ".progress",
|
|
363
|
-
innerBar: ".progress-bar"
|
|
364
|
-
};
|
|
365
|
-
class k extends p {
|
|
366
|
-
constructor() {
|
|
367
|
-
super(...arguments);
|
|
368
|
-
b(this, "selectors", structuredClone(P));
|
|
369
|
-
}
|
|
370
|
-
getComponentSelector() {
|
|
371
|
-
return this.selectors.rootComponent;
|
|
372
|
-
}
|
|
373
|
-
get locatorOuterBar() {
|
|
374
|
-
return this.locatorRoot.locator(this.selectors.outerBar);
|
|
375
|
-
}
|
|
376
|
-
get locatorInnerBar() {
|
|
377
|
-
return this.locatorRoot.locator(this.selectors.innerBar);
|
|
378
|
-
}
|
|
379
|
-
async state() {
|
|
380
|
-
return this.locatorRoot.evaluate((t) => {
|
|
381
|
-
var s, r, o, l, i, u;
|
|
382
|
-
const e = t.querySelector(".progress-bar"), a = t.querySelector(".progress");
|
|
383
|
-
return {
|
|
384
|
-
ariaLabel: t.getAttribute("aria-label"),
|
|
385
|
-
ariaValueNow: t.getAttribute("aria-valuenow"),
|
|
386
|
-
ariaValueMin: t.getAttribute("aria-valuemin"),
|
|
387
|
-
ariaValueMax: t.getAttribute("aria-valuemax"),
|
|
388
|
-
ariaValueText: t.getAttribute("aria-valuetext"),
|
|
389
|
-
label: (s = e == null ? void 0 : e.textContent) == null ? void 0 : s.trim(),
|
|
390
|
-
innerClasses: ((l = (o = (r = e == null ? void 0 : e.className) == null ? void 0 : r.trim()) == null ? void 0 : o.split(" ")) == null ? void 0 : l.sort()) ?? [],
|
|
391
|
-
outerHeight: (i = a == null ? void 0 : a.style) == null ? void 0 : i.height,
|
|
392
|
-
innerWidth: (u = e == null ? void 0 : e.style) == null ? void 0 : u.width
|
|
393
|
-
};
|
|
394
|
-
});
|
|
395
|
-
}
|
|
396
|
-
}
|
|
397
|
-
const L = {
|
|
398
|
-
rootComponent: ".au-slider",
|
|
399
|
-
clickableArea: ".au-slider-clickable-area",
|
|
400
|
-
handle: ".au-slider-handle",
|
|
401
|
-
minLabelHorizontal: ".au-slider-label-min",
|
|
402
|
-
maxLabelHorizontal: ".au-slider-label-max",
|
|
403
|
-
minLabelVertical: ".au-slider-label-vertical-min",
|
|
404
|
-
maxLabelVertical: ".au-slider-label-vertical-max",
|
|
405
|
-
valueLabel: ".au-slider-label-now",
|
|
406
|
-
progress: ".au-slider-progress"
|
|
407
|
-
};
|
|
408
|
-
class z extends p {
|
|
409
|
-
constructor() {
|
|
410
|
-
super(...arguments);
|
|
411
|
-
b(this, "selectors", structuredClone(L));
|
|
412
|
-
}
|
|
413
|
-
getComponentSelector() {
|
|
414
|
-
return this.selectors.rootComponent;
|
|
415
|
-
}
|
|
416
|
-
get locatorHandle() {
|
|
417
|
-
return this.locatorRoot.locator(this.selectors.handle);
|
|
418
|
-
}
|
|
419
|
-
get locatorMinLabelHorizontal() {
|
|
420
|
-
return this.locatorRoot.locator(this.selectors.minLabelHorizontal);
|
|
421
|
-
}
|
|
422
|
-
get locatorMaxLabelHorizontal() {
|
|
423
|
-
return this.locatorRoot.locator(this.selectors.maxLabelHorizontal);
|
|
424
|
-
}
|
|
425
|
-
get locatorMinLabelVertical() {
|
|
426
|
-
return this.locatorRoot.locator(this.selectors.minLabelVertical);
|
|
427
|
-
}
|
|
428
|
-
get locatorMaxLabelVertical() {
|
|
429
|
-
return this.locatorRoot.locator(this.selectors.maxLabelVertical);
|
|
430
|
-
}
|
|
431
|
-
get locatorProgress() {
|
|
432
|
-
return this.locatorRoot.locator(this.selectors.progress);
|
|
433
|
-
}
|
|
434
|
-
get locatorValueLabel() {
|
|
435
|
-
return this.locatorRoot.locator(this.selectors.valueLabel);
|
|
436
|
-
}
|
|
437
|
-
async sliderHandleState() {
|
|
438
|
-
return this.locatorRoot.locator(this.selectors.handle).evaluateAll((t) => t.map((e) => ({
|
|
439
|
-
style: e.getAttribute("style"),
|
|
440
|
-
value: e.getAttribute("aria-valuenow"),
|
|
441
|
-
min: e.getAttribute("aria-valuemin"),
|
|
442
|
-
max: e.getAttribute("aria-valuemax"),
|
|
443
|
-
disabled: e.getAttribute("aria-disabled"),
|
|
444
|
-
readonly: e.getAttribute("aria-readonly"),
|
|
445
|
-
ariaLabel: e.getAttribute("aria-label"),
|
|
446
|
-
ariaValueText: e.getAttribute("aria-valuetext")
|
|
447
|
-
})));
|
|
448
|
-
}
|
|
449
|
-
async sliderProgressState() {
|
|
450
|
-
return this.locatorRoot.locator(this.selectors.progress).evaluateAll((t) => t.map((e) => e.getAttribute("style")));
|
|
451
|
-
}
|
|
452
|
-
}
|
|
453
|
-
const H = {
|
|
454
|
-
rootComponent: ".toast",
|
|
455
|
-
closeButton: ".btn-close",
|
|
456
|
-
header: ".toast-header",
|
|
457
|
-
body: ".toast-body"
|
|
458
|
-
};
|
|
459
|
-
class F extends p {
|
|
460
|
-
constructor() {
|
|
461
|
-
super(...arguments);
|
|
462
|
-
b(this, "selectors", structuredClone(H));
|
|
463
|
-
}
|
|
464
|
-
getComponentSelector() {
|
|
465
|
-
return this.selectors.rootComponent;
|
|
466
|
-
}
|
|
467
|
-
get locatorCloseButton() {
|
|
468
|
-
return this.locatorRoot.locator(this.selectors.closeButton);
|
|
469
|
-
}
|
|
470
|
-
async state() {
|
|
471
|
-
return await this.locatorRoot.evaluate((t, e) => {
|
|
472
|
-
var o, l, i;
|
|
473
|
-
const a = (o = t.querySelector(e.body)) == null ? void 0 : o.innerText, s = (l = t.querySelector(e.header)) == null ? void 0 : l.innerText, r = (i = t.querySelector(e.closeButton)) == null ? void 0 : i.getAttribute("aria-label");
|
|
474
|
-
return {
|
|
475
|
-
rootClasses: t.className.trim().split(" ").sort(),
|
|
476
|
-
body: a,
|
|
477
|
-
header: s,
|
|
478
|
-
closeButton: r
|
|
479
|
-
};
|
|
480
|
-
}, this.selectors);
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
export {
|
|
484
|
-
D as AccordionPO,
|
|
485
|
-
E as AlertPO,
|
|
486
|
-
w as ModalPO,
|
|
487
|
-
M as PaginationPO,
|
|
488
|
-
k as ProgressbarPO,
|
|
489
|
-
O as RatingPO,
|
|
490
|
-
V as SelectPO,
|
|
491
|
-
z as SliderPO,
|
|
492
|
-
F as ToastPO,
|
|
493
|
-
q as alertSelectors,
|
|
494
|
-
v as modalSelectors,
|
|
495
|
-
f as paginationSelectors,
|
|
496
|
-
P as progressbarSelectors,
|
|
497
|
-
R as ratingSelectors,
|
|
498
|
-
B as selectSelectors,
|
|
499
|
-
L as sliderSelectors,
|
|
500
|
-
H as toastSelectors
|
|
501
|
-
};
|