@agnos-ui/page-objects 0.3.0 → 0.4.0-next.0

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.js CHANGED
@@ -1 +1 @@
1
- "use strict";var O=Object.defineProperty;var L=(n,c,t)=>c in n?O(n,c,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[c]=t;var b=(n,c,t)=>(L(n,typeof c!="symbol"?c+"":c,t),t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@agnos-ui/base-po"),A={rootComponent:".modal",closeButton:".btn-close",backdrop:"xpath=./preceding-sibling::div[contains(@class,'modal-backdrop')]",header:".modal-header",title:".modal-title",body:".modal-body",footer:".modal-footer"};class H extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(A))}getComponentSelector(){return this.selectors.rootComponent}get locatorHeader(){return this.locatorRoot.locator(this.selectors.header)}get locatorTitle(){return this.locatorHeader.locator(this.selectors.title)}get locatorBody(){return this.locatorRoot.locator(this.selectors.body)}get locatorFooter(){return this.locatorRoot.locator(this.selectors.footer)}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}get locatorBackdrop(){return this.locatorRoot.locator(this.selectors.backdrop)}async state(){return this.locatorRoot.evaluate(async(t,e)=>{var i,u,m,g,h,d,y,S,x;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=(x=(S=t.querySelector(e.footer))==null?void 0:S.innerText)==null?void 0:x.trim();return{rootClasses:t.className.trim().split(" ").sort(),header:s,title:r,body:o,footer:l,closeButton:a}},this.selectors)}}const C={rootComponent:".au-pagination",activePage:".active",previousPage:".au-previous",nextPage:".au-next",firstPage:".au-first",lastPage:".au-last",pages:".au-page",ellipses:".au-ellipsis"};class T extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(C))}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:[]},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");i&&(o.first=l(i)),u&&(o.previous=l(u)),m&&(o.next=l(m)),g&&(o.last=l(g));for(const d of a)r.push(d.getAttribute("href")||""),s.push((d.textContent||"").trim());const h=[...t.querySelectorAll("a.au-page[aria-disabled]")];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})}}const P={rootComponent:".au-rating",star:".au-rating-star"};class M extends p.BasePO{constructor(){super(...arguments);b(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 a=[...t.querySelectorAll(e.star)],s=[],r=[];for(const o of a)s.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:s,classes:r}},this.selectors)}}const v={rootComponent:".au-select"};class I extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(v))}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,m;const e=t.querySelector('div[role="combobox"]'),a=t.querySelector('input[type="text"]'),s=[];if(e){const g=e.querySelectorAll("div.au-select-badge");for(const h of g)s.push((u=h==null?void 0:h.textContent)==null?void 0:u.trim())}const r=t.querySelector("ul.dropdown-menu"),o=r!=null,l=[],i=[];if(r!=null){const g=r.querySelectorAll("li.dropdown-item");for(const h of g){const d=(m=h.textContent)==null?void 0:m.trim();l.push(d),h.classList.contains("selected")&&i.push(d)}}return{text:a.value,badges:s,isOpen:o,list:l,checked:i}})}}const f={rootComponent:".alert",body:".alert-body",closeButton:".btn-close"};class w extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(f))}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 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");return{rootClasses:t.className.trim().split(" ").sort(),body:a,closeButton:s}},this.selectors)}}class V extends p.BasePO{constructor(){super(...arguments);b(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")],a=[];for(const s of e){const r=s.querySelector(".accordion-collapse"),o=s.querySelector(".accordion-button");a.push({classes:s.className.trim().split(" "),id:s.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:a}})}}const B={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class E extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(B))}getComponentSelector(){return this.selectors.rootComponent}get locatorOuterBar(){return this.locatorRoot.locator(this.selectors.outerBar)}get locatorInnerBar(){return this.locatorRoot.locator(this.selectors.innerBar)}async state(){return this.locatorRoot.evaluate(t=>{var s,r,o,l,i,u;const e=t.querySelector(".progress-bar"),a=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:(s=e==null?void 0:e.textContent)==null?void 0:s.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:(i=a==null?void 0:a.style)==null?void 0:i.height,innerWidth:(u=e==null?void 0:e.style)==null?void 0:u.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",valueLabel:".au-slider-label-now",progress:".au-slider-progress"};class D extends p.BasePO{constructor(){super(...arguments);b(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)}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 q={rootComponent:".toast",closeButton:".btn-close",header:".toast-header",body:".toast-body"};class k extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(q))}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,i;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");return{rootClasses:t.className.trim().split(" ").sort(),body:a,header:s,closeButton:r}},this.selectors)}}exports.AccordionPO=V;exports.AlertPO=w;exports.ModalPO=H;exports.PaginationPO=T;exports.ProgressbarPO=E;exports.RatingPO=M;exports.SelectPO=I;exports.SliderPO=D;exports.ToastPO=k;exports.alertSelectors=f;exports.modalSelectors=A;exports.paginationSelectors=C;exports.progressbarSelectors=B;exports.ratingSelectors=P;exports.selectSelectors=v;exports.sliderSelectors=R;exports.toastSelectors=q;
1
+ "use strict";var O=Object.defineProperty;var L=(n,c,t)=>c in n?O(n,c,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[c]=t;var b=(n,c,t)=>L(n,typeof c!="symbol"?c+"":c,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@agnos-ui/base-po"),A={rootComponent:".modal",closeButton:".btn-close",backdrop:"xpath=./preceding-sibling::div[contains(@class,'modal-backdrop')]",header:".modal-header",title:".modal-title",body:".modal-body",footer:".modal-footer"};class H extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(A))}getComponentSelector(){return this.selectors.rootComponent}get locatorHeader(){return this.locatorRoot.locator(this.selectors.header)}get locatorTitle(){return this.locatorHeader.locator(this.selectors.title)}get locatorBody(){return this.locatorRoot.locator(this.selectors.body)}get locatorFooter(){return this.locatorRoot.locator(this.selectors.footer)}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}get locatorBackdrop(){return this.locatorRoot.locator(this.selectors.backdrop)}async state(){return this.locatorRoot.evaluate(async(t,e)=>{var i,u,m,g,h,d,y,S,x;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=(x=(S=t.querySelector(e.footer))==null?void 0:S.innerText)==null?void 0:x.trim();return{rootClasses:t.className.trim().split(" ").sort(),header:s,title:r,body:o,footer:l,closeButton:a}},this.selectors)}}const C={rootComponent:".au-pagination",activePage:".active",previousPage:".au-previous",nextPage:".au-next",firstPage:".au-first",lastPage:".au-last",pages:".au-page",ellipses:".au-ellipsis"};class T extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(C))}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:[]},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");i&&(o.first=l(i)),u&&(o.previous=l(u)),m&&(o.next=l(m)),g&&(o.last=l(g));for(const d of a)r.push(d.getAttribute("href")||""),s.push((d.textContent||"").trim());const h=[...t.querySelectorAll("a.au-page[aria-disabled]")];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})}}const P={rootComponent:".au-rating",star:".au-rating-star"};class M extends p.BasePO{constructor(){super(...arguments);b(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 a=[...t.querySelectorAll(e.star)],s=[],r=[];for(const o of a)s.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:s,classes:r}},this.selectors)}}const v={rootComponent:".au-select"};class I extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(v))}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,m;const e=t.querySelector('div[role="combobox"]'),a=t.querySelector('input[type="text"]'),s=[];if(e){const g=e.querySelectorAll("div.au-select-badge");for(const h of g)s.push((u=h==null?void 0:h.textContent)==null?void 0:u.trim())}const r=t.querySelector("ul.dropdown-menu"),o=r!=null,l=[],i=[];if(r!=null){const g=r.querySelectorAll("li.dropdown-item");for(const h of g){const d=(m=h.textContent)==null?void 0:m.trim();l.push(d),h.classList.contains("selected")&&i.push(d)}}return{text:a.value,badges:s,isOpen:o,list:l,checked:i}})}}const f={rootComponent:".alert",body:".alert-body",closeButton:".btn-close"};class w extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(f))}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 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");return{rootClasses:t.className.trim().split(" ").sort(),body:a,closeButton:s}},this.selectors)}}class V extends p.BasePO{constructor(){super(...arguments);b(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")],a=[];for(const s of e){const r=s.querySelector(".accordion-collapse"),o=s.querySelector(".accordion-button");a.push({classes:s.className.trim().split(" "),id:s.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:a}})}}const B={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class E extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(B))}getComponentSelector(){return this.selectors.rootComponent}get locatorOuterBar(){return this.locatorRoot.locator(this.selectors.outerBar)}get locatorInnerBar(){return this.locatorRoot.locator(this.selectors.innerBar)}async state(){return this.locatorRoot.evaluate(t=>{var s,r,o,l,i,u;const e=t.querySelector(".progress-bar"),a=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:(s=e==null?void 0:e.textContent)==null?void 0:s.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:(i=a==null?void 0:a.style)==null?void 0:i.height,innerWidth:(u=e==null?void 0:e.style)==null?void 0:u.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",valueLabel:".au-slider-label-now",progress:".au-slider-progress"};class D extends p.BasePO{constructor(){super(...arguments);b(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)}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 q={rootComponent:".toast",closeButton:".btn-close",header:".toast-header",body:".toast-body"};class k extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(q))}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,i;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");return{rootClasses:t.className.trim().split(" ").sort(),body:a,header:s,closeButton:r}},this.selectors)}}exports.AccordionPO=V;exports.AlertPO=w;exports.ModalPO=H;exports.PaginationPO=T;exports.ProgressbarPO=E;exports.RatingPO=M;exports.SelectPO=I;exports.SliderPO=D;exports.ToastPO=k;exports.alertSelectors=f;exports.modalSelectors=A;exports.paginationSelectors=C;exports.progressbarSelectors=B;exports.ratingSelectors=P;exports.selectSelectors=v;exports.sliderSelectors=R;exports.toastSelectors=q;
@@ -1,6 +1,6 @@
1
1
  var C = Object.defineProperty;
2
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), t);
3
+ var b = (n, c, t) => S(n, typeof c != "symbol" ? c + "" : c, t);
4
4
  import { BasePO as p } from "@agnos-ui/base-po";
5
5
  const v = {
6
6
  // TODO: should we use bootstrap-independent classes starting with au- ?
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@agnos-ui/page-objects",
3
3
  "description": "Page objects to be used when testing AgnosUI-based applications with Playwright.",
4
- "version": "0.3.0",
4
+ "version": "0.4.0-next.0",
5
5
  "keywords": [
6
6
  "AgnosUI",
7
7
  "components",
@@ -66,10 +66,10 @@
66
66
  }
67
67
  },
68
68
  "dependencies": {
69
- "@agnos-ui/base-po": "0.3.0"
69
+ "@agnos-ui/base-po": "0.4.0-next.0"
70
70
  },
71
71
  "peerDependencies": {
72
- "@playwright/test": "*"
72
+ "@playwright/test": "^1.44.1"
73
73
  },
74
74
  "files": [
75
75
  "dist/lib"