@ironsource/shared-ui-e2e 2.1.12-rc.3 → 2.1.12-rc.30

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.
@@ -1 +1 @@
1
- (function(c,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(c=typeof globalThis<"u"?globalThis:c||self,p(c["shared-ui-e2e"]={}))})(this,function(c){"use strict";var dt=Object.defineProperty;var ut=(c,p,s)=>p in c?dt(c,p,{enumerable:!0,configurable:!0,writable:!0,value:s}):c[p]=s;var l=(c,p,s)=>(ut(c,typeof p!="symbol"?p+"":p,s),s);var p=(a=>(a.TRIGGER="ie-trigger",a.CONTENT="ie-content",a.SEARCH="ie-search",a.LIST="ie-list",a.LIST_SELECTED="ie-list-selected",a.ACTION_CANCEL="ie-action-cancel",a.ACTION_APPLY="ie-action-apply",a.SELECT_ALL="ie-select-all",a.CLEAR_ALL="ie-clear-all",a))(p||{}),s=(a=>(a.TRIGGER="dd-trigger",a.WRAPPER="dd-wrapper",a.BUTTON="dd-button",a.BUTTON_WRAPPER="dd-button-wrapper",a.BUTTON_CONTENT="dd-button-content",a.BUTTON_CONTENT_SUFFIX="dd-button-content-suffix",a.BUTTON_CLEAR="dd-button-clear",a.LABEL="dd-label",a.LIST_CONTAINER="dd-list-container",a.SEARCH="dd-search",a.TITLE="dd-title",a.ACTION_CANCEL="dd-action-cancel",a.ACTION_APPLY="dd-action-apply",a.ACTION_CLEAR_ALL="dd-action-clear-all",a.HELPER_TEXT="dd-helper-text",a.HELPER_TEXT_ERROR="dd-helper-text-error",a.SELECT_ALL="dd-select-all",a.NO_RESULT="dd-no-result",a))(s||{}),b=(a=>(a.WRAPPER="banner-wrapper",a.CONTENT="banner-content",a))(b||{}),y=(a=>(a.WRAPPER="alert-wrapper",a.TITLE="alert-title",a.MESSAGE="alert-message",a.ACTION_BUTTON="alert-action-button",a.CLOSE_BUTTON="alert-close-button",a))(y||{}),u=(a=>(a.WRAPPER="dialog-wrapper",a.HEADER="dialog-header",a.ACTION_CLOSE="dialog-action-close",a.HEADER_SECONDARY="dialog-header-secondary",a.CONTENT="dialog-content",a.ACTION_BUTTONS_WRAPPER="dialog-action-buttons-wrapper",a.BACKDROP="dialog-backdrop",a.SAVE_BUTTON="dialog-save-button",a.CANCEL_BUTTON="dialog-cancel-button",a))(u||{}),r=(a=>(a.WRAPPER="input-wrapper",a.TOOLTIP="input-tooltip",a.TOOLTIP_WITHOUT_ICON="input-tooltip-without-icon",a.MANDATORY="input-mandatory",a.LABEL_CONTAINER="input-label-container",a.LABEL_TEXT="input-label-text",a.FIELD="input-field",a.EXTRA_TEXT="input-extra-text",a.TOGGLE_PASSWORD="input-toggle-password-icon",a))(r||{}),E=(a=>(a.WRAPPER="ta-wrapper",a.LABEL="ta-label",a.FIELD="ta-field",a.TEXT="ta-text",a))(E||{}),O=(a=>(a.CONTAINER="search-container",a.FIELD="search-field",a.CLOSE="search-close",a.CLEAR="search-clear",a))(O||{}),g=(a=>(a.CONTAINER="tbl-container",a.TABLE="tbl-table",a.HEADER="tbl-header",a.TITLE="tbl-title",a.HEADER_RIGHT="tbl-header-right",a.ACTIONS="tbl-actions",a.SECTIONS="tbl-sections",a.BODY_WRAPPER="tbl-body-wrapper",a.EMPTY_STATE="tbl-empty-state",a.PRE_SEARCH_HEADER="tbl-pre-search-header",a))(g||{}),S=(a=>(a.TEXT="tt-text",a.TRIGGER="tt-trigger",a.HEADER="tt-header",a))(S||{}),m=(a=>(a.WRAPPER="tabs-wrapper",a.TAB="tabs-tab",a))(m||{}),B=(a=>(a.CONTAINER="field-label-container",a.TEXT="field-label-text",a.MANDATORY="field-label-mandatory",a.TOOLTIP="field-label-help-tooltip",a))(B||{}),C=(a=>(a.CONTAINER="field-help-text-container",a.TEXT="field-help-text-text",a.ICON="field-help-text-icon",a))(C||{}),w=(a=>(a.CONTAINER="sb-container",a.TITLE="sb-title",a.MESSAGE="sb-message",a.CLOSE="sb-close",a.ICON="sb-icon",a.ACTION_BUTTON="sb-action-button",a))(w||{}),I=(a=>(a.TITLE="form-card-title",a.CONTENT="form-card-content",a.ACTIONS="form-card-actions",a.SAVE_BUTTON="form-card-save-btn",a.CANCEL_BUTTON="form-card-cancel-btn",a))(I||{}),N=(a=>(a.TITLE="ah-title",a.APP_KEY="ah-app-key",a.APP_PLATFORM="ah-app-platform",a.AB_ICON="ah-ab-icon",a))(N||{}),_=(a=>(a.TEXT="ic-text",a.COPY_BTN="ic-copy-btn",a))(_||{}),L=(a=>(a.WRAPPER="multibar-wrapper",a.CLOSE_BTN="multibar-close-button",a.MENU="multibar-menu",a.ACTION="multibar-action",a))(L||{}),h=(a=>(a.CONTAINER="sortable-list-container",a.DRAGGABLE_LIST="sortable-list-draggable-list",a.LOCKED_LIST="sortable-list-locked-list",a))(h||{});const X=(a,t)=>{const e=new URLSearchParams(a).toString();return t.includes("?")?`${t}${e}`:`${t}?${e}`},Y=(a,t={})=>{const e=[];Object.entries(t).forEach(([T,d])=>{e.push(`${T}:${d}`)});const o={id:a,viewMode:"story",args:e.join(";")};return X(o,"iframe.html")},n=(a,t)=>`${a}-${t}`;class K{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${b.WRAPPER}']`;await this.page.waitForSelector(e)}getBannerText({testId:t}){return this.page.getByTestId(n(t,b.CONTENT)).textContent()}hasBannerType({testId:t,type:e}){return this.page.getByTestId(n(t,b.WRAPPER)).locator(`.icon.icon-name--${e}`)!==null}}class j{constructor(t){l(this,"page");l(this,"testId");l(this,"componentId");l(this,"loadedPageSelector");this.page=t.page,this.testId=t.testId,this.componentId=t.componentId,this.loadedPageSelector=t.loadedPageSelector}async goto(t={}){const e={testId:this.testId,...t.additionalComponentParams};await this.page.goto(Y(t.storyId||this.componentId,e)),await this.page.waitForSelector(this.loadedPageSelector)}}class q{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${u.WRAPPER}']`;await this.page.waitForSelector(e)}getDialogTitle({testId:t}){return this.page.getByTestId(n(t,u.HEADER)).textContent()}getDialogText({testId:t}){return this.page.getByTestId(n(t,u.CONTENT)).textContent()}async closeDialog({testId:t}){await(await this.page.getByTestId(n(t,u.ACTION_CLOSE))).click()}async clickOnPrimaryButton({testId:t}){await this.page.getByTestId(n(t,u.SAVE_BUTTON)).click()}async clickOnDefaultButton({testId:t}){await this.page.getByTestId(n(t,u.CANCEL_BUTTON)).click()}async clickOnDeleteButton({testId:t}){await(await this.page.getByTestId(n(t,u.ACTION_BUTTONS_WRAPPER)).locator(".danger")).click()}getDialogSubtitle({testId:t}){return this.page.getByTestId(n(t,u.HEADER_SECONDARY)).locator(".subtitle").textContent()}async isDialogVisible({testId:t}){return await this.page.waitForTimeout(1e3),(await this.page.getByTestId(n(t,u.WRAPPER))).isVisible()}async waitForDialogToClose(t){await this.page.waitForSelector(n(t,u.WRAPPER),{state:"hidden"})}}class D{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){await this.page.getByTestId(n(t,s.WRAPPER))}async selectDropdownOptionByIndex({testId:t,index:e}){await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li").nth(e).click()}getDropdownButtonContent(t){return this.page.getByTestId(n(t,s.BUTTON_CONTENT)).textContent()}async openDropdownComponent({testId:t}){await this.page.getByTestId(n(t,s.TRIGGER)).click({position:{x:15,y:15}})}async selectDropdownOptionByName({testId:t,name:e,shouldOpen:o=!0}){o&&await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span",{hasText:e}).click()}async selectMultipleItemsByIndex({testId:t,itemsToSelect:e}){await this.openDropdownComponent({testId:t});for(const o of e)await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li").nth(o).click()}async selectMultipleItemsByName({testId:t,itemsToSelect:e}){await this.openDropdownComponent({testId:t});for(const o of e)await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span",{hasText:o}).first().click()}async clickOnApply({testId:t}){await this.page.getByTestId(n(t,s.ACTION_APPLY)).click()}async clickOnCancel({testId:t}){await this.page.getByTestId(n(t,s.ACTION_CANCEL)).click()}async isValidationAppear({testId:t}){return(await this.page.getByTestId(n(t,s.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error")}}class A{constructor(t){l(this,"page");this.page=t}getLabelText({testId:t}){return this.page.getByTestId(n(t,B.TEXT)).textContent()}isMandatory({testId:t}){return this.page.getByTestId(n(t,B.MANDATORY)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,B.TOOLTIP));return await e.hover(),e.getAttribute("text")}}class P{constructor(t){l(this,"page");this.page=t}hasExtraText({testId:t}){return this.page.getByTestId(n(t,C.TEXT)).isVisible()}getExtraText({testId:t}){return this.page.getByTestId(n(t,C.TEXT)).textContent()}async hasExtraTextIconType({testId:t,type:e}){return await(await this.page.getByTestId(n(t,C.CONTAINER)).locator(`.icon.icon-name--${e}`)).count()!==0}}class $ extends D{constructor(e){super(e);l(this,"fieldLabelComponent");l(this,"fieldHelpTextComponent");this.fieldLabelComponent=new A(e),this.fieldHelpTextComponent=new P(e)}getDropdownTitle({testId:e}){return this.fieldLabelComponent.getLabelText({testId:e})}isMandatory({testId:e}){return this.fieldLabelComponent.isMandatory({testId:e})}getHelpIconText({testId:e}){return this.fieldLabelComponent.getHelpIconText({testId:e})}hasExtraText({testId:e}){return this.fieldHelpTextComponent.hasExtraText({testId:e})}getExtraText({testId:e}){return this.fieldHelpTextComponent.getExtraText({testId:e})}hasExtraTextIconType({testId:e,type:o}){return this.fieldHelpTextComponent.hasExtraTextIconType({testId:e,type:o})}async getSelectedLabel({testId:e}){let i=await this.page.getByTestId(n(e,s.BUTTON_CONTENT)).textContent();if(await this.page.getByTestId(n(e,s.BUTTON_CONTENT_SUFFIX)).isVisible({timeout:1e3})){const d=await this.page.getByTestId(n(e,s.BUTTON_CONTENT_SUFFIX)).textContent();i=`${i}${d}`}return i}async searchForItem({testId:e,searchTerm:o}){return await this.openDropdownComponent({testId:e}),await this.page.getByTestId(n(e,r.FIELD)).fill(o),this.page.getByTestId(n(e,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}async isErrorText({testId:e}){return await this.page.getByTestId(n(e,C.TEXT)).count()>0}async isDisabled({testId:e}){return(await this.page.getByTestId(n(e,s.TRIGGER)).locator(".button__container--disabled")).isVisible()}async clearAllOptions({testId:e}){await this.page.getByTestId(n(e,s.ACTION_CLEAR_ALL)).click()}isSelectAllChecked({testId:e}){return this.page.getByTestId(n(e,s.SELECT_ALL)).locator(".checkbox.input").isChecked()}isSelectAllIndeterminate({testId:e}){return this.page.getByTestId(n(e,s.SELECT_ALL)).locator(".icon.indeterminate").isVisible()}async removeChipSelection({testId:e}){await this.page.getByTestId(n(e,s.BUTTON_CLEAR)).click()}getDropdownOptions({testId:e}){return this.page.getByTestId(n(e,s.LIST_CONTAINER)).locator(".list").allTextContents()}}class z extends D{constructor(t){super(t)}getDropdownTitle({testId:t}){return this.page.getByTestId(n(t,s.WRAPPER)).locator("label > span").textContent()}getSelectedItem({testId:t}){return this.page.getByTestId(n(t,s.TRIGGER)).locator("button > span").textContent()}async searchForItem({testId:t,searchTerm:e}){return await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,O.FIELD)).fill(e),this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}}class J{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${p.TRIGGER}']`;await this.page.waitForSelector(e)}async clickOnApply(t){await this.page.getByTestId(n(t,p.ACTION_APPLY)).click()}async clickOnCancel(t){await this.page.getByTestId(n(t,p.ACTION_CANCEL)).click()}async openIncludeExcludeComponent(t){await this.page.getByTestId(n(t,p.TRIGGER)).click()}async searchForItem({testId:t,searchTerm:e}){return await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.SEARCH)).locator("input.transparent").fill(e),this.page.getByTestId(n(t,p.LIST)).locator("ul > li .v-popper span").first().textContent()}async selectItemByName({testId:t,entityName:e}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.LIST)).locator("ul > li .v-popper span",{hasText:e}).first().click(),await this.clickOnApply(t)}async selectItemByIndex({testId:t,index:e,applyChanges:o}){await this.clearAll({testId:t}),await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.LIST)).locator(".include-exclude-list ul > li").nth(e).click(),await this.page.waitForSelector("include-exclude-list-header-loading",{state:"hidden"}),o&&await this.clickOnApply(t)}async selectMultipleItems({testId:t,itemsToSelect:e}){await this.clearAll({testId:t}),await this.openIncludeExcludeComponent(t);for(const o of e)await this.page.getByTestId(n(t,p.LIST)).locator(".include-exclude-list ul > li").nth(o).click()}async unselectItemByName({testId:t,entityName:e}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.LIST_SELECTED)).locator("ul > li",{hasText:e}).locator(".clear-button").click(),await this.clickOnApply(t)}async unselectByIndex({testId:t,index:e,applyChanges:o}){await this.page.getByTestId(n(t,p.LIST_SELECTED)).locator("ul li button").nth(e).click(),o&&await this.clickOnApply(t)}async getSelectedCounter(t){return await this.page.getByTestId(n(t,p.LIST_SELECTED)).locator(".include-exclude-selected-header-left span").textContent()}async clearAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.CLEAR_ALL)).click(),await this.clickOnApply(t)}getTriggerText({testId:t}){return this.page.getByTestId(n(t,p.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent()}getTriggerDescription({testId:t}){return this.page.getByTestId(n(t,p.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent()}async selectAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.SELECT_ALL)).click(),await this.clickOnApply(t)}}class f{constructor(t){l(this,"page");this.page=t}getInputsFieldText({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).getAttribute("placeholder")}getInputsType({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).getAttribute("type")}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,r.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,r.FIELD)).clear()}isDisabled({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).isDisabled()}}class Q extends f{constructor(e){super(e);l(this,"fieldLabelComponent");l(this,"fieldHelpTextComponent");this.fieldLabelComponent=new A(e),this.fieldHelpTextComponent=new P(e)}getInputsLabelText({testId:e}){return this.fieldLabelComponent.getLabelText({testId:e})}async waitForComponent({testId:e}){const o=`[data-testid='${e}-${r.WRAPPER}']`;await this.page.waitForSelector(o)}isInputMandatory({testId:e}){return this.fieldLabelComponent.isMandatory({testId:e})}hasInputExtraText({testId:e}){return this.fieldHelpTextComponent.hasExtraText({testId:e})}getInputExtraText({testId:e}){return this.fieldHelpTextComponent.getExtraText({testId:e})}async clickOnApplyButton({testId:e}){await(await this.page.getByTestId(n(e,r.WRAPPER)).locator(".icon.icon-name--check")).click()}hasInlineErrorText({testId:e,inputTestId:o}){return this.page.getByTestId(n(e,o)).isVisible()}async getInlineErrorText({testId:e,inputTestId:o}){const i=this.page.getByTestId(n(e,o));return await i.hover(),i.getAttribute("text")}async clickOnShowPassword({testId:e}){await this.isPasswordHidden({testId:e})&&await this.clickOnPasswordIcon({testId:e})}async clickOnPasswordIcon({testId:e}){await this.page.getByTestId(n(e,r.TOGGLE_PASSWORD)).click()}async clickOnHidePassword({testId:e}){await this.isPasswordHidden({testId:e})||await this.clickOnPasswordIcon({testId:e})}isPasswordHidden({testId:e}){return this.page.getByTestId(n(e,r.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible()}async clearInput({testId:e}){await(await this.page.getByTestId(n(e,r.FIELD))).clear()}hasExtraTextIconType({testId:e,type:o}){return this.fieldHelpTextComponent.hasExtraTextIconType({testId:e,type:o})}async isDisabled({testId:e}){return(await this.page.getByTestId(n(e,r.FIELD))).isDisabled()}hasApplyButton({testId:e}){return this.page.getByTestId(n(e,r.WRAPPER)).locator(".icon.icon-name--check").isVisible()}async getMaxLengthNumber({testId:e}){return(await this.getFontCaptionText({testId:e}))[1]}async getActualNumberLength({testId:e}){return(await this.getFontCaptionText({testId:e}))[0]}async getFontCaptionText({testId:e}){return(await this.page.getByTestId(n(e,r.WRAPPER)).locator(".font-caption").textContent()).split("/").map(i=>parseInt(i.trim(),10))}getHelpIconText({testId:e}){return this.fieldLabelComponent.getHelpIconText({testId:e})}async isValidationAppear({testId:e}){return(await this.page.getByTestId(n(e,r.WRAPPER)).getAttribute("class")).includes("variant-error")}}class Z{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${m.WRAPPER}']`;await this.page.waitForSelector(e)}getSelectedTabText({testId:t}){return this.page.getByTestId(n(t,m.WRAPPER)).locator(".tab-item--active").textContent()}async selectTab({testId:t,tabName:e}){const o=await this.getTabIndex({testId:t,tabName:e});await this.page.getByTestId(n(t,`${m.TAB}-${o+1}`)).click()}async getTabIndex({testId:t,tabName:e}){return(await this.page.getByTestId(n(t,m.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e)}async isTabDisabled({testId:t,tabName:e}){const o=await this.getTabIndex({testId:t,tabName:e});return this.page.getByTestId(n(t,`${m.TAB}-${o}`)).locator(".tab-item--disabled").isVisible()}}class M{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${S.TRIGGER}']`;await this.page.waitForSelector(e)}getTooltipText({testId:t}){return this.page.getByTestId(`${t}-${S.TRIGGER}`).getAttribute("text")}getTooltipHeaderText({testId:t}){return this.page.getByTestId(`${t}-${S.TRIGGER}`).getAttribute("header")}}const x=".table-row",F=".icon-wrapper",H=".states",k=".table-head-container",G=".table-row.loading",tt=1e3;class et{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${g.CONTAINER}']`;await this.page.waitForSelector(e)}getTableRowCount({testId:t}){return this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(x).count()}async getColumnHeaders({testId:t}){return this.page.getByTestId(n(t,g.TABLE)).locator(k).allTextContents()}getTableLabel({testId:t}){return this.page.getByTestId(n(t,g.HEADER)).innerText()}getTableFooter({testId:t}){return this.page.getByTestId(n(t,g.CONTAINER)).locator(".table-footer").innerText()}async clickOnHeaderByName(t){await this.page.locator(k,{hasText:t}).click()}async searchForItems({testId:t,searchTerm:e}){await this.clearSearchText({testId:t}),await this.page.getByTestId(n(t,r.FIELD)).fill(e)}async clearSearchText({testId:t}){await this.page.getByTestId(n(t,r.FIELD)).clear(),await this.waitForTableToLoad()}isArrowVisible({testId:t,headerName:e}){return this.page.getByTestId(n(t,g.TABLE)).locator(k,{hasText:e}).locator(".table-sort-icon").isVisible()}async scrollDownTableRows({testId:t}){const e=`[data-testid=${n(t,g.TABLE)}]`;await this.page.focus(e),await this.page.evaluate(o=>{const i=document.querySelector(o);i&&(i.scrollTop=i.scrollHeight)},e),await this.page.waitForTimeout(tt)}async waitForTableToLoad(){await this.page.waitForSelector(G,{state:"hidden"})}async waitingForTableLoadingToAppear(){await this.page.waitForSelector(G)}async expandRow({testId:t,rowValue:e}){await this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(x,{hasText:e}).locator(F).click()}isRowExpanded({testId:t,rowValue:e}){return this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(x,{hasText:e}).locator(F).isVisible()}async getExpandedRowContent({testId:t,rowValue:e}){return await this.isRowExpanded({testId:t,rowValue:e})||await this.expandRow({testId:t,rowValue:e}),this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(x,{hasText:e}).locator(F).textContent()}isEmptyStateVisible({testId:t}){return this.page.getByTestId(n(t,g.TABLE)).locator(".empty-state").isVisible()}getEmptyStateTitle({testId:t}){return this.page.getByTestId(n(t,g.TABLE)).locator(".font-heading-4.title").textContent()}getEmptyStateSubtitle({testId:t}){return this.page.getByTestId(n(t,g.TABLE)).locator(".font-body-1.subtitle").textContent()}async clickOnRowCheckboxByRowValue({testId:t,rowValue:e}){await this.page.getByTestId(n(t,g.TABLE)).locator(x,{hasText:e}).locator(H).click()}getCheckedRowsNumber({testId:t}){return this.page.getByTestId(n(t,g.TABLE)).locator(x).locator(".icon.checked").count()}async clickOnSelectAllCheckbox({testId:t}){await this.page.getByTestId(n(t,g.TABLE)).locator(H).nth(0).click()}getTableLocator({testId:t}){return this.page.getByTestId(n(t,g.CONTAINER))}getColumnContentByHeaderName({testId:t,headerName:e}){return this.getTableLocator({testId:t}).locator(e).allTextContents()}}class v{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}']`;await this.page.waitForSelector(e)}async clickOnButton({testId:t}){await this.page.click(`[data-testid='${t}']`)}async isButtonLoading({testId:t}){return(await this.page.getByTestId(t).getAttribute("class")).includes("loading")}async getButtonText({testId:t}){return this.page.getByTestId(t).locator(".font-button").textContent()}isButtonDisabled({testId:t}){return this.page.getByTestId(t).isDisabled()}}class at{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${w.CONTAINER}']`;await this.page.waitForSelector(e)}getSnackbarTitle({testId:t}){return this.page.getByTestId(n(t,w.TITLE)).textContent()}async closeSnackbar({testId:t}){await this.page.getByTestId(n(t,w.CLOSE)).locator(".icon-name--x").click()}async waitForSnackbarToBeClosed({testId:t}){const e=`[data-testid='${t}-${w.CONTAINER}']`;await this.page.waitForSelector(e,{state:"detached"})}getSnackbarDescription({testId:t}){return this.page.getByTestId(n(t,w.MESSAGE)).textContent()}async clickOnActionButton({testId:t,buttonName:e}){const o=await this.getActionButtonIndex({testId:t,buttonName:e}),i=`[data-testid='${t}-${w.ACTION_BUTTON}-${o}']`;await this.page.click(i)}async getActionButtonIndex({testId:t,buttonName:e}){return(await this.page.getByTestId(n(t,w.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e)}}class nt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${L.WRAPPER}']`;await this.page.waitForSelector(e)}async closeMultiBar({testId:t}){await this.page.getByTestId(n(t,L.CLOSE_BTN)).locator(".icon-wrapper").click()}getMultiBarCountText({testId:t}){return this.page.getByTestId(n(t,L.WRAPPER)).locator(".count-text").textContent()}async isMultiBarVisible({testId:t}){return await this.page.waitForTimeout(1e3),this.page.getByTestId(n(t,L.WRAPPER)).locator(".multi-bar-panel").isVisible()}async clickOnActionButton({testId:t,actionButtonId:e}){await this.page.getByTestId(n(t,`${L.ACTION}-${e}`)).locator(".start-icon").click()}}class ot{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${B.TEXT}']`;await this.page.waitForSelector(e)}getFormRowTitle({testId:t}){return new A(this.page).getLabelText({testId:t})}isFormRowMandatory({testId:t}){return new A(this.page).isMandatory({testId:t})}getIconText({testId:t}){return new P(this.page).getExtraText({testId:t})}}class it{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${I.CONTENT}']`;await this.page.waitForSelector(e)}getCardTitle({testId:t}){return this.page.getByTestId(n(t,I.TITLE)).textContent()}getCardContentText({testId:t}){return this.page.getByTestId(n(t,I.CONTENT)).textContent()}getCardLabelText({testId:t}){return new A(this.page).getLabelText({testId:t})}async clickOnSaveButton({testId:t}){await this.page.getByTestId(n(t,I.SAVE_BUTTON)).click()}async clickOnCancelButton({testId:t}){await this.page.getByTestId(n(t,I.CANCEL_BUTTON)).click()}isSaveButtonLoading({testId:t}){return new v(this.page).isButtonLoading({testId:t})}async clearForm({testId:t,inputType:e}){(await this.page.getByTestId(n(t,I.CONTENT)).locator(`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`).all()).forEach(i=>i.clear())}}class R extends f{constructor(t){super(t)}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${r.WRAPPER}']`;await this.page.waitForSelector(e)}async isViewOnly({testId:t}){return await this.page.getByTestId(n(t,r.WRAPPER)).locator(".view-only.input-type").count()>0}getLabel({testId:t}){return this.page.getByTestId(n(t,r.LABEL_TEXT)).textContent()}isInputMandatory({testId:t}){return this.page.getByTestId(n(t,r.MANDATORY)).isVisible()}hasInputExtraHelpText({testId:t}){return this.page.getByTestId(n(t,r.EXTRA_TEXT)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,r.LABEL_CONTAINER)).locator(".v-popper.v-popper--theme-default");return await e.hover(),e.getAttribute("text")}getInputExtraText({testId:t}){return this.page.getByTestId(n(t,r.EXTRA_TEXT)).textContent()}getErrorExtraText({testId:t}){return this.page.getByTestId(n(t,r.EXTRA_TEXT)).locator(".error").textContent()}async showPassword({testId:t}){await this.isPasswordHidden({testId:t})&&await this.clickOnPasswordButton({testId:t})}async isPasswordHidden({testId:t}){return await this.page.getByTestId(n(t,r.WRAPPER)).getAttribute("type")==="password"}async clickOnPasswordButton({testId:t}){await(await this.page.getByTestId(n(t,r.WRAPPER)).locator(".password-visibility")).click()}}class st{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${O.CONTAINER}']`;await this.page.waitForSelector(e)}async searchInput({testId:t,searchTerm:e}){await new R(this.page).addInput({testId:t,text:e})}async clearInput({testId:t}){await new R(this.page).clearInput({testId:t})}async clickOnXButton({testId:t}){await this.page.getByTestId(n(t,O.CLEAR)).locator(".icon-name--x-circle").click()}isDisabled({testId:t}){return new R(this.page).isDisabled({testId:t})}getSearchPlaceholder({testId:t}){return new R(this.page).getPlaceholderText({testId:t})}getSearchInputValue({testId:t}){return new R(this.page).getInputsFieldText({testId:t})}}class W{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${_.TEXT}']`;await this.page.waitForSelector(e)}getInlineCopyText({testId:t}){return this.page.getByTestId(`${t}-${_.TEXT}`).textContent()}}class ct{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${N.TITLE}']`;await this.page.waitForSelector(e)}getHeaderTitle({testId:t}){return this.page.getByTestId(`${t}-${N.TITLE}`).textContent()}getInlineCopyText({testId:t}){return new W(this.page).getInlineCopyText({testId:t})}async isIconPresent({testId:t,iconName:e}){return await this.page.getByTestId(`${t}-${N.APP_PLATFORM}`).getAttribute("data-platform")===e}}class rt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${y.WRAPPER}']`;await this.page.waitForSelector(e)}getAlertText({testId:t}){return this.page.getByTestId(n(t,y.MESSAGE)).textContent()}getAlertTitle({testId:t}){return this.page.getByTestId(n(t,y.TITLE)).textContent()}async clickOnActionButton({testId:t}){await this.page.click(n(t,y.ACTION_BUTTON))}getActionButtonText({testId:t}){return this.page.getByTestId(n(t,y.ACTION_BUTTON)).textContent()}async closeAlert({testId:t}){await this.page.getByTestId(n(t,y.CLOSE_BUTTON)).click()}async isAlertVisible({testId:t}){return await this.page.getByTestId(n(t,y.WRAPPER)).count()>0}getAlertIconType({testId:t}){return this.page.getByTestId(n(t,y.WRAPPER)).getAttribute("class")}}class lt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${E.FIELD}']`;await this.page.waitForSelector(e)}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,E.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,E.FIELD)).clear()}getInput({testId:t}){return this.page.getByTestId(n(t,E.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,E.FIELD)).getAttribute("placeholder")}isDisabled({testId:t}){return this.page.getByTestId(n(t,E.FIELD)).isDisabled()}}class pt extends lt{getLabelText({testId:t}){return this.page.getByTestId(n(t,B.TEXT)).textContent()}hasFieldHelpText({testId:t}){return this.page.getByTestId(n(t,C.CONTAINER)).isVisible()}getFieldHelpText({testId:t}){return this.page.getByTestId(n(t,C.CONTAINER)).textContent()}}class gt extends ${constructor(t){super(t)}getDropdownTitle({testId:t}){return this.fieldLabelComponent.getLabelText({testId:t})}isMandatory({testId:t}){return this.fieldLabelComponent.isMandatory({testId:t})}getHelpIconText({testId:t}){return this.fieldLabelComponent.getHelpIconText({testId:t})}hasExtraText({testId:t}){return this.fieldHelpTextComponent.hasExtraText({testId:t})}getExtraText({testId:t}){return this.fieldHelpTextComponent.getExtraText({testId:t})}hasExtraTextIconType({testId:t,type:e}){return this.fieldHelpTextComponent.hasExtraTextIconType({testId:t,type:e})}getSelectedLabel({testId:t}){return this.page.getByTestId(n(t,s.BUTTON_CONTENT)).textContent()}async searchForItem({testId:t,searchTerm:e}){return await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,r.FIELD)).fill(e),this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}async isErrorText({testId:t}){return await this.page.getByTestId(n(t,C.TEXT)).count()>0}async isDisabled({testId:t}){return(await this.page.getByTestId(n(t,s.TRIGGER)).locator(".button__container--disabled")).isVisible()}async clearAllOptions({testId:t}){await this.page.getByTestId(n(t,s.ACTION_CLEAR_ALL)).click()}isSelectAllChecked({testId:t}){return this.page.getByTestId(n(t,s.SELECT_ALL)).locator(".checkbox.input").isChecked()}isSelectAllIndeterminate({testId:t}){return this.page.getByTestId(n(t,s.SELECT_ALL)).locator(".icon.indeterminate").isVisible()}async removeChipSelection({testId:t}){await this.page.getByTestId(n(t,s.BUTTON_CLEAR)).click()}getDropdownOptions({testId:t}){return this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator(".list").allTextContents()}async expandTreeNode({testId:t,nodeName:e}){const o=this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator(`text=${e}`);if(await o.isVisible())await o.click();else throw new Error(`Node with text "${e}" not found.`)}async selectTreeDropdownOptionByName({testId:t,name:e,shouldExpand:o=!1}){await this.openDropdownComponent({testId:t}),o&&await this.expandTreeNode({testId:t,nodeName:e});const i=this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator(`text=${e}`);if(await i.isVisible())await i.click();else throw new Error(`Option with text "${e}" not found in the dropdown.`)}async selectMultipleTreeItemsByName({testId:t,itemsToSelect:e}){await this.openDropdownComponent({testId:t});for(const o of e)await this.selectTreeDropdownOptionByName({testId:t,name:o,shouldExpand:!0});await this.clickOnApply({testId:t})}}const Tt=".sortable-item";class ht{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${h.CONTAINER}']`;await this.page.waitForSelector(e)}async isComponentLoaded(t){const e=`[data-testid='${t}-${h.CONTAINER}']`;return this.page.isVisible(e)}async getItems(t){return this.page.getByTestId(n(t,"sortable-list-item")).allTextContents()}async sortItem(t,e,o){const i=await this.page.getByTestId(n(t,"sortable-list-item")),T=i.nth(e),d=i.nth(o);await T.dragTo(d)}async verifyOrder(t,e){return(await this.getItems(t)).every((i,T)=>i===e[T])}async getListItemLocator({testId:t,item:e,modifier:o}){return this.page.getByTestId(n(t,o)).locator(Tt,{hasText:e})}async selectItem({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;await(await this.getListItemLocator({testId:t,item:e,modifier:i})).click()}async isItemSelected(t){return await this.page.locator(".sortable-item--selected",{hasText:t}).count()>0}async expandItem({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".expand-icon").click()}async selectChildItem({testId:t,item:e,childItem:o,isLockedItem:i}){await this.expandItem({testId:t,item:e,isLockedItem:i}),await this.page.locator("ul li span",{hasText:o}).click()}async isListOpened({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;return await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".child-list ul").count()>0}async isChildItemSelected(t){return await this.page.locator("ul li span",{hasText:t}).count()>0}async openItemMenu({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".item__menu button").click()}async selectMenuItem({testId:t,item:e,isLockedItem:o,menuItem:i}){await this.openItemMenu({testId:t,item:e,isLockedItem:o});const T=this.page.locator(".dropdown-list-wrapper");await T.locator("ul.list li",{hasText:i}).click(),await T.waitFor({state:"detached"})}async isMenuOpened(){return await this.page.locator(".dropdown-list-wrapper").count()>0}async dragAndDrop({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST,d=await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".item.drag-allowed").first().boundingBox();if(d){const V=d.x,U=d.y;await this.page.mouse.move(V,U),await this.page.mouse.down(),await this.page.mouse.move(V+20,U-20),await this.page.mouse.up()}}async getListOrder(){return(await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e,o,i)=>(e[i+1]=o,e),{})}async searchForItem({testId:t,searchTerm:e}){return await this.page.getByTestId(n(t,r.FIELD)).fill(e),this.page.getByTestId(n(t,h.CONTAINER)).locator("ul > li span").first().textContent()}async verifySearchResultDisplayed({testId:t,item:e}){const o=[],i=await this.page.getByTestId(n(t,h.CONTAINER)).all();let T;for(const d of i)T=await d.locator(".child-list span",{hasText:e}).count(),o.push(T>0);return o}}c.AlertComponent=rt,c.AppHeaderComponent=ct,c.BannerComponent=K,c.ButtonComponent=v,c.ComponentBasePage=j,c.DialogComponent=q,c.DropdownComponent=$,c.DropdownComponentV3=z,c.FieldHelpTextComponent=P,c.FieldLabelComponent=A,c.FormCardComponent=it,c.FormRowComponent=ot,c.IncludeExcludeComponent=J,c.InlineCopyComponent=W,c.InputsComponent=Q,c.MultiBarComponent=nt,c.SearchComponent=st,c.SnackbarComponent=at,c.SortableListComponent=ht,c.TableComponent=et,c.TabsComponent=Z,c.TextAreaComponent=pt,c.TooltipComponent=M,c.TreeDropdownComponent=gt,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
1
+ (function(c,p){typeof exports=="object"&&typeof module<"u"?p(exports):typeof define=="function"&&define.amd?define(["exports"],p):(c=typeof globalThis<"u"?globalThis:c||self,p(c["shared-ui-e2e"]={}))})(this,function(c){"use strict";var yt=Object.defineProperty;var Ct=(c,p,s)=>p in c?yt(c,p,{enumerable:!0,configurable:!0,writable:!0,value:s}):c[p]=s;var l=(c,p,s)=>(Ct(c,typeof p!="symbol"?p+"":p,s),s);var p=(a=>(a.TRIGGER="ie-trigger",a.CONTENT="ie-content",a.SEARCH="ie-search",a.LIST="ie-list",a.LIST_SELECTED="ie-list-selected",a.ACTION_CANCEL="ie-action-cancel",a.ACTION_APPLY="ie-action-apply",a.SELECT_ALL="ie-select-all",a.CLEAR_ALL="ie-clear-all",a))(p||{}),s=(a=>(a.TRIGGER="dd-trigger",a.WRAPPER="dd-wrapper",a.BUTTON="dd-button",a.BUTTON_WRAPPER="dd-button-wrapper",a.BUTTON_CONTENT="dd-button-content",a.BUTTON_CONTENT_SUFFIX="dd-button-content-suffix",a.BUTTON_CLEAR="dd-button-clear",a.LABEL="dd-label",a.LIST_CONTAINER="dd-list-container",a.SEARCH="dd-search",a.TITLE="dd-title",a.ACTION_CANCEL="dd-action-cancel",a.ACTION_APPLY="dd-action-apply",a.ACTION_CLEAR_ALL="dd-action-clear-all",a.HELPER_TEXT="dd-helper-text",a.HELPER_TEXT_ERROR="dd-helper-text-error",a.SELECT_ALL="dd-select-all",a.NO_RESULT="dd-no-result",a))(s||{}),b=(a=>(a.WRAPPER="banner-wrapper",a.CONTENT="banner-content",a))(b||{}),y=(a=>(a.WRAPPER="alert-wrapper",a.TITLE="alert-title",a.MESSAGE="alert-message",a.ACTION_BUTTON="alert-action-button",a.CLOSE_BUTTON="alert-close-button",a))(y||{}),d=(a=>(a.WRAPPER="dialog-wrapper",a.HEADER="dialog-header",a.ACTION_CLOSE="dialog-action-close",a.HEADER_SECONDARY="dialog-header-secondary",a.CONTENT="dialog-content",a.ACTION_BUTTONS_WRAPPER="dialog-action-buttons-wrapper",a.BACKDROP="dialog-backdrop",a.SAVE_BUTTON="dialog-save-button",a.CANCEL_BUTTON="dialog-cancel-button",a))(d||{}),r=(a=>(a.WRAPPER="input-wrapper",a.TOOLTIP="input-tooltip",a.TOOLTIP_WITHOUT_ICON="input-tooltip-without-icon",a.MANDATORY="input-mandatory",a.LABEL_CONTAINER="input-label-container",a.LABEL_TEXT="input-label-text",a.FIELD="input-field",a.EXTRA_TEXT="input-extra-text",a.TOGGLE_PASSWORD="input-toggle-password-icon",a))(r||{}),_=(a=>(a.WRAPPER="swicth-wrapper",a.BUTTON="swicth-button",a.TEXT="swicth-text",a))(_||{}),E=(a=>(a.WRAPPER="ta-wrapper",a.LABEL="ta-label",a.FIELD="ta-field",a.TEXT="ta-text",a))(E||{}),O=(a=>(a.CONTAINER="search-container",a.FIELD="search-field",a.CLOSE="search-close",a.CLEAR="search-clear",a))(O||{}),T=(a=>(a.CONTAINER="tbl-container",a.TABLE="tbl-table",a.HEADER="tbl-header",a.TITLE="tbl-title",a.HEADER_RIGHT="tbl-header-right",a.ACTIONS="tbl-actions",a.SECTIONS="tbl-sections",a.BODY_WRAPPER="tbl-body-wrapper",a.EMPTY_STATE="tbl-empty-state",a.PRE_SEARCH_HEADER="tbl-pre-search-header",a))(T||{}),S=(a=>(a.TEXT="tt-text",a.TRIGGER="tt-trigger",a.HEADER="tt-header",a))(S||{}),I=(a=>(a.WRAPPER="tabs-wrapper",a.TAB="tabs-tab",a))(I||{}),B=(a=>(a.CONTAINER="field-label-container",a.TEXT="field-label-text",a.MANDATORY="field-label-mandatory",a.TOOLTIP="field-label-help-tooltip",a))(B||{}),C=(a=>(a.CONTAINER="field-help-text-container",a.TEXT="field-help-text-text",a.ICON="field-help-text-icon",a))(C||{}),w=(a=>(a.CONTAINER="sb-container",a.TITLE="sb-title",a.MESSAGE="sb-message",a.CLOSE="sb-close",a.ICON="sb-icon",a.ACTION_BUTTON="sb-action-button",a))(w||{}),m=(a=>(a.TITLE="form-card-title",a.CONTENT="form-card-content",a.ACTIONS="form-card-actions",a.SAVE_BUTTON="form-card-save-btn",a.CANCEL_BUTTON="form-card-cancel-btn",a))(m||{}),N=(a=>(a.TITLE="ah-title",a.APP_KEY="ah-app-key",a.APP_PLATFORM="ah-app-platform",a.AB_ICON="ah-ab-icon",a))(N||{}),F=(a=>(a.TEXT="ic-text",a.COPY_BTN="ic-copy-btn",a))(F||{}),A=(a=>(a.WRAPPER="multibar-wrapper",a.CLOSE_BTN="multibar-close-button",a.MENU="multibar-menu",a.ACTION="multibar-action",a))(A||{}),h=(a=>(a.CONTAINER="sortable-list-container",a.DRAGGABLE_LIST="sortable-list-draggable-list",a.LOCKED_LIST="sortable-list-locked-list",a))(h||{});const Y=(a,t)=>{const e=new URLSearchParams(a).toString();return t.includes("?")?`${t}${e}`:`${t}?${e}`},K=(a,t={})=>{const e=[];Object.entries(t).forEach(([g,u])=>{e.push(`${g}:${u}`)});const o={id:a,viewMode:"story",args:e.join(";")};return Y(o,"iframe.html")},n=(a,t)=>`${a}-${t}`;class j{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${b.WRAPPER}']`;await this.page.waitForSelector(e)}getBannerText({testId:t}){return this.page.getByTestId(n(t,b.CONTENT)).textContent()}hasBannerType({testId:t,type:e}){return this.page.getByTestId(n(t,b.WRAPPER)).locator(`.icon.icon-name--${e}`)!==null}}class q{constructor(t){l(this,"page");l(this,"testId");l(this,"componentId");l(this,"loadedPageSelector");this.page=t.page,this.testId=t.testId,this.componentId=t.componentId,this.loadedPageSelector=t.loadedPageSelector}async goto(t={}){const e={testId:this.testId,...t.additionalComponentParams};await this.page.goto(K(t.storyId||this.componentId,e)),await this.page.waitForSelector(this.loadedPageSelector)}}class z{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${d.WRAPPER}']`;await this.page.waitForSelector(e)}getDialogTitle({testId:t}){return this.page.getByTestId(n(t,d.HEADER)).textContent()}getDialogText({testId:t}){return this.page.getByTestId(n(t,d.CONTENT)).textContent()}async closeDialog({testId:t}){await(await this.page.getByTestId(n(t,d.ACTION_CLOSE))).click()}async clickOnPrimaryButton({testId:t}){await this.page.getByTestId(n(t,d.SAVE_BUTTON)).click()}async clickOnDefaultButton({testId:t}){await this.page.getByTestId(n(t,d.CANCEL_BUTTON)).click()}async clickOnDeleteButton({testId:t}){await(await this.page.getByTestId(n(t,d.ACTION_BUTTONS_WRAPPER)).locator(".danger")).click()}getDialogSubtitle({testId:t}){return this.page.getByTestId(n(t,d.HEADER_SECONDARY)).locator(".subtitle").textContent()}async isDialogVisible({testId:t}){return await this.page.waitForTimeout(1e3),(await this.page.getByTestId(n(t,d.WRAPPER))).isVisible()}async waitForDialogToClose(t){await this.page.waitForSelector(n(t,d.WRAPPER),{state:"hidden"})}}class ${constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){await this.page.getByTestId(n(t,s.WRAPPER))}async selectDropdownOptionByIndex({testId:t,index:e}){await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li").nth(e).click()}getDropdownButtonContent(t){return this.page.getByTestId(n(t,s.BUTTON_CONTENT)).textContent()}async openDropdownComponent({testId:t}){await this.page.getByTestId(n(t,s.TRIGGER)).click({position:{x:15,y:15}})}async selectDropdownOptionByName({testId:t,name:e,shouldOpen:o=!0}){o&&await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li div.text-container",{hasText:e}).click()}async clearAllOptions({testId:t}){await this.page.getByTestId(n(t,s.ACTION_CLEAR_ALL)).click()}async selectMultipleItemsByIndex({testId:t,itemsToSelect:e}){await this.openDropdownComponent({testId:t}),await this.clearAllOptions({testId:t});for(const o of e)await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li").nth(o).click()}async selectMultipleItemsByName({testId:t,itemsToSelect:e,shouldClearAll:o}){await this.openDropdownComponent({testId:t}),o&&await this.clearAllOptions({testId:t});for(const i of e)await this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span",{hasText:i}).first().click()}async clickOnApply({testId:t}){await this.page.getByTestId(n(t,s.ACTION_APPLY)).click()}async clickOnCancel({testId:t}){await this.page.getByTestId(n(t,s.ACTION_CANCEL)).click()}async isValidationAppear({testId:t}){return(await this.page.getByTestId(n(t,s.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error")}}class L{constructor(t){l(this,"page");this.page=t}getLabelText({testId:t}){return this.page.getByTestId(n(t,B.TEXT)).textContent()}isMandatory({testId:t}){return this.page.getByTestId(n(t,B.MANDATORY)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,B.TOOLTIP));return await e.hover(),e.getAttribute("text")}}class P{constructor(t){l(this,"page");this.page=t}hasExtraText({testId:t}){return this.page.getByTestId(n(t,C.TEXT)).isVisible()}getExtraText({testId:t}){return this.page.getByTestId(n(t,C.TEXT)).textContent()}async hasExtraTextIconType({testId:t,type:e}){return await(await this.page.getByTestId(n(t,C.CONTAINER)).locator(`.icon.icon-name--${e}`)).count()!==0}}class f extends ${constructor(e){super(e);l(this,"fieldLabelComponent");l(this,"fieldHelpTextComponent");this.fieldLabelComponent=new L(e),this.fieldHelpTextComponent=new P(e)}getDropdownTitle({testId:e}){return this.fieldLabelComponent.getLabelText({testId:e})}isMandatory({testId:e}){return this.fieldLabelComponent.isMandatory({testId:e})}getHelpIconText({testId:e}){return this.fieldLabelComponent.getHelpIconText({testId:e})}hasExtraText({testId:e}){return this.fieldHelpTextComponent.hasExtraText({testId:e})}getExtraText({testId:e}){return this.fieldHelpTextComponent.getExtraText({testId:e})}hasExtraTextIconType({testId:e,type:o}){return this.fieldHelpTextComponent.hasExtraTextIconType({testId:e,type:o})}async getSelectedLabel({testId:e}){let i=await this.page.getByTestId(n(e,s.BUTTON_CONTENT)).textContent();if(await this.page.getByTestId(n(e,s.BUTTON_CONTENT_SUFFIX)).isVisible({timeout:1e3})){const u=await this.page.getByTestId(n(e,s.BUTTON_CONTENT_SUFFIX)).textContent();i=`${i}${u}`}return i}async searchForItem({testId:e,searchTerm:o}){return await this.openDropdownComponent({testId:e}),await this.page.getByTestId(n(e,r.FIELD)).fill(o),this.page.getByTestId(n(e,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}async isErrorText({testId:e}){return await this.page.getByTestId(n(e,C.TEXT)).count()>0}async isDisabled({testId:e}){return(await this.page.getByTestId(n(e,s.TRIGGER)).locator(".button__container--disabled")).isVisible()}isSelectAllChecked({testId:e}){return this.page.getByTestId(n(e,s.SELECT_ALL)).locator(".checkbox.input").isChecked()}isSelectAllIndeterminate({testId:e}){return this.page.getByTestId(n(e,s.SELECT_ALL)).locator(".icon.indeterminate").isVisible()}async removeChipSelection({testId:e}){await this.page.getByTestId(n(e,s.BUTTON_CLEAR)).click()}getDropdownOptions({testId:e}){return this.page.getByTestId(n(e,s.LIST_CONTAINER)).locator(".list").allTextContents()}}class J extends ${constructor(t){super(t)}getDropdownTitle({testId:t}){return this.page.getByTestId(n(t,s.WRAPPER)).locator("label > span").textContent()}getSelectedItem({testId:t}){return this.page.getByTestId(n(t,s.TRIGGER)).locator("button > span").textContent()}async searchForItem({testId:t,searchTerm:e}){return await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,O.FIELD)).fill(e),this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}}class Q{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${p.TRIGGER}']`;await this.page.waitForSelector(e)}async clickOnApply(t){await this.page.getByTestId(n(t,p.ACTION_APPLY)).click()}async clickOnCancel(t){await this.page.getByTestId(n(t,p.ACTION_CANCEL)).click()}async openIncludeExcludeComponent(t){await this.page.getByTestId(n(t,p.TRIGGER)).click()}async searchForItem({testId:t,searchTerm:e}){return await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.SEARCH)).locator("input.transparent").fill(e),this.page.getByTestId(n(t,p.LIST)).locator("ul > li .v-popper span").first().textContent()}async selectItemByName({testId:t,entityName:e}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.LIST)).locator("ul > li .v-popper span",{hasText:e}).first().click(),await this.clickOnApply(t)}async selectItemByIndex({testId:t,index:e,applyChanges:o}){await this.clearAll({testId:t}),await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.LIST)).locator(".include-exclude-list ul > li").nth(e).click(),await this.page.waitForSelector("include-exclude-list-header-loading",{state:"hidden"}),o&&await this.clickOnApply(t)}async selectMultipleItems({testId:t,itemsToSelect:e}){await this.clearAll({testId:t}),await this.openIncludeExcludeComponent(t);for(const o of e)await this.page.getByTestId(n(t,p.LIST)).locator(".include-exclude-list ul > li").nth(o).click()}async unselectItemByName({testId:t,entityName:e}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.LIST_SELECTED)).locator("ul > li",{hasText:e}).locator(".clear-button").click(),await this.clickOnApply(t)}async unselectByIndex({testId:t,index:e,applyChanges:o}){await this.page.getByTestId(n(t,p.LIST_SELECTED)).locator("ul li button").nth(e).click(),o&&await this.clickOnApply(t)}async getSelectedCounter(t){return await this.page.getByTestId(n(t,p.LIST_SELECTED)).locator(".include-exclude-selected-header-left span").textContent()}async clearAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.CLEAR_ALL)).click(),await this.clickOnApply(t)}getTriggerText({testId:t}){return this.page.getByTestId(n(t,p.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent()}getTriggerDescription({testId:t}){return this.page.getByTestId(n(t,p.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent()}async selectAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,p.SELECT_ALL)).click(),await this.clickOnApply(t)}}class H{constructor(t){l(this,"page");this.page=t}getInputsFieldText({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).getAttribute("placeholder")}getInputsType({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).getAttribute("type")}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,r.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,r.FIELD)).clear()}isDisabled({testId:t}){return this.page.getByTestId(n(t,r.FIELD)).isDisabled()}}class Z extends H{constructor(e){super(e);l(this,"fieldLabelComponent");l(this,"fieldHelpTextComponent");this.fieldLabelComponent=new L(e),this.fieldHelpTextComponent=new P(e)}getInputsLabelText({testId:e}){return this.fieldLabelComponent.getLabelText({testId:e})}async waitForComponent({testId:e}){const o=`[data-testid='${e}-${r.WRAPPER}']`;await this.page.waitForSelector(o)}isInputMandatory({testId:e}){return this.fieldLabelComponent.isMandatory({testId:e})}hasInputExtraText({testId:e}){return this.fieldHelpTextComponent.hasExtraText({testId:e})}getInputExtraText({testId:e}){return this.fieldHelpTextComponent.getExtraText({testId:e})}async clickOnApplyButton({testId:e}){await(await this.page.getByTestId(n(e,r.WRAPPER)).locator(".icon.icon-name--check")).click()}hasInlineErrorText({testId:e,inputTestId:o}){return this.page.getByTestId(n(e,o)).isVisible()}async getInlineErrorText({testId:e,inputTestId:o}){const i=this.page.getByTestId(n(e,o));return await i.hover(),i.getAttribute("text")}async clickOnShowPassword({testId:e}){await this.isPasswordHidden({testId:e})&&await this.clickOnPasswordIcon({testId:e})}async clickOnPasswordIcon({testId:e}){await this.page.getByTestId(n(e,r.TOGGLE_PASSWORD)).click()}async clickOnHidePassword({testId:e}){await this.isPasswordHidden({testId:e})||await this.clickOnPasswordIcon({testId:e})}isPasswordHidden({testId:e}){return this.page.getByTestId(n(e,r.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible()}async clearInput({testId:e}){await(await this.page.getByTestId(n(e,r.FIELD))).clear()}hasExtraTextIconType({testId:e,type:o}){return this.fieldHelpTextComponent.hasExtraTextIconType({testId:e,type:o})}async isDisabled({testId:e}){return(await this.page.getByTestId(n(e,r.FIELD))).isDisabled()}hasApplyButton({testId:e}){return this.page.getByTestId(n(e,r.WRAPPER)).locator(".icon.icon-name--check").isVisible()}async getMaxLengthNumber({testId:e}){return(await this.getFontCaptionText({testId:e}))[1]}async getActualNumberLength({testId:e}){return(await this.getFontCaptionText({testId:e}))[0]}async getFontCaptionText({testId:e}){return(await this.page.getByTestId(n(e,r.WRAPPER)).locator(".font-caption").textContent()).split("/").map(i=>parseInt(i.trim(),10))}getHelpIconText({testId:e}){return this.fieldLabelComponent.getHelpIconText({testId:e})}async isValidationAppear({testId:e}){return(await this.page.getByTestId(n(e,r.WRAPPER)).getAttribute("class")).includes("variant-error")}}class M{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${I.WRAPPER}']`;await this.page.waitForSelector(e)}getSelectedTabText({testId:t}){return this.page.getByTestId(n(t,I.WRAPPER)).locator(".tab-item--active").textContent()}async selectTab({testId:t,tabName:e}){const o=await this.getTabIndex({testId:t,tabName:e});await this.page.getByTestId(n(t,`${I.TAB}-${o+1}`)).click()}async getTabIndex({testId:t,tabName:e}){return(await this.page.getByTestId(n(t,I.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e)}async isTabDisabled({testId:t,tabName:e}){const o=await this.getTabIndex({testId:t,tabName:e});return this.page.getByTestId(n(t,`${I.TAB}-${o}`)).locator(".tab-item--disabled").isVisible()}}class tt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${S.TRIGGER}']`;await this.page.waitForSelector(e)}getTooltipText({testId:t}){return this.page.getByTestId(`${t}-${S.TRIGGER}`).getAttribute("text")}getTooltipHeaderText({testId:t}){return this.page.getByTestId(`${t}-${S.TRIGGER}`).getAttribute("header")}}const x=".table-row",k=".icon-wrapper",G=".states",D=".table-head-container",v=".table-row.loading",et=1e3;class at{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${T.CONTAINER}']`;await this.page.waitForSelector(e)}getTableRowCount({testId:t}){return this.page.getByTestId(n(t,T.BODY_WRAPPER)).locator(x).count()}async getColumnHeaders({testId:t}){return this.page.getByTestId(n(t,T.TABLE)).locator(D).allTextContents()}getTableLabel({testId:t}){return this.page.getByTestId(n(t,T.HEADER)).innerText()}getTableFooter({testId:t}){return this.page.getByTestId(n(t,T.CONTAINER)).locator(".table-footer").innerText()}async clickOnHeaderByName(t){await this.page.locator(D,{hasText:t}).click()}async searchForItems({testId:t,searchTerm:e}){await this.clearSearchText({testId:t}),await this.page.getByTestId(n(t,r.FIELD)).fill(e)}async clearSearchText({testId:t}){await this.page.getByTestId(n(t,r.FIELD)).clear(),await this.waitForTableToLoad()}isArrowVisible({testId:t,headerName:e}){return this.page.getByTestId(n(t,T.TABLE)).locator(D,{hasText:e}).locator(".table-sort-icon").isVisible()}async scrollDownTableRows({testId:t}){const e=`[data-testid=${n(t,T.TABLE)}]`;await this.page.focus(e),await this.page.evaluate(o=>{const i=document.querySelector(o);i&&(i.scrollTop=i.scrollHeight)},e),await this.page.waitForTimeout(et)}async waitForTableToLoad(){await this.page.waitForSelector(v,{state:"hidden"})}async waitingForTableLoadingToAppear(){await this.page.waitForSelector(v)}async expandRow({testId:t,rowValue:e}){await this.page.getByTestId(n(t,T.BODY_WRAPPER)).locator(x,{hasText:e}).locator(k).click()}isRowExpanded({testId:t,rowValue:e}){return this.page.getByTestId(n(t,T.BODY_WRAPPER)).locator(x,{hasText:e}).locator(k).isVisible()}async getExpandedRowContent({testId:t,rowValue:e}){return await this.isRowExpanded({testId:t,rowValue:e})||await this.expandRow({testId:t,rowValue:e}),this.page.getByTestId(n(t,T.BODY_WRAPPER)).locator(x,{hasText:e}).locator(k).textContent()}isEmptyStateVisible({testId:t}){return this.page.getByTestId(n(t,T.TABLE)).locator(".empty-state").isVisible()}getEmptyStateTitle({testId:t}){return this.page.getByTestId(n(t,T.TABLE)).locator(".font-heading-4.title").textContent()}getEmptyStateSubtitle({testId:t}){return this.page.getByTestId(n(t,T.TABLE)).locator(".font-body-1.subtitle").textContent()}async clickOnRowCheckboxByRowValue({testId:t,rowValue:e}){await this.page.getByTestId(n(t,T.TABLE)).locator(x,{hasText:e}).locator(G).click()}getCheckedRowsNumber({testId:t}){return this.page.getByTestId(n(t,T.TABLE)).locator(x).locator(".icon.checked").count()}async clickOnSelectAllCheckbox({testId:t}){await this.page.getByTestId(n(t,T.TABLE)).locator(G).nth(0).click()}getTableLocator({testId:t}){return this.page.getByTestId(n(t,T.CONTAINER))}getColumnContentByHeaderName({testId:t,headerName:e}){return this.getTableLocator({testId:t}).locator(e).allTextContents()}}class W{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}']`;await this.page.waitForSelector(e)}async clickOnButton({testId:t}){await this.page.click(`[data-testid='${t}']`)}async isButtonLoading({testId:t}){return(await this.page.getByTestId(t).getAttribute("class")).includes("loading")}async getButtonText({testId:t}){return this.page.getByTestId(t).locator(".font-button").textContent()}isButtonDisabled({testId:t}){return this.page.getByTestId(t).isDisabled()}}class nt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${w.CONTAINER}']`;await this.page.waitForSelector(e)}getSnackbarTitle({testId:t}){return this.page.getByTestId(n(t,w.TITLE)).textContent()}async closeSnackbar({testId:t}){await this.page.getByTestId(n(t,w.CLOSE)).locator(".icon-name--x").click()}async waitForSnackbarToBeClosed({testId:t}){const e=`[data-testid='${t}-${w.CONTAINER}']`;await this.page.waitForSelector(e,{state:"detached"})}getSnackbarDescription({testId:t}){return this.page.getByTestId(n(t,w.MESSAGE)).textContent()}async clickOnActionButton({testId:t,buttonName:e}){const o=await this.getActionButtonIndex({testId:t,buttonName:e}),i=`[data-testid='${t}-${w.ACTION_BUTTON}-${o}']`;await this.page.click(i)}async getActionButtonIndex({testId:t,buttonName:e}){return(await this.page.getByTestId(n(t,w.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e)}}class ot{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${A.WRAPPER}']`;await this.page.waitForSelector(e)}async closeMultiBar({testId:t}){await this.page.getByTestId(n(t,A.CLOSE_BTN)).locator(".icon-wrapper").click()}getMultiBarCountText({testId:t}){return this.page.getByTestId(n(t,A.WRAPPER)).locator(".count-text").textContent()}async isMultiBarVisible({testId:t}){return await this.page.waitForTimeout(1e3),this.page.getByTestId(n(t,A.WRAPPER)).locator(".multi-bar-panel").isVisible()}async clickOnActionButton({testId:t,actionButtonId:e}){await this.page.getByTestId(n(t,`${A.ACTION}-${e}`)).locator(".start-icon").click()}}class it{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${B.TEXT}']`;await this.page.waitForSelector(e)}getFormRowTitle({testId:t}){return new L(this.page).getLabelText({testId:t})}isFormRowMandatory({testId:t}){return new L(this.page).isMandatory({testId:t})}getIconText({testId:t}){return new P(this.page).getExtraText({testId:t})}}class st{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${m.CONTENT}']`;await this.page.waitForSelector(e)}getCardTitle({testId:t}){return this.page.getByTestId(n(t,m.TITLE)).textContent()}getCardContentText({testId:t}){return this.page.getByTestId(n(t,m.CONTENT)).textContent()}getCardLabelText({testId:t}){return new L(this.page).getLabelText({testId:t})}async clickOnSaveButton({testId:t}){await this.page.getByTestId(n(t,m.SAVE_BUTTON)).click()}async clickOnCancelButton({testId:t}){await this.page.getByTestId(n(t,m.CANCEL_BUTTON)).click()}isSaveButtonLoading({testId:t}){return new W(this.page).isButtonLoading({testId:t})}async clearForm({testId:t,inputType:e}){(await this.page.getByTestId(n(t,m.CONTENT)).locator(`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`).all()).forEach(i=>i.clear())}}class R extends H{constructor(t){super(t)}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${r.WRAPPER}']`;await this.page.waitForSelector(e)}async isViewOnly({testId:t}){return await this.page.getByTestId(n(t,r.WRAPPER)).locator(".view-only.input-type").count()>0}getLabel({testId:t}){return this.page.getByTestId(n(t,r.LABEL_TEXT)).textContent()}isInputMandatory({testId:t}){return this.page.getByTestId(n(t,r.MANDATORY)).isVisible()}hasInputExtraHelpText({testId:t}){return this.page.getByTestId(n(t,r.EXTRA_TEXT)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,r.LABEL_CONTAINER)).locator(".v-popper.v-popper--theme-default");return await e.hover(),e.getAttribute("text")}getInputExtraText({testId:t}){return this.page.getByTestId(n(t,r.EXTRA_TEXT)).textContent()}getErrorExtraText({testId:t}){return this.page.getByTestId(n(t,r.EXTRA_TEXT)).locator(".error").textContent()}async showPassword({testId:t}){await this.isPasswordHidden({testId:t})&&await this.clickOnPasswordButton({testId:t})}async isPasswordHidden({testId:t}){return await this.page.getByTestId(n(t,r.WRAPPER)).getAttribute("type")==="password"}async clickOnPasswordButton({testId:t}){await(await this.page.getByTestId(n(t,r.WRAPPER)).locator(".password-visibility")).click()}}class ct{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${O.CONTAINER}']`;await this.page.waitForSelector(e)}async searchInput({testId:t,searchTerm:e}){await new R(this.page).addInput({testId:t,text:e})}async clearInput({testId:t}){await new R(this.page).clearInput({testId:t})}async clickOnXButton({testId:t}){await this.page.getByTestId(n(t,O.CLEAR)).locator(".icon-name--x-circle").click()}isDisabled({testId:t}){return new R(this.page).isDisabled({testId:t})}getSearchPlaceholder({testId:t}){return new R(this.page).getPlaceholderText({testId:t})}getSearchInputValue({testId:t}){return new R(this.page).getInputsFieldText({testId:t})}}class V{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${F.TEXT}']`;await this.page.waitForSelector(e)}getInlineCopyText({testId:t}){return this.page.getByTestId(`${t}-${F.TEXT}`).textContent()}}class rt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${N.TITLE}']`;await this.page.waitForSelector(e)}getHeaderTitle({testId:t}){return this.page.getByTestId(`${t}-${N.TITLE}`).textContent()}getInlineCopyText({testId:t}){return new V(this.page).getInlineCopyText({testId:t})}async isIconPresent({testId:t,iconName:e}){return await this.page.getByTestId(`${t}-${N.APP_PLATFORM}`).getAttribute("data-platform")===e}}class lt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${y.WRAPPER}']`;await this.page.waitForSelector(e)}getAlertText({testId:t}){return this.page.getByTestId(n(t,y.MESSAGE)).textContent()}getAlertTitle({testId:t}){return this.page.getByTestId(n(t,y.TITLE)).textContent()}async clickOnActionButton({testId:t}){await this.page.click(n(t,y.ACTION_BUTTON))}getActionButtonText({testId:t}){return this.page.getByTestId(n(t,y.ACTION_BUTTON)).textContent()}async closeAlert({testId:t}){await this.page.getByTestId(n(t,y.CLOSE_BUTTON)).click()}async isAlertVisible({testId:t}){return await this.page.getByTestId(n(t,y.WRAPPER)).count()>0}getAlertIconType({testId:t}){return this.page.getByTestId(n(t,y.WRAPPER)).getAttribute("class")}}class pt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${E.FIELD}']`;await this.page.waitForSelector(e)}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,E.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,E.FIELD)).clear()}getInput({testId:t}){return this.page.getByTestId(n(t,E.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,E.FIELD)).getAttribute("placeholder")}isDisabled({testId:t}){return this.page.getByTestId(n(t,E.FIELD)).isDisabled()}}class gt extends pt{getLabelText({testId:t}){return this.page.getByTestId(n(t,B.TEXT)).textContent()}hasFieldHelpText({testId:t}){return this.page.getByTestId(n(t,C.CONTAINER)).isVisible()}getFieldHelpText({testId:t}){return this.page.getByTestId(n(t,C.CONTAINER)).textContent()}}class Tt extends f{constructor(t){super(t)}getDropdownTitle({testId:t}){return this.fieldLabelComponent.getLabelText({testId:t})}isMandatory({testId:t}){return this.fieldLabelComponent.isMandatory({testId:t})}getHelpIconText({testId:t}){return this.fieldLabelComponent.getHelpIconText({testId:t})}hasExtraText({testId:t}){return this.fieldHelpTextComponent.hasExtraText({testId:t})}getExtraText({testId:t}){return this.fieldHelpTextComponent.getExtraText({testId:t})}hasExtraTextIconType({testId:t,type:e}){return this.fieldHelpTextComponent.hasExtraTextIconType({testId:t,type:e})}getSelectedLabel({testId:t}){return this.page.getByTestId(n(t,s.BUTTON_CONTENT)).textContent()}async searchForItem({testId:t,searchTerm:e}){return await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,r.FIELD)).fill(e),this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}async isErrorText({testId:t}){return await this.page.getByTestId(n(t,C.TEXT)).count()>0}async isDisabled({testId:t}){return(await this.page.getByTestId(n(t,s.TRIGGER)).locator(".button__container--disabled")).isVisible()}async clearAllOptions({testId:t}){await this.page.getByTestId(n(t,s.ACTION_CLEAR_ALL)).click()}isSelectAllChecked({testId:t}){return this.page.getByTestId(n(t,s.SELECT_ALL)).locator(".checkbox.input").isChecked()}isSelectAllIndeterminate({testId:t}){return this.page.getByTestId(n(t,s.SELECT_ALL)).locator(".icon.indeterminate").isVisible()}async removeChipSelection({testId:t}){await this.page.getByTestId(n(t,s.BUTTON_CLEAR)).click()}getDropdownOptions({testId:t}){return this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator(".list").allTextContents()}async expandTreeNode({testId:t,nodeName:e}){const o=this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator(".item--multi",{hasText:e}).locator(".tree-main-arrow-wrapper");if(await o.isVisible())await o.click();else throw new Error(`Node with text "${e}" not found.`)}async selectTreeDropdownOptionByName({testId:t,node:e,item:o,shouldExpand:i=!1}){await this.openDropdownComponent({testId:t}),i&&await this.expandTreeNode({testId:t,nodeName:e});const g=this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator(`text=${o}`);if(await g.isVisible())await g.click();else throw new Error(`Option with text "${o}" not found in the dropdown.`)}async selectMultipleTreeItemsByName({testId:t,itemsToSelect:e,node:o}){await this.openDropdownComponent({testId:t});for(const i of e)await this.selectTreeDropdownOptionByName({testId:t,node:o,item:i,shouldExpand:!0});await this.clickOnApply({testId:t})}}const ht=".sortable-item";class ut{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${h.CONTAINER}']`;await this.page.waitForSelector(e)}async isComponentLoaded(t){const e=`[data-testid='${t}-${h.CONTAINER}']`;return this.page.isVisible(e)}async getItems(t){return this.page.getByTestId(n(t,h.CONTAINER)).locator(".sortable-item").allTextContents()}async sortItem(t,e,o){const i=await this.page.getByTestId(n(t,"sortable-list-item")),g=i.nth(e),u=i.nth(o);await g.dragTo(u)}async verifyOrder(t,e){return(await this.getItems(t)).every((i,g)=>i===e[g])}async getListItemLocator({testId:t,item:e,modifier:o}){return this.page.getByTestId(n(t,o)).locator(ht,{hasText:e})}async selectItem({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;await(await this.getListItemLocator({testId:t,item:e,modifier:i})).click()}async isItemSelected(t){return await this.page.locator(".sortable-item--selected",{hasText:t}).count()>0}async expandItem({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".expand-icon").click()}async selectChildItem({testId:t,item:e,childItem:o,isLockedItem:i}){await this.expandItem({testId:t,item:e,isLockedItem:i}),await this.page.locator("ul li span",{hasText:o}).click()}async isListOpened({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;return await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".child-list ul").count()>0}async isChildItemSelected(t){return await this.page.locator("ul li span",{hasText:t}).count()>0}async openItemMenu({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST;await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".item__menu button").click()}async selectMenuItem({testId:t,item:e,isLockedItem:o,menuItem:i}){await this.openItemMenu({testId:t,item:e,isLockedItem:o});const g=this.page.locator(".dropdown-list-wrapper");await g.locator("ul.list li",{hasText:i}).click(),await g.waitFor({state:"detached"})}async isMenuOpened(){return await this.page.locator(".dropdown-list-wrapper").count()>0}async dragAndDrop({testId:t,item:e,isLockedItem:o}){const i=o?h.LOCKED_LIST:h.DRAGGABLE_LIST,u=await(await this.getListItemLocator({testId:t,item:e,modifier:i})).locator(".item.drag-allowed").first().boundingBox();if(u){const U=u.x,X=u.y;await this.page.mouse.move(U,X),await this.page.mouse.down(),await this.page.mouse.move(U+20,X-20),await this.page.mouse.up()}}async getListOrder(){return(await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e,o,i)=>(e[i+1]=o,e),{})}async searchForItem({testId:t,searchTerm:e}){return await this.page.getByTestId(n(t,r.FIELD)).fill(e),this.page.getByTestId(n(t,h.CONTAINER)).locator("ul > li span").first().textContent()}async verifySearchResultDisplayed({testId:t,item:e}){const o=[],i=await this.page.getByTestId(n(t,h.CONTAINER)).all();let g;for(const u of i)g=await u.locator(".child-list span",{hasText:e}).count(),o.push(g>0);return o}async getSelectedItem(t){return this.page.getByTestId(n(t,h.CONTAINER)).locator(".sortable-item--selected").textContent()}}class dt{constructor(t){l(this,"page");this.page=t}async waitForComponent({testId:t}){const e=n(t,_.WRAPPER);await this.page.getByTestId(e).waitFor({state:"visible"})}async selectView({view:t,testId:e}){const o=`[text="${t}"]`;console.log(o);const i=n(e,_.WRAPPER);await(await this.page.getByTestId(i).locator(o)).click()}}c.AlertComponent=lt,c.AppHeaderComponent=rt,c.BannerComponent=j,c.ButtonComponent=W,c.ComponentBasePage=q,c.DialogComponent=z,c.DropdownComponent=f,c.DropdownComponentV3=J,c.FieldHelpTextComponent=P,c.FieldLabelComponent=L,c.FormCardComponent=st,c.FormRowComponent=it,c.IncludeExcludeComponent=Q,c.InlineCopyComponent=V,c.InputsComponent=Z,c.MultiBarComponent=ot,c.SearchComponent=ct,c.SnackbarComponent=nt,c.SortableListComponent=ut,c.SwitchComponent=dt,c.TableComponent=at,c.TabsComponent=M,c.TextAreaComponent=gt,c.TooltipComponent=tt,c.TreeDropdownComponent=Tt,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
@@ -12,8 +12,11 @@ export declare class BaseDropdownComponent {
12
12
  testId: string;
13
13
  }): Promise<void>;
