@agnos-ui/page-objects 0.6.0-next.1 → 0.6.0-next.2
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/accordion.po.d.ts +45 -0
- package/alert.po.d.ts +21 -0
- package/index.cjs +1 -0
- package/index.js +535 -0
- package/modal.po.d.ts +37 -0
- package/package.json +21 -52
- package/pagination.po.d.ts +80 -0
- package/progressbar.po.d.ts +29 -0
- package/rating.po.d.ts +27 -0
- package/select.po.d.ts +41 -0
- package/slider.po.d.ts +45 -0
- package/toast.po.d.ts +24 -0
- package/tree.po.d.ts +26 -0
- package/lib/accordion.po.ts +0 -93
- package/lib/alert.po.ts +0 -34
- package/lib/modal.po.ts +0 -63
- package/lib/pagination.po.ts +0 -165
- package/lib/progressbar.po.ts +0 -53
- package/lib/rating.po.ts +0 -46
- package/lib/select.po.ts +0 -94
- package/lib/slider.po.ts +0 -73
- package/lib/toast.po.ts +0 -35
- package/lib/tree.po.ts +0 -46
- package/tsconfig.build.json +0 -10
- package/tsconfig.json +0 -9
- package/vite.config.ts +0 -17
- /package/{lib/index.ts → index.d.ts} +0 -0
|
@@ -0,0 +1,45 @@
|
|
|
1
|
+
import type { Locator } from '@playwright/test';
|
|
2
|
+
import { BasePO } from '@agnos-ui/base-po';
|
|
3
|
+
export declare class AccordionPO extends BasePO {
|
|
4
|
+
private readonly selectors;
|
|
5
|
+
getComponentSelector(): string;
|
|
6
|
+
/**
|
|
7
|
+
* Gets the locators of the items containing the header and the body-container inside
|
|
8
|
+
* the accordion
|
|
9
|
+
*/
|
|
10
|
+
get locatorAccordionItems(): Locator;
|
|
11
|
+
/**
|
|
12
|
+
* Gets the locators of the item specified by the itemIndex containing the header and the body-container inside
|
|
13
|
+
* the accordion
|
|
14
|
+
*/
|
|
15
|
+
locatorAccordionItem(itemIndex: number): Locator;
|
|
16
|
+
get locatorAccordionCBodyContainers(): Locator;
|
|
17
|
+
locatorAccordionBodyContainer(bodyContainerIndex: number): Locator;
|
|
18
|
+
/**
|
|
19
|
+
* Gets the locator of the bodies of the accordion.
|
|
20
|
+
*/
|
|
21
|
+
get locatorAccordionBodies(): Locator;
|
|
22
|
+
locatorAccordionBody(bodyIndex: number): Locator;
|
|
23
|
+
get locatorAccordionHeaders(): Locator;
|
|
24
|
+
locatorAccordionHeader(headerIndex: number): Locator;
|
|
25
|
+
/**
|
|
26
|
+
* Gets the locators of the buttons that handle the accordion, present in the accordion header.
|
|
27
|
+
* It does not get the locators of the buttons present in the body, added by the developer.
|
|
28
|
+
*/
|
|
29
|
+
get locatorAccordionButtons(): Locator;
|
|
30
|
+
locatorAccordionButton(buttonIndex: number): Locator;
|
|
31
|
+
state(): Promise<{
|
|
32
|
+
rootClasses: string[];
|
|
33
|
+
items: {
|
|
34
|
+
classes: string[];
|
|
35
|
+
id: string;
|
|
36
|
+
isInDOM: boolean;
|
|
37
|
+
bodyContainerId: string | undefined;
|
|
38
|
+
buttonId: string | undefined;
|
|
39
|
+
expanded: string | null | undefined;
|
|
40
|
+
disabled: string | null | undefined;
|
|
41
|
+
labeledBy: string | null | undefined;
|
|
42
|
+
buttonControls: string | null | undefined;
|
|
43
|
+
}[];
|
|
44
|
+
}>;
|
|
45
|
+
}
|
package/alert.po.d.ts
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { BasePO } from '@agnos-ui/base-po';
|
|
2
|
+
import type { Locator } from '@playwright/test';
|
|
3
|
+
export declare const alertSelectors: {
|
|
4
|
+
rootComponent: string;
|
|
5
|
+
body: string;
|
|
6
|
+
closeButton: string;
|
|
7
|
+
};
|
|
8
|
+
export declare class AlertPO extends BasePO {
|
|
9
|
+
selectors: {
|
|
10
|
+
rootComponent: string;
|
|
11
|
+
body: string;
|
|
12
|
+
closeButton: string;
|
|
13
|
+
};
|
|
14
|
+
getComponentSelector(): string;
|
|
15
|
+
get locatorCloseButton(): Locator;
|
|
16
|
+
state(): Promise<{
|
|
17
|
+
rootClasses: string[];
|
|
18
|
+
body: string | undefined;
|
|
19
|
+
closeButton: string | null | undefined;
|
|
20
|
+
}>;
|
|
21
|
+
}
|
package/index.cjs
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
"use strict";var T=Object.defineProperty;var L=(i,c,t)=>c in i?T(i,c,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[c]=t;var g=(i,c,t)=>L(i,typeof c!="symbol"?c+"":c,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const b=require("@agnos-ui/base-po"),C={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 H extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(C))}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)}async state(){return this.locatorRoot.evaluate((t,e)=>{var n,u,p,m,h,d,y,S,x;const s=(n=t.querySelector(e.closeButton))==null?void 0:n.getAttribute("aria-label"),a=(p=(u=t.querySelector(e.header))==null?void 0:u.innerText)==null?void 0:p.trim(),r=(h=(m=t.querySelector(e.title))==null?void 0:m.innerText)==null?void 0:h.trim(),o=(y=(d=t.querySelector(e.body))==null?void 0:d.innerText)==null?void 0:y.trim(),l=(x=(S=t.querySelector(e.footer))==null?void 0:S.innerText)==null?void 0:x.trim();return{rootClasses:t.className.trim().split(" ").sort(),header:a,title:r,body:o,footer:l,closeButton:s}},this.selectors)}}const A={rootComponent:".au-pagination",activePage:".active",previousPage:".au-previous",nextPage:".au-next",firstPage:".au-first",lastPage:".au-last",pages:".au-page",ellipses:".au-ellipsis"};class I extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(A))}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)}async state(){return this.locatorRoot.evaluate(t=>{const e={rootClasses:[],disabled:null,pages:[],hrefs:[]},s=[...t.querySelectorAll(".au-page")],a=[],r=[],o={},l=d=>d==null?void 0:d.getAttribute("href"),n=t.querySelector("a.au-first"),u=t.querySelector("a.au-previous"),p=t.querySelector("a.au-next"),m=t.querySelector("a.au-last");n&&(o.first=l(n)),u&&(o.previous=l(u)),p&&(o.next=l(p)),m&&(o.last=l(m));for(const d of s)r.push(d.getAttribute("href")||""),a.push((d.textContent||"").trim());const h=[...t.querySelectorAll("a.au-page[aria-disabled]")];return e.pages=a,e.hrefs=r,e.hrefsNavigation=o,e.rootClasses=t.className.trim().split(" "),e.disabled=h.length===s.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:p&&(e.isNextDisabled=!1),t.querySelector("a.au-first[aria-disabled]")?e.isFirstDisabled=!0:n&&(e.isFirstDisabled=!1),t.querySelector("a.au-last[aria-disabled]")?e.isLastDisabled=!0:m&&(e.isLastDisabled=!1),e})}}const P={rootComponent:".au-rating",star:".au-rating-star"};class M extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(P))}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 s=[...t.querySelectorAll(e.star)],a=[],r=[];for(const o of s)a.push((o.textContent||"").trim()),r.push(o.className.split(" "));return{rootClasses:t.className.trim().split(" ").sort(),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:a,classes:r}},this.selectors)}}const f={rootComponent:".au-select"};class w extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(f))}getComponentSelector(){return this.selectors.rootComponent}get locatorInput(){return this.locatorRoot.locator('input[type="text"]').nth(0)}get locatorMenu(){return this.locatorRoot.locator(".dropdown-menu")}get locatorMenuItems(){return this.locatorMenu.locator(".au-select-item")}locatorMenuItem(t){return this.locatorMenu.getByText(t).nth(0)}get locatorBadges(){return this.locatorRoot.locator("div.au-select-badge")}locatorBadgeItem(t){return this.locatorBadges.filter({hasText:t}).nth(0)}async state(){return await this.locatorRoot.evaluate(t=>{var u,p;const e=t.querySelector('div[role="combobox"]'),s=t.querySelector('input[type="text"]'),a=[];if(e){const m=e.querySelectorAll("div.au-select-badge");for(const h of m)a.push((u=h==null?void 0:h.textContent)==null?void 0:u.trim())}const r=t.querySelector("ul.dropdown-menu"),o=r!=null,l=[],n=[];if(r!=null){const m=r.querySelectorAll("li.dropdown-item");for(const h of m){const d=(p=h.textContent)==null?void 0:p.trim();l.push(d),h.classList.contains("selected")&&n.push(d)}}return{text:s.value,badges:a,isOpen:o,list:l,checked:n}})}}const v={rootComponent:".alert",body:".alert-body",closeButton:".btn-close"};class E extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(v))}getComponentSelector(){return this.selectors.rootComponent}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}async state(){return this.locatorRoot.evaluate((t,e)=>{var r,o,l;const s=(o=(r=t.querySelector(e.body))==null?void 0:r.innerText)==null?void 0:o.replace(/[^\x20-\x7E]/g,""),a=(l=t.querySelector(e.closeButton))==null?void 0:l.getAttribute("aria-label");return{rootClasses:t.className.trim().split(" ").sort(),body:s,closeButton:a}},this.selectors)}}class V extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",{item:".accordion-item",bodyContainer:".accordion-collapse",body:".accordion-body",header:".accordion-header",buttons:".accordion-button"})}getComponentSelector(){return".au-accordion"}get locatorAccordionItems(){return this.locatorRoot.locator(this.selectors.item)}locatorAccordionItem(t){return this.locatorRoot.locator(this.selectors.item).nth(t)}get locatorAccordionCBodyContainers(){return this.locatorAccordionItems.locator(this.selectors.bodyContainer)}locatorAccordionBodyContainer(t){return this.locatorAccordionItem(t).locator(this.selectors.bodyContainer)}get locatorAccordionBodies(){return this.locatorAccordionCBodyContainers.locator(this.selectors.body)}locatorAccordionBody(t){return this.locatorAccordionBodyContainer(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")],s=[];for(const a of e){const r=a.querySelector(".accordion-collapse"),o=a.querySelector(".accordion-button");s.push({classes:a.className.trim().split(" "),id:a.id,isInDOM:r!==null,bodyContainerId: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:s}})}}const R={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class D extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(R))}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 a,r,o,l,n,u;const e=t.querySelector(".progress-bar"),s=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:(a=e==null?void 0:e.textContent)==null?void 0:a.trim(),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())??[],outerHeight:(n=s==null?void 0:s.style)==null?void 0:n.height,innerWidth:(u=e==null?void 0:e.style)==null?void 0:u.width}})}}const B={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",valueLabel:".au-slider-label-now",progress:".au-slider-progress"};class k extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(B))}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)}get locatorProgress(){return this.locatorRoot.locator(this.selectors.progress)}get locatorValueLabel(){return this.locatorRoot.locator(this.selectors.valueLabel)}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"),disabled:e.getAttribute("aria-disabled"),readonly:e.getAttribute("aria-readonly"),ariaLabel:e.getAttribute("aria-label"),ariaValueText:e.getAttribute("aria-valuetext")})))}async sliderProgressState(){return this.locatorRoot.locator(this.selectors.progress).evaluateAll(t=>t.map(e=>e.getAttribute("style")))}}const O={rootComponent:".toast",closeButton:".btn-close",header:".toast-header",body:".toast-body"};class z extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(O))}getComponentSelector(){return this.selectors.rootComponent}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}async state(){return await this.locatorRoot.evaluate((t,e)=>{var o,l,n;const s=(o=t.querySelector(e.body))==null?void 0:o.innerText,a=(l=t.querySelector(e.header))==null?void 0:l.innerText,r=(n=t.querySelector(e.closeButton))==null?void 0:n.getAttribute("aria-label");return{rootClasses:t.className.trim().split(" ").sort(),body:s,header:a,closeButton:r}},this.selectors)}}const q={rootComponent:'[role="tree"]',itemContainer:'[role="treeitem"]',itemToggle:".au-tree-expand-icon",itemContents:".au-tree-item"};class F extends b.BasePO{constructor(){super(...arguments);g(this,"selectors",structuredClone(q))}getComponentSelector(){return this.selectors.rootComponent}get locatorItemToggle(){return this.locatorRoot.locator(this.selectors.itemToggle)}get locatorItemContainer(){return this.locatorRoot.locator(this.selectors.itemContents)}async itemContainerState(){return this.locatorRoot.locator(this.selectors.itemContainer).evaluateAll(t=>t.map(e=>({ariaSelected:e.getAttribute("aria-selected"),ariaExpanded:e.getAttribute("aria-expanded")})))}async itemToggleState(){return this.locatorRoot.locator(this.selectors.itemToggle).evaluateAll(t=>t.map(e=>({ariaLabel:e.getAttribute("aria-label")})))}}exports.AccordionPO=V;exports.AlertPO=E;exports.ModalPO=H;exports.PaginationPO=I;exports.ProgressbarPO=D;exports.RatingPO=M;exports.SelectPO=w;exports.SliderPO=k;exports.ToastPO=z;exports.TreePO=F;exports.alertSelectors=v;exports.modalSelectors=C;exports.paginationSelectors=A;exports.progressbarSelectors=R;exports.ratingSelectors=P;exports.selectSelectors=f;exports.sliderSelectors=B;exports.toastSelectors=O;exports.treeSelectors=q;
|
package/index.js
ADDED
|
@@ -0,0 +1,535 @@
|
|
|
1
|
+
var A = Object.defineProperty;
|
|
2
|
+
var S = (i, c, t) => c in i ? A(i, c, { enumerable: !0, configurable: !0, writable: !0, value: t }) : i[c] = t;
|
|
3
|
+
var g = (i, c, t) => S(i, typeof c != "symbol" ? c + "" : c, t);
|
|
4
|
+
import { BasePO as b } from "@agnos-ui/base-po";
|
|
5
|
+
const f = {
|
|
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 b {
|
|
16
|
+
constructor() {
|
|
17
|
+
super(...arguments);
|
|
18
|
+
g(this, "selectors", structuredClone(f));
|
|
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((t, e) => {
|
|
43
|
+
var n, u, p, m, h, d, y, x, C;
|
|
44
|
+
const s = (n = t.querySelector(e.closeButton)) == null ? void 0 : n.getAttribute("aria-label"), a = (p = (u = t.querySelector(e.header)) == null ? void 0 : u.innerText) == null ? void 0 : p.trim(), r = (h = (m = t.querySelector(e.title)) == null ? void 0 : m.innerText) == null ? void 0 : h.trim(), o = (y = (d = t.querySelector(e.body)) == null ? void 0 : d.innerText) == null ? void 0 : y.trim(), l = (C = (x = t.querySelector(e.footer)) == null ? void 0 : x.innerText) == null ? void 0 : C.trim();
|
|
45
|
+
return {
|
|
46
|
+
rootClasses: t.className.trim().split(" ").sort(),
|
|
47
|
+
header: a,
|
|
48
|
+
title: r,
|
|
49
|
+
body: o,
|
|
50
|
+
footer: l,
|
|
51
|
+
closeButton: s
|
|
52
|
+
};
|
|
53
|
+
}, this.selectors);
|
|
54
|
+
}
|
|
55
|
+
}
|
|
56
|
+
const v = {
|
|
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 b {
|
|
67
|
+
constructor() {
|
|
68
|
+
super(...arguments);
|
|
69
|
+
g(this, "selectors", structuredClone(v));
|
|
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: [] }, s = [...t.querySelectorAll(".au-page")], a = [], r = [], o = {}, l = (d) => d == null ? void 0 : d.getAttribute("href"), n = t.querySelector("a.au-first"), u = t.querySelector("a.au-previous"), p = t.querySelector("a.au-next"), m = t.querySelector("a.au-last");
|
|
132
|
+
n && (o.first = l(n)), u && (o.previous = l(u)), p && (o.next = l(p)), m && (o.last = l(m));
|
|
133
|
+
for (const d of s)
|
|
134
|
+
r.push(d.getAttribute("href") || ""), a.push((d.textContent || "").trim());
|
|
135
|
+
const h = [...t.querySelectorAll("a.au-page[aria-disabled]")];
|
|
136
|
+
return e.pages = a, e.hrefs = r, e.hrefsNavigation = o, e.rootClasses = t.className.trim().split(" "), e.disabled = h.length === s.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 : p && (e.isNextDisabled = !1), t.querySelector("a.au-first[aria-disabled]") ? e.isFirstDisabled = !0 : n && (e.isFirstDisabled = !1), t.querySelector("a.au-last[aria-disabled]") ? e.isLastDisabled = !0 : m && (e.isLastDisabled = !1), e;
|
|
137
|
+
});
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
const R = {
|
|
141
|
+
rootComponent: ".au-rating",
|
|
142
|
+
star: ".au-rating-star"
|
|
143
|
+
};
|
|
144
|
+
class E extends b {
|
|
145
|
+
constructor() {
|
|
146
|
+
super(...arguments);
|
|
147
|
+
g(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 s = [...t.querySelectorAll(e.star)], a = [], r = [];
|
|
161
|
+
for (const o of s)
|
|
162
|
+
a.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: a,
|
|
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 b {
|
|
182
|
+
constructor() {
|
|
183
|
+
super(...arguments);
|
|
184
|
+
g(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, p;
|
|
228
|
+
const e = t.querySelector('div[role="combobox"]'), s = t.querySelector('input[type="text"]'), a = [];
|
|
229
|
+
if (e) {
|
|
230
|
+
const m = e.querySelectorAll("div.au-select-badge");
|
|
231
|
+
for (const h of m)
|
|
232
|
+
a.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 = [], n = [];
|
|
235
|
+
if (r != null) {
|
|
236
|
+
const m = r.querySelectorAll("li.dropdown-item");
|
|
237
|
+
for (const h of m) {
|
|
238
|
+
const d = (p = h.textContent) == null ? void 0 : p.trim();
|
|
239
|
+
l.push(d), h.classList.contains("selected") && n.push(d);
|
|
240
|
+
}
|
|
241
|
+
}
|
|
242
|
+
return {
|
|
243
|
+
text: s.value,
|
|
244
|
+
badges: a,
|
|
245
|
+
isOpen: o,
|
|
246
|
+
list: l,
|
|
247
|
+
checked: n
|
|
248
|
+
};
|
|
249
|
+
});
|
|
250
|
+
}
|
|
251
|
+
}
|
|
252
|
+
const P = {
|
|
253
|
+
rootComponent: ".alert",
|
|
254
|
+
body: ".alert-body",
|
|
255
|
+
closeButton: ".btn-close"
|
|
256
|
+
};
|
|
257
|
+
class D extends b {
|
|
258
|
+
constructor() {
|
|
259
|
+
super(...arguments);
|
|
260
|
+
g(this, "selectors", structuredClone(P));
|
|
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 s = (o = (r = t.querySelector(e.body)) == null ? void 0 : r.innerText) == null ? void 0 : o.replace(/[^\x20-\x7E]/g, ""), a = (l = t.querySelector(e.closeButton)) == null ? void 0 : l.getAttribute("aria-label");
|
|
272
|
+
return {
|
|
273
|
+
rootClasses: t.className.trim().split(" ").sort(),
|
|
274
|
+
body: s,
|
|
275
|
+
closeButton: a
|
|
276
|
+
};
|
|
277
|
+
}, this.selectors);
|
|
278
|
+
}
|
|
279
|
+
}
|
|
280
|
+
class k extends b {
|
|
281
|
+
constructor() {
|
|
282
|
+
super(...arguments);
|
|
283
|
+
g(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")], s = [];
|
|
342
|
+
for (const a of e) {
|
|
343
|
+
const r = a.querySelector(".accordion-collapse"), o = a.querySelector(".accordion-button");
|
|
344
|
+
s.push({
|
|
345
|
+
classes: a.className.trim().split(" "),
|
|
346
|
+
id: a.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: s };
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
}
|
|
360
|
+
const q = {
|
|
361
|
+
rootComponent: '[role="progressbar"]',
|
|
362
|
+
outerBar: ".progress",
|
|
363
|
+
innerBar: ".progress-bar"
|
|
364
|
+
};
|
|
365
|
+
class z extends b {
|
|
366
|
+
constructor() {
|
|
367
|
+
super(...arguments);
|
|
368
|
+
g(this, "selectors", structuredClone(q));
|
|
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 a, r, o, l, n, u;
|
|
382
|
+
const e = t.querySelector(".progress-bar"), s = 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: (a = e == null ? void 0 : e.textContent) == null ? void 0 : a.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: (n = s == null ? void 0 : s.style) == null ? void 0 : n.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 F extends b {
|
|
409
|
+
constructor() {
|
|
410
|
+
super(...arguments);
|
|
411
|
+
g(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 T = {
|
|
454
|
+
rootComponent: ".toast",
|
|
455
|
+
closeButton: ".btn-close",
|
|
456
|
+
header: ".toast-header",
|
|
457
|
+
body: ".toast-body"
|
|
458
|
+
};
|
|
459
|
+
class W extends b {
|
|
460
|
+
constructor() {
|
|
461
|
+
super(...arguments);
|
|
462
|
+
g(this, "selectors", structuredClone(T));
|
|
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, n;
|
|
473
|
+
const s = (o = t.querySelector(e.body)) == null ? void 0 : o.innerText, a = (l = t.querySelector(e.header)) == null ? void 0 : l.innerText, r = (n = t.querySelector(e.closeButton)) == null ? void 0 : n.getAttribute("aria-label");
|
|
474
|
+
return {
|
|
475
|
+
rootClasses: t.className.trim().split(" ").sort(),
|
|
476
|
+
body: s,
|
|
477
|
+
header: a,
|
|
478
|
+
closeButton: r
|
|
479
|
+
};
|
|
480
|
+
}, this.selectors);
|
|
481
|
+
}
|
|
482
|
+
}
|
|
483
|
+
const H = {
|
|
484
|
+
rootComponent: '[role="tree"]',
|
|
485
|
+
itemContainer: '[role="treeitem"]',
|
|
486
|
+
itemToggle: ".au-tree-expand-icon",
|
|
487
|
+
itemContents: ".au-tree-item"
|
|
488
|
+
};
|
|
489
|
+
class j extends b {
|
|
490
|
+
constructor() {
|
|
491
|
+
super(...arguments);
|
|
492
|
+
g(this, "selectors", structuredClone(H));
|
|
493
|
+
}
|
|
494
|
+
getComponentSelector() {
|
|
495
|
+
return this.selectors.rootComponent;
|
|
496
|
+
}
|
|
497
|
+
get locatorItemToggle() {
|
|
498
|
+
return this.locatorRoot.locator(this.selectors.itemToggle);
|
|
499
|
+
}
|
|
500
|
+
get locatorItemContainer() {
|
|
501
|
+
return this.locatorRoot.locator(this.selectors.itemContents);
|
|
502
|
+
}
|
|
503
|
+
async itemContainerState() {
|
|
504
|
+
return this.locatorRoot.locator(this.selectors.itemContainer).evaluateAll((t) => t.map((e) => ({
|
|
505
|
+
ariaSelected: e.getAttribute("aria-selected"),
|
|
506
|
+
ariaExpanded: e.getAttribute("aria-expanded")
|
|
507
|
+
})));
|
|
508
|
+
}
|
|
509
|
+
async itemToggleState() {
|
|
510
|
+
return this.locatorRoot.locator(this.selectors.itemToggle).evaluateAll((t) => t.map((e) => ({
|
|
511
|
+
ariaLabel: e.getAttribute("aria-label")
|
|
512
|
+
})));
|
|
513
|
+
}
|
|
514
|
+
}
|
|
515
|
+
export {
|
|
516
|
+
k as AccordionPO,
|
|
517
|
+
D as AlertPO,
|
|
518
|
+
w as ModalPO,
|
|
519
|
+
M as PaginationPO,
|
|
520
|
+
z as ProgressbarPO,
|
|
521
|
+
E as RatingPO,
|
|
522
|
+
V as SelectPO,
|
|
523
|
+
F as SliderPO,
|
|
524
|
+
W as ToastPO,
|
|
525
|
+
j as TreePO,
|
|
526
|
+
P as alertSelectors,
|
|
527
|
+
f as modalSelectors,
|
|
528
|
+
v as paginationSelectors,
|
|
529
|
+
q as progressbarSelectors,
|
|
530
|
+
R as ratingSelectors,
|
|
531
|
+
B as selectSelectors,
|
|
532
|
+
L as sliderSelectors,
|
|
533
|
+
T as toastSelectors,
|
|
534
|
+
H as treeSelectors
|
|
535
|
+
};
|
package/modal.po.d.ts
ADDED
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import type { Locator } from '@playwright/test';
|
|
2
|
+
import { BasePO } from '@agnos-ui/base-po';
|
|
3
|
+
export declare const modalSelectors: {
|
|
4
|
+
rootComponent: string;
|
|
5
|
+
closeButton: string;
|
|
6
|
+
backdrop: string;
|
|
7
|
+
header: string;
|
|
8
|
+
title: string;
|
|
9
|
+
body: string;
|
|
10
|
+
footer: string;
|
|
11
|
+
};
|
|
12
|
+
export declare class ModalPO extends BasePO {
|
|
13
|
+
selectors: {
|
|
14
|
+
rootComponent: string;
|
|
15
|
+
closeButton: string;
|
|
16
|
+
backdrop: string;
|
|
17
|
+
header: string;
|
|
18
|
+
title: string;
|
|
19
|
+
body: string;
|
|
20
|
+
footer: string;
|
|
21
|
+
};
|
|
22
|
+
getComponentSelector(): string;
|
|
23
|
+
get locatorHeader(): Locator;
|
|
24
|
+
get locatorTitle(): Locator;
|
|
25
|
+
get locatorBody(): Locator;
|
|
26
|
+
get locatorFooter(): Locator;
|
|
27
|
+
get locatorCloseButton(): Locator;
|
|
28
|
+
get locatorBackdrop(): Locator;
|
|
29
|
+
state(): Promise<{
|
|
30
|
+
rootClasses: string[];
|
|
31
|
+
header: string | undefined;
|
|
32
|
+
title: string | undefined;
|
|
33
|
+
body: string | undefined;
|
|
34
|
+
footer: string | undefined;
|
|
35
|
+
closeButton: string | null | undefined;
|
|
36
|
+
}>;
|
|
37
|
+
}
|