@agnos-ui/page-objects 0.9.0 → 0.9.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/index.cjs CHANGED
@@ -1 +1 @@
1
- "use strict";var w=Object.defineProperty;var H=(c,l,t)=>l in c?w(c,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[l]=t;var u=(c,l,t)=>H(c,typeof l!="symbol"?l+"":l,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=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 M extends d.BasePO{constructor(){super(...arguments);u(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((t,e)=>{var n,h,p,b,m,g,C,S,x;const s=(n=t.querySelector(e.closeButton))==null?void 0:n.getAttribute("aria-label"),a=(p=(h=t.querySelector(e.header))==null?void 0:h.innerText)==null?void 0:p.trim(),r=(m=(b=t.querySelector(e.title))==null?void 0:b.innerText)==null?void 0:m.trim(),o=(C=(g=t.querySelector(e.body))==null?void 0:g.innerText)==null?void 0:C.trim(),i=(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:i,closeButton:s}},this.selectors)}}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 V extends d.BasePO{constructor(){super(...arguments);u(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)}async state(){return this.locatorRoot.evaluate(t=>{const e={rootClasses:[],disabled:null,pages:[],hrefs:[]},s=[...t.querySelectorAll(".au-page")],a=[],r=[],o={},i=g=>g==null?void 0:g.getAttribute("href"),n=t.querySelector("a.au-first"),h=t.querySelector("a.au-previous"),p=t.querySelector("a.au-next"),b=t.querySelector("a.au-last");n&&(o.first=i(n)),h&&(o.previous=i(h)),p&&(o.next=i(p)),b&&(o.last=i(b));for(const g of s)r.push(g.getAttribute("href")||""),a.push((g.textContent||"").trim());const m=[...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=m.length===s.length?"true":null,t.querySelector("a.au-previous[aria-disabled]")?e.isPreviousDisabled=!0:h&&(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:b&&(e.isLastDisabled=!1),e})}}const B={rootComponent:".au-rating",star:".au-rating-star"};class E extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(B))}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 R={rootComponent:".au-select"};class D extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(R))}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 h,p;const e=t.querySelector('div[role="combobox"]'),s=t.querySelector('input[type="text"]'),a=[];if(e){const b=e.querySelectorAll("div.au-select-badge");for(const m of b)a.push((h=m==null?void 0:m.textContent)==null?void 0:h.trim())}const r=t.querySelector("ul.dropdown-menu"),o=r!=null,i=[],n=[];if(r!=null){const b=r.querySelectorAll("li.dropdown-item");for(const m of b){const g=(p=m.textContent)==null?void 0:p.trim();i.push(g),m.classList.contains("selected")&&n.push(g)}}return{text:s.value,badges:a,isOpen:o,list:i,checked:n}})}}const v={rootComponent:".alert",body:".alert-body",closeButton:".btn-close"};class z extends d.BasePO{constructor(){super(...arguments);u(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,i;const s=(o=(r=t.querySelector(e.body))==null?void 0:r.innerText)==null?void 0:o.replace(/[^\x20-\x7E]/g,""),a=(i=t.querySelector(e.closeButton))==null?void 0:i.getAttribute("aria-label");return{rootClasses:t.className.trim().split(" ").sort(),body:s,closeButton:a}},this.selectors)}}class F extends d.BasePO{constructor(){super(...arguments);u(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 f={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class _ extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(f))}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,i,n,h;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:((i=(o=(r=e==null?void 0:e.className)==null?void 0:r.trim())==null?void 0:o.split(" "))==null?void 0:i.sort())??[],outerHeight:(n=s==null?void 0:s.style)==null?void 0:n.height,innerWidth:(h=e==null?void 0:e.style)==null?void 0:h.width}})}}const O={rootComponent:".au-slider",clickableArea:".au-slider-clickable-area",handle:".au-slider-handle",tick:".au-slider-tick",tickLabel:".au-slider-tick-label",tickLabelVertical:".au-slider-tick-label-vertical",tickLabelNow:".au-slider-tick-label-now",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 j extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(O))}getComponentSelector(){return this.selectors.rootComponent}get locatorHandle(){return this.locatorRoot.locator(this.selectors.handle)}get locatorTick(){return this.locatorRoot.locator(this.selectors.tick)}get locatorTickLabel(){return this.locatorRoot.locator(this.selectors.tickLabel)}get locatorTickLabelNow(){return this.locatorRoot.locator(this.selectors.tickLabelNow)}get locatorTickLabelVertical(){return this.locatorRoot.locator(this.selectors.tickLabelVertical)}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")))}async sliderTickLabelState(t){return t.evaluateAll(e=>e.map(s=>({style:s.getAttribute("style"),innerText:s.innerText})))}}const y={rootComponent:".toast",closeButton:".btn-close",header:".toast-header",body:".toast-body"};class q extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(y))}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,i,n;const s=(o=t.querySelector(e.body))==null?void 0:o.innerText,a=(i=t.querySelector(e.header))==null?void 0:i.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 L={rootComponent:".au-toaster",container:".au-toaster-container",closeButton:".au-toaster-closeAll"};class W extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(L))}getComponentSelector(){return this.selectors.rootComponent}get locatorContainer(){return this.locatorRoot.locator(this.selectors.container)}async toastPOs(){return Array.from({length:await this.locatorContainer.locator(y.rootComponent).count()},(t,e)=>new q(this.locatorContainer,e))}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}}const T={rootComponent:'[role="tree"]',itemContainer:'[role="treeitem"]',itemToggle:".au-tree-expand-icon",itemContents:".au-tree-item"};class G extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(T))}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")})))}}const k={rootComponent:".au-collapse"};class J extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(k))}getComponentSelector(){return this.selectors.rootComponent}async state(){return this.locatorRoot.evaluate((t,e)=>({rootClasses:t.className.trim().split(" ").sort()}),this.selectors)}}const I={rootComponent:".au-carousel",container:".au-carousel-container",slide:".au-carousel-slide",nextBtn:".carousel-control-next",prevBtn:".carousel-control-prev",indicators:".carousel-indicators",indicatorBtn:".carousel-indicators button"};class K extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(I))}getComponentSelector(){return this.selectors.rootComponent}get locatorContainer(){return this.locatorRoot.locator(this.selectors.container)}get locatorNextBtn(){return this.locatorRoot.locator(this.selectors.nextBtn)}get locatorPrevBtn(){return this.locatorRoot.locator(this.selectors.prevBtn)}get locatorIndicators(){return this.locatorRoot.locator(this.selectors.indicators)}get locatorIndicatorBtn(){return this.locatorRoot.locator(this.selectors.indicatorBtn)}get locatorSlide(){return this.locatorRoot.locator(this.selectors.slide)}async state(){return this.locatorRoot.evaluate(t=>{const e=t.querySelectorAll(".carousel-indicators button");return{rootClasses:t.className.trim().split(" ").sort(),prevBtn:t.querySelector(".carousel-control-prev")!==null,nextBtn:t.querySelector(".carousel-control-next")!==null,indicators:{selected:[...e].findIndex(s=>s.classList.contains("active")),count:e.length},slides:{visible:[...t.querySelectorAll(".au-carousel-slide")].findIndex(s=>{const a=s.getBoundingClientRect(),r=t.getBoundingClientRect();return a.left>=r.left&&a.right<=r.right})}}})}}exports.AccordionPO=F;exports.AlertPO=z;exports.CarouselPO=K;exports.CollapsePO=J;exports.ModalPO=M;exports.PaginationPO=V;exports.ProgressbarPO=_;exports.RatingPO=E;exports.SelectPO=D;exports.SliderPO=j;exports.ToastPO=q;exports.ToasterPO=W;exports.TreePO=G;exports.alertSelectors=v;exports.carouselSelectors=I;exports.collapseSelectors=k;exports.modalSelectors=A;exports.paginationSelectors=P;exports.progressbarSelectors=f;exports.ratingSelectors=B;exports.selectSelectors=R;exports.sliderSelectors=O;exports.toastSelectors=y;exports.toasterSelectors=L;exports.treeSelectors=T;
1
+ "use strict";var w=Object.defineProperty;var V=(c,l,t)=>l in c?w(c,l,{enumerable:!0,configurable:!0,writable:!0,value:t}):c[l]=t;var u=(c,l,t)=>V(c,typeof l!="symbol"?l+"":l,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const d=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 d.BasePO{constructor(){super(...arguments);u(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((t,e)=>{var n,h,p,m,b,g,y,S,x;const s=(n=t.querySelector(e.closeButton))==null?void 0:n.getAttribute("aria-label"),a=(p=(h=t.querySelector(e.header))==null?void 0:h.innerText)==null?void 0:p.trim(),r=(b=(m=t.querySelector(e.title))==null?void 0:m.innerText)==null?void 0:b.trim(),o=(y=(g=t.querySelector(e.body))==null?void 0:g.innerText)==null?void 0:y.trim(),i=(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:i,closeButton:s}},this.selectors)}}const R={rootComponent:".au-pagination",activePage:".active",previousPage:".au-previous",nextPage:".au-next",firstPage:".au-first",lastPage:".au-last",pages:".au-page",ellipses:".au-ellipsis"};class M extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(R))}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={},i=g=>g==null?void 0:g.getAttribute("href"),n=t.querySelector("a.au-first"),h=t.querySelector("a.au-previous"),p=t.querySelector("a.au-next"),m=t.querySelector("a.au-last");n&&(o.first=i(n)),h&&(o.previous=i(h)),p&&(o.next=i(p)),m&&(o.last=i(m));for(const g of s)r.push(g.getAttribute("href")||""),a.push((g.textContent||"").trim());const b=[...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=b.length===s.length?"true":null,t.querySelector("a.au-previous[aria-disabled]")?e.isPreviousDisabled=!0:h&&(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 E extends d.BasePO{constructor(){super(...arguments);u(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 v={rootComponent:".au-select"};class D extends d.BasePO{constructor(){super(...arguments);u(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 h,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 b of m)a.push((h=b==null?void 0:b.textContent)==null?void 0:h.trim())}const r=t.querySelector("ul.dropdown-menu"),o=r!=null,i=[],n=[];if(r!=null){const m=r.querySelectorAll("li.dropdown-item");for(const b of m){const g=(p=b.textContent)==null?void 0:p.trim();i.push(g),b.classList.contains("selected")&&n.push(g)}}return{text:s.value,badges:a,isOpen:o,list:i,checked:n}})}}const B={rootComponent:".alert",body:".alert-body",closeButton:".btn-close"};class z extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(B))}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,i;const s=(o=(r=t.querySelector(e.body))==null?void 0:r.innerText)==null?void 0:o.replace(/[^\x20-\x7E]/g,""),a=(i=t.querySelector(e.closeButton))==null?void 0:i.getAttribute("aria-label");return{rootClasses:t.className.trim().split(" ").sort(),body:s,closeButton:a}},this.selectors)}}class F extends d.BasePO{constructor(){super(...arguments);u(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 f={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class _ extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(f))}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,i,n,h;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:((i=(o=(r=e==null?void 0:e.className)==null?void 0:r.trim())==null?void 0:o.split(" "))==null?void 0:i.sort())??[],outerHeight:(n=s==null?void 0:s.style)==null?void 0:n.height,innerWidth:(h=e==null?void 0:e.style)==null?void 0:h.width}})}}const O={rootComponent:".au-slider",clickableArea:".au-slider-clickable-area",clickableAreaVertical:".au-slider-clickable-area-vertical",handle:".au-slider-handle",tick:".au-slider-tick",tickLabel:".au-slider-tick-label",tickLabelVertical:".au-slider-tick-label-vertical",tickLabelNow:".au-slider-tick-label-now",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",content:".au-slider-content"};class j extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(O))}getComponentSelector(){return this.selectors.rootComponent}get clickableArea(){return this.locatorRoot.locator(this.selectors.clickableArea)}get clickableAreaVertical(){return this.locatorRoot.locator(this.selectors.clickableAreaVertical)}get locatorHandle(){return this.locatorRoot.locator(this.selectors.handle)}get locatorTick(){return this.locatorRoot.locator(this.selectors.tick)}get locatorTickLabel(){return this.locatorRoot.locator(this.selectors.tickLabel)}get locatorTickLabelNow(){return this.locatorRoot.locator(this.selectors.tickLabelNow)}get locatorTickLabelVertical(){return this.locatorRoot.locator(this.selectors.tickLabelVertical)}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)}get locatorContent(){return this.locatorRoot.locator(this.selectors.content)}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")))}async sliderTickLabelState(t){return t.evaluateAll(e=>e.map(s=>({style:s.getAttribute("style"),innerText:s.innerText})))}}const C={rootComponent:".toast",closeButton:".btn-close",header:".toast-header",body:".toast-body"};class q extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(C))}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,i,n;const s=(o=t.querySelector(e.body))==null?void 0:o.innerText,a=(i=t.querySelector(e.header))==null?void 0:i.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 L={rootComponent:".au-toaster",container:".au-toaster-container",closeButton:".au-toaster-closeAll"};class W extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(L))}getComponentSelector(){return this.selectors.rootComponent}get locatorContainer(){return this.locatorRoot.locator(this.selectors.container)}async toastPOs(){return Array.from({length:await this.locatorContainer.locator(C.rootComponent).count()},(t,e)=>new q(this.locatorContainer,e))}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}}const T={rootComponent:'[role="tree"]',itemContainer:'[role="treeitem"]',itemToggle:".au-tree-expand-icon",itemContents:".au-tree-item"};class G extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(T))}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")})))}}const k={rootComponent:".au-collapse"};class J extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(k))}getComponentSelector(){return this.selectors.rootComponent}async state(){return this.locatorRoot.evaluate((t,e)=>({rootClasses:t.className.trim().split(" ").sort()}),this.selectors)}}const I={rootComponent:".au-carousel",container:".au-carousel-container",slide:".au-carousel-slide",nextBtn:".carousel-control-next",prevBtn:".carousel-control-prev",indicators:".carousel-indicators",indicatorBtn:".carousel-indicators button"};class K extends d.BasePO{constructor(){super(...arguments);u(this,"selectors",structuredClone(I))}getComponentSelector(){return this.selectors.rootComponent}get locatorContainer(){return this.locatorRoot.locator(this.selectors.container)}get locatorNextBtn(){return this.locatorRoot.locator(this.selectors.nextBtn)}get locatorPrevBtn(){return this.locatorRoot.locator(this.selectors.prevBtn)}get locatorIndicators(){return this.locatorRoot.locator(this.selectors.indicators)}get locatorIndicatorBtn(){return this.locatorRoot.locator(this.selectors.indicatorBtn)}get locatorSlide(){return this.locatorRoot.locator(this.selectors.slide)}async state(){return this.locatorRoot.evaluate(t=>{const e=t.querySelectorAll(".carousel-indicators button");return{rootClasses:t.className.trim().split(" ").sort(),prevBtn:t.querySelector(".carousel-control-prev")!==null,nextBtn:t.querySelector(".carousel-control-next")!==null,indicators:{selected:[...e].findIndex(s=>s.classList.contains("active")),count:e.length},slides:{visible:[...t.querySelectorAll(".au-carousel-slide")].findIndex(s=>{const a=s.getBoundingClientRect(),r=t.getBoundingClientRect();return a.left>=r.left&&a.right<=r.right})}}})}}exports.AccordionPO=F;exports.AlertPO=z;exports.CarouselPO=K;exports.CollapsePO=J;exports.ModalPO=H;exports.PaginationPO=M;exports.ProgressbarPO=_;exports.RatingPO=E;exports.SelectPO=D;exports.SliderPO=j;exports.ToastPO=q;exports.ToasterPO=W;exports.TreePO=G;exports.alertSelectors=B;exports.carouselSelectors=I;exports.collapseSelectors=k;exports.modalSelectors=A;exports.paginationSelectors=R;exports.progressbarSelectors=f;exports.ratingSelectors=P;exports.selectSelectors=v;exports.sliderSelectors=O;exports.toastSelectors=C;exports.toasterSelectors=L;exports.treeSelectors=T;
package/index.js CHANGED
@@ -1,7 +1,7 @@
1
- var A = Object.defineProperty;
2
- var R = (c, l, t) => l in c ? A(c, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[l] = t;
1
+ var S = Object.defineProperty;
2
+ var R = (c, l, t) => l in c ? S(c, l, { enumerable: !0, configurable: !0, writable: !0, value: t }) : c[l] = t;
3
3
  var u = (c, l, t) => R(c, typeof l != "symbol" ? l + "" : l, t);
4
- import { BasePO as d } from "@agnos-ui/base-po";
4
+ import { BasePO as h } from "@agnos-ui/base-po";
5
5
  const v = {
6
6
  // TODO: should we use bootstrap-independent classes starting with au- ?
7
7
  rootComponent: ".modal",
@@ -12,7 +12,7 @@ const v = {
12
12
  body: ".modal-body",
13
13
  footer: ".modal-footer"
14
14
  };
15
- class E extends d {
15
+ class E extends h {
16
16
  constructor() {
17
17
  super(...arguments);
18
18
  u(this, "selectors", structuredClone(v));
@@ -40,8 +40,8 @@ class E extends d {
40
40
  }
41
41
  async state() {
42
42
  return this.locatorRoot.evaluate((t, e) => {
43
- var n, h, p, b, m, g, y, C, x;
44
- const s = (n = t.querySelector(e.closeButton)) == null ? void 0 : n.getAttribute("aria-label"), a = (p = (h = t.querySelector(e.header)) == null ? void 0 : h.innerText) == null ? void 0 : p.trim(), r = (m = (b = t.querySelector(e.title)) == null ? void 0 : b.innerText) == null ? void 0 : m.trim(), o = (y = (g = t.querySelector(e.body)) == null ? void 0 : g.innerText) == null ? void 0 : y.trim(), i = (x = (C = t.querySelector(e.footer)) == null ? void 0 : C.innerText) == null ? void 0 : x.trim();
43
+ var n, d, p, m, b, g, C, y, x;
44
+ const s = (n = t.querySelector(e.closeButton)) == null ? void 0 : n.getAttribute("aria-label"), a = (p = (d = t.querySelector(e.header)) == null ? void 0 : d.innerText) == null ? void 0 : p.trim(), r = (b = (m = t.querySelector(e.title)) == null ? void 0 : m.innerText) == null ? void 0 : b.trim(), o = (C = (g = t.querySelector(e.body)) == null ? void 0 : g.innerText) == null ? void 0 : C.trim(), i = (x = (y = t.querySelector(e.footer)) == null ? void 0 : y.innerText) == null ? void 0 : x.trim();
45
45
  return {
46
46
  rootClasses: t.className.trim().split(" ").sort(),
47
47
  header: a,
@@ -63,7 +63,7 @@ const f = {
63
63
  pages: ".au-page",
64
64
  ellipses: ".au-ellipsis"
65
65
  };
66
- class D extends d {
66
+ class D extends h {
67
67
  constructor() {
68
68
  super(...arguments);
69
69
  u(this, "selectors", structuredClone(f));
@@ -128,12 +128,12 @@ class D extends d {
128
128
  }
129
129
  async state() {
130
130
  return this.locatorRoot.evaluate((t) => {
131
- const e = { rootClasses: [], disabled: null, pages: [], hrefs: [] }, s = [...t.querySelectorAll(".au-page")], a = [], r = [], o = {}, i = (g) => g == null ? void 0 : g.getAttribute("href"), n = t.querySelector("a.au-first"), h = t.querySelector("a.au-previous"), p = t.querySelector("a.au-next"), b = t.querySelector("a.au-last");
132
- n && (o.first = i(n)), h && (o.previous = i(h)), p && (o.next = i(p)), b && (o.last = i(b));
131
+ const e = { rootClasses: [], disabled: null, pages: [], hrefs: [] }, s = [...t.querySelectorAll(".au-page")], a = [], r = [], o = {}, i = (g) => g == null ? void 0 : g.getAttribute("href"), n = t.querySelector("a.au-first"), d = t.querySelector("a.au-previous"), p = t.querySelector("a.au-next"), m = t.querySelector("a.au-last");
132
+ n && (o.first = i(n)), d && (o.previous = i(d)), p && (o.next = i(p)), m && (o.last = i(m));
133
133
  for (const g of s)
134
134
  r.push(g.getAttribute("href") || ""), a.push((g.textContent || "").trim());
135
- const m = [...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 = m.length === s.length ? "true" : null, t.querySelector("a.au-previous[aria-disabled]") ? e.isPreviousDisabled = !0 : h && (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 : b && (e.isLastDisabled = !1), e;
135
+ const b = [...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 = b.length === s.length ? "true" : null, t.querySelector("a.au-previous[aria-disabled]") ? e.isPreviousDisabled = !0 : d && (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
137
  });
138
138
  }
139
139
  }
@@ -141,7 +141,7 @@ const B = {
141
141
  rootComponent: ".au-rating",
142
142
  star: ".au-rating-star"
143
143
  };
144
- class z extends d {
144
+ class z extends h {
145
145
  constructor() {
146
146
  super(...arguments);
147
147
  u(this, "selectors", structuredClone(B));
@@ -178,7 +178,7 @@ const P = {
178
178
  rootComponent: ".au-select"
179
179
  // TODO add selector list
180
180
  };
181
- class F extends d {
181
+ class F extends h {
182
182
  constructor() {
183
183
  super(...arguments);
184
184
  u(this, "selectors", structuredClone(P));
@@ -224,19 +224,19 @@ class F extends d {
224
224
  }
225
225
  async state() {
226
226
  return await this.locatorRoot.evaluate((t) => {
227
- var h, p;
227
+ var d, p;
228
228
  const e = t.querySelector('div[role="combobox"]'), s = t.querySelector('input[type="text"]'), a = [];
229
229
  if (e) {
230
- const b = e.querySelectorAll("div.au-select-badge");
231
- for (const m of b)
232
- a.push((h = m == null ? void 0 : m.textContent) == null ? void 0 : h.trim());
230
+ const m = e.querySelectorAll("div.au-select-badge");
231
+ for (const b of m)
232
+ a.push((d = b == null ? void 0 : b.textContent) == null ? void 0 : d.trim());
233
233
  }
234
234
  const r = t.querySelector("ul.dropdown-menu"), o = r != null, i = [], n = [];
235
235
  if (r != null) {
236
- const b = r.querySelectorAll("li.dropdown-item");
237
- for (const m of b) {
238
- const g = (p = m.textContent) == null ? void 0 : p.trim();
239
- i.push(g), m.classList.contains("selected") && n.push(g);
236
+ const m = r.querySelectorAll("li.dropdown-item");
237
+ for (const b of m) {
238
+ const g = (p = b.textContent) == null ? void 0 : p.trim();
239
+ i.push(g), b.classList.contains("selected") && n.push(g);
240
240
  }
241
241
  }
242
242
  return {
@@ -254,7 +254,7 @@ const q = {
254
254
  body: ".alert-body",
255
255
  closeButton: ".btn-close"
256
256
  };
257
- class _ extends d {
257
+ class _ extends h {
258
258
  constructor() {
259
259
  super(...arguments);
260
260
  u(this, "selectors", structuredClone(q));
@@ -277,7 +277,7 @@ class _ extends d {
277
277
  }, this.selectors);
278
278
  }
279
279
  }
280
- class W extends d {
280
+ class W extends h {
281
281
  constructor() {
282
282
  super(...arguments);
283
283
  u(this, "selectors", {
@@ -362,7 +362,7 @@ const L = {
362
362
  outerBar: ".progress",
363
363
  innerBar: ".progress-bar"
364
364
  };
365
- class j extends d {
365
+ class j extends h {
366
366
  constructor() {
367
367
  super(...arguments);
368
368
  u(this, "selectors", structuredClone(L));
@@ -378,7 +378,7 @@ class j extends d {
378
378
  }
379
379
  async state() {
380
380
  return this.locatorRoot.evaluate((t) => {
381
- var a, r, o, i, n, h;
381
+ var a, r, o, i, n, d;
382
382
  const e = t.querySelector(".progress-bar"), s = t.querySelector(".progress");
383
383
  return {
384
384
  ariaLabel: t.getAttribute("aria-label"),
@@ -389,14 +389,15 @@ class j extends d {
389
389
  label: (a = e == null ? void 0 : e.textContent) == null ? void 0 : a.trim(),
390
390
  innerClasses: ((i = (o = (r = e == null ? void 0 : e.className) == null ? void 0 : r.trim()) == null ? void 0 : o.split(" ")) == null ? void 0 : i.sort()) ?? [],
391
391
  outerHeight: (n = s == null ? void 0 : s.style) == null ? void 0 : n.height,
392
- innerWidth: (h = e == null ? void 0 : e.style) == null ? void 0 : h.width
392
+ innerWidth: (d = e == null ? void 0 : e.style) == null ? void 0 : d.width
393
393
  };
394
394
  });
395
395
  }
396
396
  }
397
- const T = {
397
+ const k = {
398
398
  rootComponent: ".au-slider",
399
399
  clickableArea: ".au-slider-clickable-area",
400
+ clickableAreaVertical: ".au-slider-clickable-area-vertical",
400
401
  handle: ".au-slider-handle",
401
402
  tick: ".au-slider-tick",
402
403
  tickLabel: ".au-slider-tick-label",
@@ -407,16 +408,23 @@ const T = {
407
408
  minLabelVertical: ".au-slider-label-vertical-min",
408
409
  maxLabelVertical: ".au-slider-label-vertical-max",
409
410
  valueLabel: ".au-slider-label-now",
410
- progress: ".au-slider-progress"
411
+ progress: ".au-slider-progress",
412
+ content: ".au-slider-content"
411
413
  };
412
- class G extends d {
414
+ class G extends h {
413
415
  constructor() {
414
416
  super(...arguments);
415
- u(this, "selectors", structuredClone(T));
417
+ u(this, "selectors", structuredClone(k));
416
418
  }
417
419
  getComponentSelector() {
418
420
  return this.selectors.rootComponent;
419
421
  }
422
+ get clickableArea() {
423
+ return this.locatorRoot.locator(this.selectors.clickableArea);
424
+ }
425
+ get clickableAreaVertical() {
426
+ return this.locatorRoot.locator(this.selectors.clickableAreaVertical);
427
+ }
420
428
  get locatorHandle() {
421
429
  return this.locatorRoot.locator(this.selectors.handle);
422
430
  }
@@ -450,6 +458,9 @@ class G extends d {
450
458
  get locatorValueLabel() {
451
459
  return this.locatorRoot.locator(this.selectors.valueLabel);
452
460
  }
461
+ get locatorContent() {
462
+ return this.locatorRoot.locator(this.selectors.content);
463
+ }
453
464
  async sliderHandleState() {
454
465
  return this.locatorRoot.locator(this.selectors.handle).evaluateAll((t) => t.map((e) => ({
455
466
  style: e.getAttribute("style"),
@@ -477,16 +488,16 @@ class G extends d {
477
488
  })));
478
489
  }
479
490
  }
480
- const S = {
491
+ const A = {
481
492
  rootComponent: ".toast",
482
493
  closeButton: ".btn-close",
483
494
  header: ".toast-header",
484
495
  body: ".toast-body"
485
496
  };
486
- class k extends d {
497
+ class T extends h {
487
498
  constructor() {
488
499
  super(...arguments);
489
- u(this, "selectors", structuredClone(S));
500
+ u(this, "selectors", structuredClone(A));
490
501
  }
491
502
  getComponentSelector() {
492
503
  return this.selectors.rootComponent;
@@ -512,7 +523,7 @@ const I = {
512
523
  container: ".au-toaster-container",
513
524
  closeButton: ".au-toaster-closeAll"
514
525
  };
515
- class J extends d {
526
+ class J extends h {
516
527
  constructor() {
517
528
  super(...arguments);
518
529
  u(this, "selectors", structuredClone(I));
@@ -525,8 +536,8 @@ class J extends d {
525
536
  }
526
537
  async toastPOs() {
527
538
  return Array.from(
528
- { length: await this.locatorContainer.locator(S.rootComponent).count() },
529
- (t, e) => new k(this.locatorContainer, e)
539
+ { length: await this.locatorContainer.locator(A.rootComponent).count() },
540
+ (t, e) => new T(this.locatorContainer, e)
530
541
  );
531
542
  }
532
543
  get locatorCloseButton() {
@@ -539,7 +550,7 @@ const w = {
539
550
  itemToggle: ".au-tree-expand-icon",
540
551
  itemContents: ".au-tree-item"
541
552
  };
542
- class K extends d {
553
+ class K extends h {
543
554
  constructor() {
544
555
  super(...arguments);
545
556
  u(this, "selectors", structuredClone(w));
@@ -568,7 +579,7 @@ class K extends d {
568
579
  const O = {
569
580
  rootComponent: ".au-collapse"
570
581
  };
571
- class Q extends d {
582
+ class Q extends h {
572
583
  constructor() {
573
584
  super(...arguments);
574
585
  u(this, "selectors", structuredClone(O));
@@ -582,7 +593,7 @@ class Q extends d {
582
593
  }), this.selectors);
583
594
  }
584
595
  }
585
- const H = {
596
+ const V = {
586
597
  rootComponent: ".au-carousel",
587
598
  container: ".au-carousel-container",
588
599
  slide: ".au-carousel-slide",
@@ -591,10 +602,10 @@ const H = {
591
602
  indicators: ".carousel-indicators",
592
603
  indicatorBtn: ".carousel-indicators button"
593
604
  };
594
- class U extends d {
605
+ class U extends h {
595
606
  constructor() {
596
607
  super(...arguments);
597
- u(this, "selectors", structuredClone(H));
608
+ u(this, "selectors", structuredClone(V));
598
609
  }
599
610
  getComponentSelector() {
600
611
  return this.selectors.rootComponent;
@@ -649,19 +660,19 @@ export {
649
660
  z as RatingPO,
650
661
  F as SelectPO,
651
662
  G as SliderPO,
652
- k as ToastPO,
663
+ T as ToastPO,
653
664
  J as ToasterPO,
654
665
  K as TreePO,
655
666
  q as alertSelectors,
656
- H as carouselSelectors,
667
+ V as carouselSelectors,
657
668
  O as collapseSelectors,
658
669
  v as modalSelectors,
659
670
  f as paginationSelectors,
660
671
  L as progressbarSelectors,
661
672
  B as ratingSelectors,
662
673
  P as selectSelectors,
663
- T as sliderSelectors,
664
- S as toastSelectors,
674
+ k as sliderSelectors,
675
+ A as toastSelectors,
665
676
  I as toasterSelectors,
666
677
  w as treeSelectors
667
678
  };
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.9.0",
4
+ "version": "0.9.1",
5
5
  "keywords": [
6
6
  "e2e",
7
7
  "page-object",
@@ -27,7 +27,7 @@
27
27
  "module": "./index.js",
28
28
  "types": "./index.d.ts",
29
29
  "dependencies": {
30
- "@agnos-ui/base-po": "0.9.0"
30
+ "@agnos-ui/base-po": "0.9.1"
31
31
  },
32
32
  "peerDependencies": {
33
33
  "@playwright/test": "^1.49.0"
package/slider.po.d.ts CHANGED
@@ -3,6 +3,7 @@ import type { Locator } from '@playwright/test';
3
3
  export declare const sliderSelectors: {
4
4
  rootComponent: string;
5
5
  clickableArea: string;
6
+ clickableAreaVertical: string;
6
7
  handle: string;
7
8
  tick: string;
8
9
  tickLabel: string;
@@ -14,11 +15,13 @@ export declare const sliderSelectors: {
14
15
  maxLabelVertical: string;
15
16
  valueLabel: string;
16
17
  progress: string;
18
+ content: string;
17
19
  };
18
20
  export declare class SliderPO extends BasePO {
19
21
  selectors: {
20
22
  rootComponent: string;
21
23
  clickableArea: string;
24
+ clickableAreaVertical: string;
22
25
  handle: string;
23
26
  tick: string;
24
27
  tickLabel: string;
@@ -30,8 +33,11 @@ export declare class SliderPO extends BasePO {
30
33
  maxLabelVertical: string;
31
34
  valueLabel: string;
32
35
  progress: string;
36
+ content: string;
33
37
  };
34
38
  getComponentSelector(): string;
39
+ get clickableArea(): Locator;
40
+ get clickableAreaVertical(): Locator;
35
41
  get locatorHandle(): Locator;
36
42
  get locatorTick(): Locator;
37
43
  get locatorTickLabel(): Locator;
@@ -43,6 +49,7 @@ export declare class SliderPO extends BasePO {
43
49
  get locatorMaxLabelVertical(): Locator;
44
50
  get locatorProgress(): Locator;
45
51
  get locatorValueLabel(): Locator;
52
+ get locatorContent(): Locator;
46
53
  sliderHandleState(): Promise<{
47
54
  style: string | null;
48
55
  value: string | null;