14
14
  selectDropdownOptionByName({ testId, name, shouldOpen, }: SelectionByName): Promise<void>;
15
+ clearAllOptions({ testId }: {
16
+ testId: string;
17
+ }): Promise<void>;
15
18
  selectMultipleItemsByIndex({ testId, itemsToSelect }: SelectMultiple): Promise<void>;
16
- selectMultipleItemsByName({ testId, itemsToSelect, }: SelectMultipleByName): Promise<void>;
19
+ selectMultipleItemsByName({ testId, itemsToSelect, shouldClearAll, }: SelectMultipleByName): Promise<void>;
17
20
  clickOnApply({ testId }: {
18
21
  testId: string;
19
22
  }): Promise<void>;
@@ -35,9 +35,6 @@ export declare class DropdownComponent extends BaseDropdownComponent {
35
35
  isDisabled({ testId }: {
36
36
  testId: string;
37
37
  }): Promise<boolean>;
38
- clearAllOptions({ testId }: {
39
- testId: string;
40
- }): Promise<void>;
41
38
  isSelectAllChecked({ testId }: {
42
39
  testId: string;
43
40
  }): Promise<boolean>;
@@ -49,13 +49,15 @@ export declare class TreeDropdownComponent extends DropdownComponent {
49
49
  testId: string;
50
50
  nodeName: string;
51
51
  }): Promise<void>;
52
- selectTreeDropdownOptionByName({ testId, name, shouldExpand, }: {
52
+ selectTreeDropdownOptionByName({ testId, node, item, shouldExpand, }: {
53
53
  testId: string;
54
- name: string;
54
+ node: string;
55
+ item: string;
55
56
  shouldExpand?: boolean;
56
57
  }): Promise<void>;
57
- selectMultipleTreeItemsByName({ testId, itemsToSelect, }: {
58
+ selectMultipleTreeItemsByName({ testId, itemsToSelect, node, }: {
58
59
  testId: string;
60
+ node: string;
59
61
  itemsToSelect: string[];
60
62
  }): Promise<void>;
61
63
  }
@@ -10,10 +10,12 @@ export type SelectionByName = {
10
10
  export type SelectMultiple = {
11
11
  testId: string;
12
12
  itemsToSelect: number[];
13
+ shouldClearAll?: boolean;
13
14
  };
14
15
  export type SelectMultipleByName = {
15
16
  testId: string;
16
17
  itemsToSelect: string[];
18
+ shouldClearAll?: boolean;
17
19
  };
18
20
  export type DropdownOption = {
19
21
  mainText: string;
@@ -24,4 +24,5 @@ export declare class SortableListComponent {
24
24
  getListOrder(): Promise<{}>;
25
25
  searchForItem({ testId, searchTerm }: SearchItem): Promise<string>;
26
26
  verifySearchResultDisplayed({ testId, item }: SortableListItem): Promise<boolean[]>;
27
+ getSelectedItem(testId: string): Promise<string>;
27
28
  }
@@ -22,4 +22,6 @@ export declare class SortableListPage extends ComponentBasePage {
22
22
  getListOrder(): Promise<{}>;
23
23
  searchForItem(searchTerm: string): Promise<string>;
24
24
  verifySearchResultDisplayed(item: string): Promise<boolean[]>;
25
+ getGroups(): Promise<string[]>;
26
+ getSelectedItem(): Promise<string>;
25
27
  }
@@ -0,0 +1,3 @@
1
+ export declare const defaultTestId = "switch-default";
2
+ export declare const switchStoryId = "v4-components-inputs-switch--view-mode";
3
+ export declare const loadedPageSelector = ".switch";
@@ -0,0 +1,13 @@
1
+ import { Page } from '@playwright/test';
2
+ import { ViewOption } from './types.ts';
3
+ export declare class SwitchComponent {
4
+ readonly page: Page;
5
+ constructor(page: Page);
6
+ waitForComponent({ testId }: {
7
+ testId: string;
8
+ }): Promise<void>;
9
+ selectView({ view, testId }: {
10
+ view: ViewOption;
11
+ testId: string;
12
+ }): Promise<void>;
13
+ }
@@ -0,0 +1,10 @@
1
+ import { ComponentBasePage } from '../base-page/component-base-page.ts';
2
+ import { SwitchComponent } from './switch-component.ts';
3
+ import { Page } from '@playwright/test';
4
+ import { ViewOption } from './types.ts';
5
+ export declare class SwitchPage extends ComponentBasePage {
6
+ readonly component: SwitchComponent;
7
+ constructor(page: Page);
8
+ waitForComponent(): Promise<void>;
9
+ selectView(view: ViewOption): Promise<void>;
10
+ }
@@ -0,0 +1,4 @@
1
+ export declare enum ViewOption {
2
+ CHART = "Chart",
3
+ TABLE = "Table"
4
+ }
package/tests/index.d.ts CHANGED
@@ -28,3 +28,4 @@ export * from './components/alert/alert-component.ts';
28
28
  export * from './components/inputs/inputs-v4/text-area/text-area-component.ts';
29
29
  export * from './components/dropdown/dropdown-v4/treedropdown-component.ts';
30
30
  export * from './components/sortablelist/sortable-list-component.ts';
31
+ export * from './components/switch/switch-component.ts';
@@ -33,6 +33,10 @@ export declare enum BannerTestIdModifiers {
33
33
  WRAPPER = "banner-wrapper",
34
34
  CONTENT = "banner-content"
35
35
  }
36
+ export declare enum LinkTestIdModifiers {
37
+ WRAPPER = "link-wrapper",
38
+ ICON = "link-icon"
39
+ }
36
40
  export declare enum AlertTestIdModifiers {
37
41
  WRAPPER = "alert-wrapper",
38
42
  TITLE = "alert-title",