@ironsource/shared-ui-e2e 2.1.8-test.1 → 2.1.9

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(i,c){typeof exports=="object"&&typeof module<"u"?c(exports):typeof define=="function"&&define.amd?define(["exports"],c):(i=typeof globalThis<"u"?globalThis:i||self,c(i["shared-ui-e2e"]={}))})(this,function(i){"use strict";var rt=Object.defineProperty;var lt=(i,c,l)=>c in i?rt(i,c,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[c]=l;var r=(i,c,l)=>(lt(i,typeof c!="symbol"?c+"":c,l),l);var c=(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))(c||{}),l=(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_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))(l||{}),x=(a=>(a.WRAPPER="banner-wrapper",a.CONTENT="banner-content",a))(x||{}),u=(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))(u||{}),g=(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))(g||{}),s=(a=>(a.WRAPPER="input-wrapper",a.TOOLTIP="input-tooltip",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))(s||{}),d=(a=>(a.WRAPPER="ta-wrapper",a.LABEL="ta-label",a.FIELD="ta-field",a.TEXT="ta-text",a))(d||{}),R=(a=>(a.CONTAINER="search-container",a.FIELD="search-field",a.CLOSE="search-close",a.CLEAR="search-clear",a))(R||{}),p=(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))(p||{}),L=(a=>(a.TEXT="tt-text",a.TRIGGER="tt-trigger",a.HEADER="tt-header",a))(L||{}),E=(a=>(a.WRAPPER="tabs-wrapper",a.TAB="tabs-tab",a))(E||{}),w=(a=>(a.CONTAINER="field-label-container",a.TEXT="field-label-text",a.MANDATORY="field-label-mandatory",a.TOOLTIP="field-label-help-tooltip",a))(w||{}),y=(a=>(a.CONTAINER="field-help-text-container",a.TEXT="field-help-text-text",a.ICON="field-help-text-icon",a))(y||{}),h=(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))(h||{}),C=(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))(C||{}),b=(a=>(a.TITLE="ah-title",a.APP_KEY="ah-app-key",a.APP_PLATFORM="ah-app-platform",a.AB_ICON="ah-ab-icon",a))(b||{}),P=(a=>(a.TEXT="ic-text",a.COPY_BTN="ic-copy-btn",a))(P||{}),B=(a=>(a.WRAPPER="multibar-wrapper",a.CLOSE_BTN="multibar-close-button",a.MENU="multibar-menu",a.ACTION="multibar-action",a))(B||{});const W=(a,t)=>{const e=new URLSearchParams(a).toString();return t.includes("?")?`${t}${e}`:`${t}?${e}`},v=(a,t={})=>{const e=[];Object.entries(t).forEach(([st,ct])=>{e.push(`${st}:${ct}`)});const o={id:a,viewMode:"story",args:e.join(";")};return W(o,"iframe.html")},n=(a,t)=>`${a}-${t}`;class G{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${x.WRAPPER}']`;await this.page.waitForSelector(e)}getBannerText({testId:t}){return this.page.getByTestId(n(t,x.CONTENT)).textContent()}hasBannerType({testId:t,type:e}){return this.page.getByTestId(n(t,x.WRAPPER)).locator(`.icon.icon-name--${e}`)!==null}}class V{constructor(t){r(this,"page");r(this,"testId");r(this,"componentId");r(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(v(t.storyId||this.componentId,e)),await this.page.waitForSelector(this.loadedPageSelector)}}class U{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${g.WRAPPER}']`;await this.page.waitForSelector(e)}getDialogTitle({testId:t}){return this.page.getByTestId(n(t,g.HEADER)).textContent()}getDialogText({testId:t}){return this.page.getByTestId(n(t,g.CONTENT)).textContent()}async closeDialog({testId:t}){await(await this.page.getByTestId(n(t,g.ACTION_CLOSE))).click()}async clickOnPrimaryButton({testId:t}){await this.page.getByTestId(n(t,g.SAVE_BUTTON)).click()}async clickOnDefaultButton({testId:t}){await this.page.getByTestId(n(t,g.CANCEL_BUTTON)).click()}async clickOnDeleteButton({testId:t}){await(await this.page.getByTestId(n(t,g.ACTION_BUTTONS_WRAPPER)).locator(".danger")).click()}getDialogSubtitle({testId:t}){return this.page.getByTestId(n(t,g.HEADER_SECONDARY)).locator(".subtitle").textContent()}async isDialogVisible({testId:t}){return await this.page.waitForTimeout(1e3),(await this.page.getByTestId(n(t,g.WRAPPER))).isVisible()}async waitForDialogToClose(t){await this.page.waitForSelector(n(t,g.WRAPPER),{state:"hidden"})}}class _{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){await this.page.getByTestId(n(t,l.WRAPPER))}async selectDropdownOptionByIndex({testId:t,index:e}){await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,l.LIST_CONTAINER)).locator("ul > li").nth(e).click()}getDropdownButtonContent(t){return this.page.getByTestId(n(t,l.BUTTON_CONTENT)).textContent()}async openDropdownComponent({testId:t}){await this.page.getByTestId(n(t,l.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,l.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,l.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,l.LIST_CONTAINER)).locator("ul > li span",{hasText:o}).first().click()}async clickOnApply({testId:t}){await this.page.getByTestId(n(t,l.ACTION_APPLY)).click()}async clickOnCancel({testId:t}){await this.page.getByTestId(n(t,l.ACTION_CANCEL)).click()}async isValidationAppear({testId:t}){return(await this.page.getByTestId(n(t,l.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error")}}class A{constructor(t){r(this,"page");this.page=t}getLabelText({testId:t}){return this.page.getByTestId(n(t,w.TEXT)).textContent()}isMandatory({testId:t}){return this.page.getByTestId(n(t,w.MANDATORY)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,w.TOOLTIP));return await e.hover(),e.getAttribute("text")}}class O{constructor(t){r(this,"page");this.page=t}hasExtraText({testId:t}){return this.page.getByTestId(n(t,y.TEXT)).isVisible()}getExtraText({testId:t}){return this.page.getByTestId(n(t,y.TEXT)).textContent()}async hasExtraTextIconType({testId:t,type:e}){return await(await this.page.getByTestId(n(t,y.CONTAINER)).locator(`.icon.icon-name--${e}`)).count()!==0}}class f extends _{constructor(e){super(e);r(this,"fieldLabelComponent");r(this,"fieldHelpTextComponent");this.fieldLabelComponent=new A(e),this.fieldHelpTextComponent=new O(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})}getSelectedLabel({testId:e}){return this.page.getByTestId(n(e,l.BUTTON_CONTENT)).textContent()}async searchForItem({testId:e,searchTerm:o}){return await this.openDropdownComponent({testId:e}),await this.page.getByTestId(n(e,s.FIELD)).fill(o),this.page.getByTestId(n(e,l.LIST_CONTAINER)).locator("ul > li span").first().textContent()}async isErrorText({testId:e}){return await this.page.getByTestId(n(e,y.TEXT)).count()>0}async isDisabled({testId:e}){return(await this.page.getByTestId(n(e,l.TRIGGER)).locator(".button__container--disabled")).isVisible()}async clearAllOptions({testId:e}){await this.page.getByTestId(n(e,l.ACTION_CLEAR_ALL)).click()}isSelectAllChecked({testId:e}){return this.page.getByTestId(n(e,l.SELECT_ALL)).locator(".checkbox.input").isChecked()}isSelectAllIndeterminate({testId:e}){return this.page.getByTestId(n(e,l.SELECT_ALL)).locator(".icon.indeterminate").isVisible()}async removeChipSelection({testId:e}){await this.page.getByTestId(n(e,l.BUTTON_CLEAR)).click()}getDropdownOptions({testId:e}){return this.page.getByTestId(n(e,l.LIST_CONTAINER)).locator(".list").allTextContents()}}class X extends _{constructor(t){super(t)}getDropdownTitle({testId:t}){return this.page.getByTestId(n(t,l.WRAPPER)).locator("label > span").textContent()}getSelectedItem({testId:t}){return this.page.getByTestId(n(t,l.TRIGGER)).locator("button > span").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,l.LIST_CONTAINER)).locator("ul > li span").first().textContent()}}class Y{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${c.TRIGGER}']`;await this.page.waitForSelector(e)}async clickOnApply(t){await this.page.getByTestId(n(t,c.ACTION_APPLY)).click()}async clickOnCancel(t){await this.page.getByTestId(n(t,c.ACTION_CANCEL)).click()}async openIncludeExcludeComponent(t){await this.page.getByTestId(n(t,c.TRIGGER)).click()}async searchForItem({testId:t,searchTerm:e}){return await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,c.SEARCH)).locator("input.transparent").fill(e),this.page.getByTestId(n(t,c.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,c.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,c.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,c.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,c.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,c.LIST_SELECTED)).locator("ul li button").nth(e).click(),o&&await this.clickOnApply(t)}async getSelectedCounter(t){return await this.page.getByTestId(n(t,c.LIST_SELECTED)).locator(".include-exclude-selected-header-left span").textContent()}async clearAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,c.CLEAR_ALL)).click(),await this.clickOnApply(t)}getTriggerText({testId:t}){return this.page.getByTestId(n(t,c.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent()}getTriggerDescription({testId:t}){return this.page.getByTestId(n(t,c.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent()}async selectAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,c.SELECT_ALL)).click(),await this.clickOnApply(t)}}class F{constructor(t){r(this,"page");this.page=t}getInputsFieldText({testId:t}){return this.page.getByTestId(n(t,s.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,s.FIELD)).getAttribute("placeholder")}getInputsType({testId:t}){return this.page.getByTestId(n(t,s.FIELD)).getAttribute("type")}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,s.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,s.FIELD)).clear()}isDisabled({testId:t}){return this.page.getByTestId(n(t,s.FIELD)).isDisabled()}}class j extends F{constructor(e){super(e);r(this,"fieldLabelComponent");r(this,"fieldHelpTextComponent");this.fieldLabelComponent=new A(e),this.fieldHelpTextComponent=new O(e)}getInputsLabelText({testId:e}){return this.fieldLabelComponent.getLabelText({testId:e})}async waitForComponent({testId:e}){const o=`[data-testid='${e}-${s.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,s.WRAPPER)).locator(".icon.icon-name--check")).click()}hasInlineErrorText({testId:e}){return this.page.getByTestId(n(e,s.TOOLTIP)).isVisible()}async getInlineErrorText({testId:e}){const o=await this.page.getByTestId(n(e,s.TOOLTIP));return await o.hover(),o.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,s.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,s.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible()}async clearInput({testId:e}){await(await this.page.getByTestId(n(e,s.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,s.FIELD))).isDisabled()}hasApplyButton({testId:e}){return this.page.getByTestId(n(e,s.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,s.WRAPPER)).locator(".font-caption").textContent()).split("/").map(T=>parseInt(T.trim(),10))}getHelpIconText({testId:e}){return this.fieldLabelComponent.getHelpIconText({testId:e})}async isValidationAppear({testId:e}){return(await this.page.getByTestId(n(e,s.WRAPPER)).getAttribute("class")).includes("variant-error")}}class K{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${E.WRAPPER}']`;await this.page.waitForSelector(e)}getSelectedTabText({testId:t}){return this.page.getByTestId(n(t,E.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,`${E.TAB}-${o+1}`)).click()}async getTabIndex({testId:t,tabName:e}){return(await this.page.getByTestId(n(t,E.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,`${E.TAB}-${o}`)).locator(".tab-item--disabled").isVisible()}}class q{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${L.TRIGGER}']`;await this.page.waitForSelector(e)}getTooltipText({testId:t}){return this.page.getByTestId(`${t}-${L.TRIGGER}`).getAttribute("text")}getTooltipHeaderText({testId:t}){return this.page.getByTestId(`${t}-${L.TRIGGER}`).getAttribute("header")}}const I=".table-row",S=".icon-wrapper",k=".states",N=".table-head-container",$=".table-row.loading",z=1e3;class J{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${p.CONTAINER}']`;await this.page.waitForSelector(e)}getTableRowCount({testId:t}){return this.page.getByTestId(n(t,p.BODY_WRAPPER)).locator(I).count()}async getColumnHeaders({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(N).allTextContents()}getTableLabel({testId:t}){return this.page.getByTestId(n(t,p.HEADER)).innerText()}getTableFooter({testId:t}){return this.page.getByTestId(n(t,p.CONTAINER)).locator(".table-footer").innerText()}async clickOnHeaderByName(t){await this.page.locator(N,{hasText:t}).click()}async searchForItems({testId:t,searchTerm:e}){await this.clearSearchText({testId:t}),await this.page.getByTestId(n(t,s.FIELD)).fill(e)}async clearSearchText({testId:t}){await this.page.getByTestId(n(t,s.FIELD)).clear(),await this.waitForTableToLoad()}isArrowVisible({testId:t,headerName:e}){return this.page.getByTestId(n(t,p.TABLE)).locator(N,{hasText:e}).locator(".table-sort-icon").isVisible()}async scrollDownTableRows({testId:t}){const e=`[data-testid=${n(t,p.TABLE)}]`;await this.page.focus(e),await this.page.evaluate(o=>{const T=document.querySelector(o);T&&(T.scrollTop=T.scrollHeight)},e),await this.page.waitForTimeout(z)}async waitForTableToLoad(){await this.page.waitForSelector($,{state:"hidden"})}async waitingForTableLoadingToAppear(){await this.page.waitForSelector($)}async expandRow({testId:t,rowValue:e}){await this.page.getByTestId(n(t,p.BODY_WRAPPER)).locator(I,{hasText:e}).locator(S).click()}isRowExpanded({testId:t,rowValue:e}){return this.page.getByTestId(n(t,p.BODY_WRAPPER)).locator(I,{hasText:e}).locator(S).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,p.BODY_WRAPPER)).locator(I,{hasText:e}).locator(S).textContent()}isEmptyStateVisible({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(".empty-state").isVisible()}getEmptyStateTitle({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(".font-heading-4.title").textContent()}getEmptyStateSubtitle({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(".font-body-1.subtitle").textContent()}async clickOnRowCheckboxByRowValue({testId:t,rowValue:e}){await this.page.getByTestId(n(t,p.TABLE)).locator(I,{hasText:e}).locator(k).click()}getCheckedRowsNumber({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(I).locator(".icon.checked").count()}async clickOnSelectAllCheckbox({testId:t}){await this.page.getByTestId(n(t,p.TABLE)).locator(k).nth(0).click()}getTableLocator({testId:t}){return this.page.getByTestId(n(t,p.CONTAINER))}getColumnContentByHeaderName({testId:t,headerName:e}){return this.getTableLocator({testId:t}).locator(e).allTextContents()}}class D{constructor(t){r(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 Q{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${h.CONTAINER}']`;await this.page.waitForSelector(e)}getSnackbarTitle({testId:t}){return this.page.getByTestId(n(t,h.TITLE)).textContent()}async closeSnackbar({testId:t}){await this.page.getByTestId(n(t,h.CLOSE)).locator(".icon-name--x").click()}async waitForSnackbarToBeClosed({testId:t}){const e=`[data-testid='${t}-${h.CONTAINER}']`;await this.page.waitForSelector(e,{state:"detached"})}getSnackbarDescription({testId:t}){return this.page.getByTestId(n(t,h.MESSAGE)).textContent()}async clickOnActionButton({testId:t,buttonName:e}){const o=await this.getActionButtonIndex({testId:t,buttonName:e}),T=`[data-testid='${t}-${h.ACTION_BUTTON}-${o}']`;await this.page.click(T)}async getActionButtonIndex({testId:t,buttonName:e}){return(await this.page.getByTestId(n(t,h.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e)}}class Z{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${B.WRAPPER}']`;await this.page.waitForSelector(e)}async closeMultiBar({testId:t}){await this.page.getByTestId(n(t,B.CLOSE_BTN)).locator(".icon-wrapper").click()}getMultiBarCountText({testId:t}){return this.page.getByTestId(n(t,B.WRAPPER)).locator(".count-text").textContent()}async isMultiBarVisible({testId:t}){return await this.page.waitForTimeout(1e3),this.page.getByTestId(n(t,B.WRAPPER)).locator(".multi-bar-panel").isVisible()}async clickOnActionButton({testId:t,actionButtonId:e}){await this.page.getByTestId(n(t,`${B.ACTION}-${e}`)).locator(".start-icon").click()}}class M{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${w.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 O(this.page).getExtraText({testId:t})}}class tt{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${C.CONTENT}']`;await this.page.waitForSelector(e)}getCardTitle({testId:t}){return this.page.getByTestId(n(t,C.TITLE)).textContent()}getCardContentText({testId:t}){return this.page.getByTestId(n(t,C.CONTENT)).textContent()}getCardLabelText({testId:t}){return new A(this.page).getLabelText({testId:t})}async clickOnSaveButton({testId:t}){await this.page.getByTestId(n(t,C.SAVE_BUTTON)).click()}async clickOnCancelButton({testId:t}){await this.page.getByTestId(n(t,C.CANCEL_BUTTON)).click()}isSaveButtonLoading({testId:t}){return new D(this.page).isButtonLoading({testId:t})}async clearForm({testId:t,inputType:e}){(await this.page.getByTestId(n(t,C.CONTENT)).locator(`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`).all()).forEach(T=>T.clear())}}class m extends F{constructor(t){super(t)}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${s.WRAPPER}']`;await this.page.waitForSelector(e)}async isViewOnly({testId:t}){return await this.page.getByTestId(n(t,s.WRAPPER)).locator(".view-only.input-type").count()>0}getLabel({testId:t}){return this.page.getByTestId(n(t,s.LABEL_TEXT)).textContent()}isInputMandatory({testId:t}){return this.page.getByTestId(n(t,s.MANDATORY)).isVisible()}hasInputExtraHelpText({testId:t}){return this.page.getByTestId(n(t,s.EXTRA_TEXT)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,s.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,s.EXTRA_TEXT)).textContent()}getErrorExtraText({testId:t}){return this.page.getByTestId(n(t,s.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,s.WRAPPER)).getAttribute("type")==="password"}async clickOnPasswordButton({testId:t}){await(await this.page.getByTestId(n(t,s.WRAPPER)).locator(".password-visibility")).click()}}class et{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${R.CONTAINER}']`;await this.page.waitForSelector(e)}async searchInput({testId:t,searchTerm:e}){await new m(this.page).addInput({testId:t,text:e})}async clearInput({testId:t}){await new m(this.page).clearInput({testId:t})}async clickOnXButton({testId:t}){await this.page.getByTestId(n(t,R.CLEAR)).locator(".icon-name--x-circle").click()}isDisabled({testId:t}){return new m(this.page).isDisabled({testId:t})}getSearchPlaceholder({testId:t}){return new m(this.page).getPlaceholderText({testId:t})}getSearchInputValue({testId:t}){return new m(this.page).getInputsFieldText({testId:t})}}class H{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${P.TEXT}']`;await this.page.waitForSelector(e)}getInlineCopyText({testId:t}){return this.page.getByTestId(`${t}-${P.TEXT}`).textContent()}}class at{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${b.TITLE}']`;await this.page.waitForSelector(e)}getHeaderTitle({testId:t}){return this.page.getByTestId(`${t}-${b.TITLE}`).textContent()}getInlineCopyText({testId:t}){return new H(this.page).getInlineCopyText({testId:t})}async isIconPresent({testId:t,iconName:e}){return await this.page.getByTestId(`${t}-${b.APP_PLATFORM}`).getAttribute("data-platform")===e}}class nt{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${u.WRAPPER}']`;await this.page.waitForSelector(e)}getAlertText({testId:t}){return this.page.getByTestId(n(t,u.MESSAGE)).textContent()}getAlertTitle({testId:t}){return this.page.getByTestId(n(t,u.TITLE)).textContent()}async clickOnActionButton({testId:t}){await this.page.click(n(t,u.ACTION_BUTTON))}getActionButtonText({testId:t}){return this.page.getByTestId(n(t,u.ACTION_BUTTON)).textContent()}async closeAlert({testId:t}){await this.page.getByTestId(n(t,u.CLOSE_BUTTON)).click()}async isAlertVisible({testId:t}){return await this.page.getByTestId(n(t,u.WRAPPER)).count()>0}getAlertIconType({testId:t}){return this.page.getByTestId(n(t,u.WRAPPER)).getAttribute("class")}}class ot{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${d.FIELD}']`;await this.page.waitForSelector(e)}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,d.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,d.FIELD)).clear()}getInput({testId:t}){return this.page.getByTestId(n(t,d.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,d.FIELD)).getAttribute("placeholder")}isDisabled({testId:t}){return this.page.getByTestId(n(t,d.FIELD)).isDisabled()}}class it extends ot{getLabelText({testId:t}){return this.page.getByTestId(n(t,w.TEXT)).textContent()}hasFieldHelpText({testId:t}){return this.page.getByTestId(n(t,y.CONTAINER)).isVisible()}getFieldHelpText({testId:t}){return this.page.getByTestId(n(t,y.CONTAINER)).textContent()}}i.AlertComponent=nt,i.AppHeaderComponent=at,i.BannerComponent=G,i.ButtonComponent=D,i.ComponentBasePage=V,i.DialogComponent=U,i.DropdownComponent=f,i.DropdownComponentV3=X,i.FieldHelpTextComponent=O,i.FieldLabelComponent=A,i.FormCardComponent=tt,i.FormRowComponent=M,i.IncludeExcludeComponent=Y,i.InlineCopyComponent=H,i.InputsComponent=j,i.MultiBarComponent=Z,i.SearchComponent=et,i.SnackbarComponent=Q,i.TableComponent=J,i.TabsComponent=K,i.TextAreaComponent=it,i.TooltipComponent=q,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
1
+ (function(s,l){typeof exports=="object"&&typeof module<"u"?l(exports):typeof define=="function"&&define.amd?define(["exports"],l):(s=typeof globalThis<"u"?globalThis:s||self,l(s["shared-ui-e2e"]={}))})(this,function(s){"use strict";var gt=Object.defineProperty;var Tt=(s,l,i)=>l in s?gt(s,l,{enumerable:!0,configurable:!0,writable:!0,value:i}):s[l]=i;var c=(s,l,i)=>(Tt(s,typeof l!="symbol"?l+"":l,i),i);var l=(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))(l||{}),i=(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_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))(i||{}),L=(a=>(a.WRAPPER="banner-wrapper",a.CONTENT="banner-content",a))(L||{}),d=(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))(d||{}),T=(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))(T||{}),r=(a=>(a.WRAPPER="input-wrapper",a.TOOLTIP="input-tooltip",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||{}),y=(a=>(a.WRAPPER="ta-wrapper",a.LABEL="ta-label",a.FIELD="ta-field",a.TEXT="ta-text",a))(y||{}),R=(a=>(a.CONTAINER="search-container",a.FIELD="search-field",a.CLOSE="search-close",a.CLEAR="search-clear",a))(R||{}),p=(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))(p||{}),b=(a=>(a.TEXT="tt-text",a.TRIGGER="tt-trigger",a.HEADER="tt-header",a))(b||{}),E=(a=>(a.WRAPPER="tabs-wrapper",a.TAB="tabs-tab",a))(E||{}),w=(a=>(a.CONTAINER="field-label-container",a.TEXT="field-label-text",a.MANDATORY="field-label-mandatory",a.TOOLTIP="field-label-help-tooltip",a))(w||{}),h=(a=>(a.CONTAINER="field-help-text-container",a.TEXT="field-help-text-text",a.ICON="field-help-text-icon",a))(h||{}),u=(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))(u||{}),C=(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))(C||{}),O=(a=>(a.TITLE="ah-title",a.APP_KEY="ah-app-key",a.APP_PLATFORM="ah-app-platform",a.AB_ICON="ah-ab-icon",a))(O||{}),S=(a=>(a.TEXT="ic-text",a.COPY_BTN="ic-copy-btn",a))(S||{}),B=(a=>(a.WRAPPER="multibar-wrapper",a.CLOSE_BTN="multibar-close-button",a.MENU="multibar-menu",a.ACTION="multibar-action",a))(B||{}),P=(a=>(a.CONTAINER="sortable-list-container",a.DRAGGABLE_LIST="sortable-list-draggable-list",a.LOCKED_LIST="sortable-list-locked-list",a))(P||{});const V=(a,t)=>{const e=new URLSearchParams(a).toString();return t.includes("?")?`${t}${e}`:`${t}?${e}`},U=(a,t={})=>{const e=[];Object.entries(t).forEach(([x,k])=>{e.push(`${x}:${k}`)});const o={id:a,viewMode:"story",args:e.join(";")};return V(o,"iframe.html")},n=(a,t)=>`${a}-${t}`;class X{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${L.WRAPPER}']`;await this.page.waitForSelector(e)}getBannerText({testId:t}){return this.page.getByTestId(n(t,L.CONTENT)).textContent()}hasBannerType({testId:t,type:e}){return this.page.getByTestId(n(t,L.WRAPPER)).locator(`.icon.icon-name--${e}`)!==null}}class Y{constructor(t){c(this,"page");c(this,"testId");c(this,"componentId");c(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(U(t.storyId||this.componentId,e)),await this.page.waitForSelector(this.loadedPageSelector)}}class j{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${T.WRAPPER}']`;await this.page.waitForSelector(e)}getDialogTitle({testId:t}){return this.page.getByTestId(n(t,T.HEADER)).textContent()}getDialogText({testId:t}){return this.page.getByTestId(n(t,T.CONTENT)).textContent()}async closeDialog({testId:t}){await(await this.page.getByTestId(n(t,T.ACTION_CLOSE))).click()}async clickOnPrimaryButton({testId:t}){await this.page.getByTestId(n(t,T.SAVE_BUTTON)).click()}async clickOnDefaultButton({testId:t}){await this.page.getByTestId(n(t,T.CANCEL_BUTTON)).click()}async clickOnDeleteButton({testId:t}){await(await this.page.getByTestId(n(t,T.ACTION_BUTTONS_WRAPPER)).locator(".danger")).click()}getDialogSubtitle({testId:t}){return this.page.getByTestId(n(t,T.HEADER_SECONDARY)).locator(".subtitle").textContent()}async isDialogVisible({testId:t}){return await this.page.waitForTimeout(1e3),(await this.page.getByTestId(n(t,T.WRAPPER))).isVisible()}async waitForDialogToClose(t){await this.page.waitForSelector(n(t,T.WRAPPER),{state:"hidden"})}}class D{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){await this.page.getByTestId(n(t,i.WRAPPER))}async selectDropdownOptionByIndex({testId:t,index:e}){await this.openDropdownComponent({testId:t}),await this.page.getByTestId(n(t,i.LIST_CONTAINER)).locator("ul > li").nth(e).click()}getDropdownButtonContent(t){return this.page.getByTestId(n(t,i.BUTTON_CONTENT)).textContent()}async openDropdownComponent({testId:t}){await this.page.getByTestId(n(t,i.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,i.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,i.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,i.LIST_CONTAINER)).locator("ul > li span",{hasText:o}).first().click()}async clickOnApply({testId:t}){await this.page.getByTestId(n(t,i.ACTION_APPLY)).click()}async clickOnCancel({testId:t}){await this.page.getByTestId(n(t,i.ACTION_CANCEL)).click()}async isValidationAppear({testId:t}){return(await this.page.getByTestId(n(t,i.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error")}}class I{constructor(t){c(this,"page");this.page=t}getLabelText({testId:t}){return this.page.getByTestId(n(t,w.TEXT)).textContent()}isMandatory({testId:t}){return this.page.getByTestId(n(t,w.MANDATORY)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,w.TOOLTIP));return await e.hover(),e.getAttribute("text")}}class N{constructor(t){c(this,"page");this.page=t}hasExtraText({testId:t}){return this.page.getByTestId(n(t,h.TEXT)).isVisible()}getExtraText({testId:t}){return this.page.getByTestId(n(t,h.TEXT)).textContent()}async hasExtraTextIconType({testId:t,type:e}){return await(await this.page.getByTestId(n(t,h.CONTAINER)).locator(`.icon.icon-name--${e}`)).count()!==0}}class $ extends D{constructor(e){super(e);c(this,"fieldLabelComponent");c(this,"fieldHelpTextComponent");this.fieldLabelComponent=new I(e),this.fieldHelpTextComponent=new N(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})}getSelectedLabel({testId:e}){return this.page.getByTestId(n(e,i.BUTTON_CONTENT)).textContent()}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,i.LIST_CONTAINER)).locator("ul > li span").first().textContent()}async isErrorText({testId:e}){return await this.page.getByTestId(n(e,h.TEXT)).count()>0}async isDisabled({testId:e}){return(await this.page.getByTestId(n(e,i.TRIGGER)).locator(".button__container--disabled")).isVisible()}async clearAllOptions({testId:e}){await this.page.getByTestId(n(e,i.ACTION_CLEAR_ALL)).click()}isSelectAllChecked({testId:e}){return this.page.getByTestId(n(e,i.SELECT_ALL)).locator(".checkbox.input").isChecked()}isSelectAllIndeterminate({testId:e}){return this.page.getByTestId(n(e,i.SELECT_ALL)).locator(".icon.indeterminate").isVisible()}async removeChipSelection({testId:e}){await this.page.getByTestId(n(e,i.BUTTON_CLEAR)).click()}getDropdownOptions({testId:e}){return this.page.getByTestId(n(e,i.LIST_CONTAINER)).locator(".list").allTextContents()}}class K extends D{constructor(t){super(t)}getDropdownTitle({testId:t}){return this.page.getByTestId(n(t,i.WRAPPER)).locator("label > span").textContent()}getSelectedItem({testId:t}){return this.page.getByTestId(n(t,i.TRIGGER)).locator("button > span").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,i.LIST_CONTAINER)).locator("ul > li span").first().textContent()}}class q{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${l.TRIGGER}']`;await this.page.waitForSelector(e)}async clickOnApply(t){await this.page.getByTestId(n(t,l.ACTION_APPLY)).click()}async clickOnCancel(t){await this.page.getByTestId(n(t,l.ACTION_CANCEL)).click()}async openIncludeExcludeComponent(t){await this.page.getByTestId(n(t,l.TRIGGER)).click()}async searchForItem({testId:t,searchTerm:e}){return await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,l.SEARCH)).locator("input.transparent").fill(e),this.page.getByTestId(n(t,l.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,l.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,l.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,l.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,l.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,l.LIST_SELECTED)).locator("ul li button").nth(e).click(),o&&await this.clickOnApply(t)}async getSelectedCounter(t){return await this.page.getByTestId(n(t,l.LIST_SELECTED)).locator(".include-exclude-selected-header-left span").textContent()}async clearAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,l.CLEAR_ALL)).click(),await this.clickOnApply(t)}getTriggerText({testId:t}){return this.page.getByTestId(n(t,l.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent()}getTriggerDescription({testId:t}){return this.page.getByTestId(n(t,l.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent()}async selectAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,l.SELECT_ALL)).click(),await this.clickOnApply(t)}}class H{constructor(t){c(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);c(this,"fieldLabelComponent");c(this,"fieldHelpTextComponent");this.fieldLabelComponent=new I(e),this.fieldHelpTextComponent=new N(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}){return this.page.getByTestId(n(e,r.TOOLTIP)).isVisible()}async getInlineErrorText({testId:e}){const o=await this.page.getByTestId(n(e,r.TOOLTIP));return await o.hover(),o.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(g=>parseInt(g.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 J{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${E.WRAPPER}']`;await this.page.waitForSelector(e)}getSelectedTabText({testId:t}){return this.page.getByTestId(n(t,E.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,`${E.TAB}-${o+1}`)).click()}async getTabIndex({testId:t,tabName:e}){return(await this.page.getByTestId(n(t,E.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,`${E.TAB}-${o}`)).locator(".tab-item--disabled").isVisible()}}class Q{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${b.TRIGGER}']`;await this.page.waitForSelector(e)}getTooltipText({testId:t}){return this.page.getByTestId(`${t}-${b.TRIGGER}`).getAttribute("text")}getTooltipHeaderText({testId:t}){return this.page.getByTestId(`${t}-${b.TRIGGER}`).getAttribute("header")}}const A=".table-row",_=".icon-wrapper",W=".states",F=".table-head-container",f=".table-row.loading",Z=1e3;class M{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${p.CONTAINER}']`;await this.page.waitForSelector(e)}getTableRowCount({testId:t}){return this.page.getByTestId(n(t,p.BODY_WRAPPER)).locator(A).count()}async getColumnHeaders({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(F).allTextContents()}getTableLabel({testId:t}){return this.page.getByTestId(n(t,p.HEADER)).innerText()}getTableFooter({testId:t}){return this.page.getByTestId(n(t,p.CONTAINER)).locator(".table-footer").innerText()}async clickOnHeaderByName(t){await this.page.locator(F,{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,p.TABLE)).locator(F,{hasText:e}).locator(".table-sort-icon").isVisible()}async scrollDownTableRows({testId:t}){const e=`[data-testid=${n(t,p.TABLE)}]`;await this.page.focus(e),await this.page.evaluate(o=>{const g=document.querySelector(o);g&&(g.scrollTop=g.scrollHeight)},e),await this.page.waitForTimeout(Z)}async waitForTableToLoad(){await this.page.waitForSelector(f,{state:"hidden"})}async waitingForTableLoadingToAppear(){await this.page.waitForSelector(f)}async expandRow({testId:t,rowValue:e}){await this.page.getByTestId(n(t,p.BODY_WRAPPER)).locator(A,{hasText:e}).locator(_).click()}isRowExpanded({testId:t,rowValue:e}){return this.page.getByTestId(n(t,p.BODY_WRAPPER)).locator(A,{hasText:e}).locator(_).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,p.BODY_WRAPPER)).locator(A,{hasText:e}).locator(_).textContent()}isEmptyStateVisible({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(".empty-state").isVisible()}getEmptyStateTitle({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(".font-heading-4.title").textContent()}getEmptyStateSubtitle({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(".font-body-1.subtitle").textContent()}async clickOnRowCheckboxByRowValue({testId:t,rowValue:e}){await this.page.getByTestId(n(t,p.TABLE)).locator(A,{hasText:e}).locator(W).click()}getCheckedRowsNumber({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(A).locator(".icon.checked").count()}async clickOnSelectAllCheckbox({testId:t}){await this.page.getByTestId(n(t,p.TABLE)).locator(W).nth(0).click()}getTableLocator({testId:t}){return this.page.getByTestId(n(t,p.CONTAINER))}getColumnContentByHeaderName({testId:t,headerName:e}){return this.getTableLocator({testId:t}).locator(e).allTextContents()}}class v{constructor(t){c(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 tt{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${u.CONTAINER}']`;await this.page.waitForSelector(e)}getSnackbarTitle({testId:t}){return this.page.getByTestId(n(t,u.TITLE)).textContent()}async closeSnackbar({testId:t}){await this.page.getByTestId(n(t,u.CLOSE)).locator(".icon-name--x").click()}async waitForSnackbarToBeClosed({testId:t}){const e=`[data-testid='${t}-${u.CONTAINER}']`;await this.page.waitForSelector(e,{state:"detached"})}getSnackbarDescription({testId:t}){return this.page.getByTestId(n(t,u.MESSAGE)).textContent()}async clickOnActionButton({testId:t,buttonName:e}){const o=await this.getActionButtonIndex({testId:t,buttonName:e}),g=`[data-testid='${t}-${u.ACTION_BUTTON}-${o}']`;await this.page.click(g)}async getActionButtonIndex({testId:t,buttonName:e}){return(await this.page.getByTestId(n(t,u.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e)}}class et{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${B.WRAPPER}']`;await this.page.waitForSelector(e)}async closeMultiBar({testId:t}){await this.page.getByTestId(n(t,B.CLOSE_BTN)).locator(".icon-wrapper").click()}getMultiBarCountText({testId:t}){return this.page.getByTestId(n(t,B.WRAPPER)).locator(".count-text").textContent()}async isMultiBarVisible({testId:t}){return await this.page.waitForTimeout(1e3),this.page.getByTestId(n(t,B.WRAPPER)).locator(".multi-bar-panel").isVisible()}async clickOnActionButton({testId:t,actionButtonId:e}){await this.page.getByTestId(n(t,`${B.ACTION}-${e}`)).locator(".start-icon").click()}}class at{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${w.TEXT}']`;await this.page.waitForSelector(e)}getFormRowTitle({testId:t}){return new I(this.page).getLabelText({testId:t})}isFormRowMandatory({testId:t}){return new I(this.page).isMandatory({testId:t})}getIconText({testId:t}){return new N(this.page).getExtraText({testId:t})}}class nt{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${C.CONTENT}']`;await this.page.waitForSelector(e)}getCardTitle({testId:t}){return this.page.getByTestId(n(t,C.TITLE)).textContent()}getCardContentText({testId:t}){return this.page.getByTestId(n(t,C.CONTENT)).textContent()}getCardLabelText({testId:t}){return new I(this.page).getLabelText({testId:t})}async clickOnSaveButton({testId:t}){await this.page.getByTestId(n(t,C.SAVE_BUTTON)).click()}async clickOnCancelButton({testId:t}){await this.page.getByTestId(n(t,C.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,C.CONTENT)).locator(`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`).all()).forEach(g=>g.clear())}}class m 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 ot{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${R.CONTAINER}']`;await this.page.waitForSelector(e)}async searchInput({testId:t,searchTerm:e}){await new m(this.page).addInput({testId:t,text:e})}async clearInput({testId:t}){await new m(this.page).clearInput({testId:t})}async clickOnXButton({testId:t}){await this.page.getByTestId(n(t,R.CLEAR)).locator(".icon-name--x-circle").click()}isDisabled({testId:t}){return new m(this.page).isDisabled({testId:t})}getSearchPlaceholder({testId:t}){return new m(this.page).getPlaceholderText({testId:t})}getSearchInputValue({testId:t}){return new m(this.page).getInputsFieldText({testId:t})}}class G{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${S.TEXT}']`;await this.page.waitForSelector(e)}getInlineCopyText({testId:t}){return this.page.getByTestId(`${t}-${S.TEXT}`).textContent()}}class it{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${O.TITLE}']`;await this.page.waitForSelector(e)}getHeaderTitle({testId:t}){return this.page.getByTestId(`${t}-${O.TITLE}`).textContent()}getInlineCopyText({testId:t}){return new G(this.page).getInlineCopyText({testId:t})}async isIconPresent({testId:t,iconName:e}){return await this.page.getByTestId(`${t}-${O.APP_PLATFORM}`).getAttribute("data-platform")===e}}class st{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${d.WRAPPER}']`;await this.page.waitForSelector(e)}getAlertText({testId:t}){return this.page.getByTestId(n(t,d.MESSAGE)).textContent()}getAlertTitle({testId:t}){return this.page.getByTestId(n(t,d.TITLE)).textContent()}async clickOnActionButton({testId:t}){await this.page.click(n(t,d.ACTION_BUTTON))}getActionButtonText({testId:t}){return this.page.getByTestId(n(t,d.ACTION_BUTTON)).textContent()}async closeAlert({testId:t}){await this.page.getByTestId(n(t,d.CLOSE_BUTTON)).click()}async isAlertVisible({testId:t}){return await this.page.getByTestId(n(t,d.WRAPPER)).count()>0}getAlertIconType({testId:t}){return this.page.getByTestId(n(t,d.WRAPPER)).getAttribute("class")}}class rt{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${y.FIELD}']`;await this.page.waitForSelector(e)}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,y.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,y.FIELD)).clear()}getInput({testId:t}){return this.page.getByTestId(n(t,y.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,y.FIELD)).getAttribute("placeholder")}isDisabled({testId:t}){return this.page.getByTestId(n(t,y.FIELD)).isDisabled()}}class ct extends rt{getLabelText({testId:t}){return this.page.getByTestId(n(t,w.TEXT)).textContent()}hasFieldHelpText({testId:t}){return this.page.getByTestId(n(t,h.CONTAINER)).isVisible()}getFieldHelpText({testId:t}){return this.page.getByTestId(n(t,h.CONTAINER)).textContent()}}class lt 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,i.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,i.LIST_CONTAINER)).locator("ul > li span").first().textContent()}async isErrorText({testId:t}){return await this.page.getByTestId(n(t,h.TEXT)).count()>0}async isDisabled({testId:t}){return(await this.page.getByTestId(n(t,i.TRIGGER)).locator(".button__container--disabled")).isVisible()}async clearAllOptions({testId:t}){await this.page.getByTestId(n(t,i.ACTION_CLEAR_ALL)).click()}isSelectAllChecked({testId:t}){return this.page.getByTestId(n(t,i.SELECT_ALL)).locator(".checkbox.input").isChecked()}isSelectAllIndeterminate({testId:t}){return this.page.getByTestId(n(t,i.SELECT_ALL)).locator(".icon.indeterminate").isVisible()}async removeChipSelection({testId:t}){await this.page.getByTestId(n(t,i.BUTTON_CLEAR)).click()}getDropdownOptions({testId:t}){return this.page.getByTestId(n(t,i.LIST_CONTAINER)).locator(".list").allTextContents()}async expandTreeNode({testId:t,nodeName:e}){const o=this.page.getByTestId(n(t,i.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 g=this.page.getByTestId(n(t,i.LIST_CONTAINER)).locator(`text=${e}`);if(await g.isVisible())await g.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})}}class pt{constructor(t){c(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${P.CONTAINER}']`;await this.page.waitForSelector(e)}async isComponentLoaded(t){const e=`[data-testid='${t}-${P.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 g=await this.page.getByTestId(n(t,"sortable-list-item")),x=g.nth(e),k=g.nth(o);await x.dragTo(k)}async verifyOrder(t,e){return(await this.getItems(t)).every((g,x)=>g===e[x])}}s.AlertComponent=st,s.AppHeaderComponent=it,s.BannerComponent=X,s.ButtonComponent=v,s.ComponentBasePage=Y,s.DialogComponent=j,s.DropdownComponent=$,s.DropdownComponentV3=K,s.FieldHelpTextComponent=N,s.FieldLabelComponent=I,s.FormCardComponent=nt,s.FormRowComponent=at,s.IncludeExcludeComponent=q,s.InlineCopyComponent=G,s.InputsComponent=z,s.MultiBarComponent=et,s.SearchComponent=ot,s.SnackbarComponent=tt,s.SortableListComponent=pt,s.TableComponent=M,s.TabsComponent=J,s.TextAreaComponent=ct,s.TooltipComponent=Q,s.TreeDropdownComponent=lt,Object.defineProperty(s,Symbol.toStringTag,{value:"Module"})});
@@ -6,7 +6,7 @@ export declare class BaseDropdownComponent {
6
6
  waitForComponent({ testId }: {
7
7
  testId: string;
8
8
  }): Promise<void>;
9
- selectDropdownOptionByIndex({ testId, index }: SelectionByIndex): Promise<void>;
9
+ selectDropdownOptionByIndex({ testId, index, }: SelectionByIndex): Promise<void>;
10
10
  getDropdownButtonContent(testId: string): Promise<string>;
11
11
  openDropdownComponent({ testId }: {
12
12
  testId: string;
@@ -3,3 +3,8 @@ export declare const defaultTestId = "dropdown-default";
3
3
  export declare const loadedPageSelector = "[data-testid='dropdown-default-dd-trigger']";
4
4
  export declare const chipMultiStoryId = "v4-components-dropdown-triggers-chip--multi-selection";
5
5
  export declare const chipSingleStoryId = "v4-components-dropdown-triggers-chip--single-selection";
6
+ export declare const twoLinesStoryId = "v4-components-dropdown-singleselection--two-lines-options";
7
+ export declare const treeDropdownStoryId = "v4-components-dropdown-treedropdown--basic";
8
+ export declare const treeDropdownTestId = "tree-dropdown-default";
9
+ export declare const treeLoadedPageSelector = "[data-testid='tree-dropdown-default-dd-trigger']";
10
+ export declare const childOptions: string[];
@@ -6,8 +6,8 @@ type SearchItem = {
6
6
  searchTerm: string;
7
7
  };
8
8
  export declare class DropdownComponent extends BaseDropdownComponent {
9
- private readonly fieldLabelComponent;
10
- private readonly fieldHelpTextComponent;
9
+ protected readonly fieldLabelComponent: any;
10
+ protected readonly fieldHelpTextComponent: any;
11
11
  constructor(page: Page);
12
12
  getDropdownTitle({ testId }: {
13
13
  testId: string;
@@ -2,7 +2,7 @@ import { Page } from '@playwright/test';
2
2
  import { DropdownComponent } from './dropdown-component';
3
3
  import { ComponentBasePage } from '../../base-page/component-base-page';
4
4
  export declare class DropdownPage extends ComponentBasePage {
5
- readonly component: DropdownComponent;
5
+ component: DropdownComponent;
6
6
  constructor(page: Page);
7
7
  selectDropdownOptionByIndex(index: number): Promise<void>;
8
8
  getSelectedLabel(): Promise<string>;
@@ -0,0 +1,61 @@
1
+ import { Page } from '@playwright/test';
2
+ import { DropdownComponent } from './dropdown-component';
3
+ import { SearchItem } from '../../includeExclude/types.ts';
4
+ import { HasHelpTextTypeParams } from '../../fieldHelpText/types.ts';
5
+ export declare class TreeDropdownComponent extends DropdownComponent {
6
+ constructor(page: Page);
7
+ getDropdownTitle({ testId }: {
8
+ testId: string;
9
+ }): any;
10
+ isMandatory({ testId }: {
11
+ testId: string;
12
+ }): any;
13
+ getHelpIconText({ testId }: {
14
+ testId: string;
15
+ }): any;
16
+ hasExtraText({ testId }: {
17
+ testId: string;
18
+ }): any;
19
+ getExtraText({ testId }: {
20
+ testId: string;
21
+ }): any;
22
+ hasExtraTextIconType({ testId, type }: HasHelpTextTypeParams): any;
23
+ getSelectedLabel({ testId }: {
24
+ testId: string;
25
+ }): Promise<string>;
26
+ searchForItem({ testId, searchTerm }: SearchItem): Promise<string>;
27
+ isErrorText({ testId }: {
28
+ testId: string;
29
+ }): Promise<boolean>;
30
+ isDisabled({ testId }: {
31
+ testId: string;
32
+ }): Promise<boolean>;
33
+ clearAllOptions({ testId }: {
34
+ testId: string;
35
+ }): Promise<void>;
36
+ isSelectAllChecked({ testId }: {
37
+ testId: string;
38
+ }): Promise<boolean>;
39
+ isSelectAllIndeterminate({ testId }: {
40
+ testId: string;
41
+ }): Promise<boolean>;
42
+ removeChipSelection({ testId }: {
43
+ testId: string;
44
+ }): Promise<void>;
45
+ getDropdownOptions({ testId }: {
46
+ testId: string;
47
+ }): Promise<string[]>;
48
+ expandTreeNode({ testId, nodeName, }: {
49
+ testId: string;
50
+ nodeName: string;
51
+ }): Promise<void>;
52
+ selectTreeDropdownOptionByName({ testId, name, shouldExpand, }: {
53
+ testId: string;
54
+ name: string;
55
+ shouldExpand?: boolean;
56
+ }): Promise<void>;
57
+ selectMultipleTreeItemsByName({ testId, itemsToSelect, }: {
58
+ testId: string;
59
+ itemsToSelect: string[];
60
+ }): Promise<void>;
61
+ }
@@ -0,0 +1,13 @@
1
+ import { Page } from '@playwright/test';
2
+ import { DropdownPage } from './dropdown-page.ts';
3
+ export declare class TreeDropdownPage extends DropdownPage {
4
+ constructor(page: Page);
5
+ selectDropdownOptionByIndex(index: number): Promise<void>;
6
+ getSelectedLabel(): Promise<string>;
7
+ getDropdownTitle(): Promise<any>;
8
+ selectDropdownOptionByName(name: string): Promise<void>;
9
+ selectMultipleItems(itemsToSelect: number[], applyChanges?: boolean): Promise<void>;
10
+ searchForItem(searchTerm: string): Promise<string>;
11
+ selectMultipleItemsByName(itemsToSelect: string[]): Promise<void>;
12
+ expandTreeNode(nodeName: string): Promise<void>;
13
+ }
@@ -15,3 +15,7 @@ export type SelectMultipleByName = {
15
15
  testId: string;
16
16
  itemsToSelect: string[];
17
17
  };
18
+ export type DropdownOption = {
19
+ mainText: string;
20
+ captionText: string;
21
+ };
@@ -1,4 +1,5 @@
1
1
  export declare const textAreaStoryId = "v4-components-inputs-textarea--basic";
2
+ export declare const textAreaWithMaxLengthStoryId = "v4-components-inputs-textarea--with-max-length";
2
3
  export declare const helpTextTextAreaStoryId = "v4-components-inputs-textarea--helper-text";
3
4
  export declare const defaultTestId = "text-area-default";
4
5
  export declare const loadedPageSelector = "[data-testid='text-area-default-ta-field']";
@@ -17,4 +17,5 @@ export declare class TextAreaPage extends ComponentBasePage {
17
17
  hasFieldHelpText(): Promise<boolean>;
18
18
  getFieldHelpText(): Promise<string>;
19
19
  waitForComponent(): Promise<void>;
20
+ getCounterText(): Promise<string>;
20
21
  }
@@ -0,0 +1,4 @@
1
+ export declare const sortableStoryId = "v4-components-sortablelist--basic";
2
+ export declare const advancedSortableStoryId = "v4-components-sortablelist--advanced";
3
+ export declare const defaultTestId = "sortablelist-default";
4
+ export declare const loadedPageSelector = "[data-testid='sortablelist-default-sortable-list-container']";
@@ -0,0 +1,12 @@
1
+ import { Page } from '@playwright/test';
2
+ export declare class SortableListComponent {
3
+ readonly page: Page;
4
+ constructor(page: Page);
5
+ waitForComponent({ testId }: {
6
+ testId: string;
7
+ }): Promise<void>;
8
+ isComponentLoaded(testId: string): Promise<boolean>;
9
+ getItems(testId: string): Promise<string[]>;
10
+ sortItem(testId: string, sourceIndex: number, targetIndex: number): Promise<void>;
11
+ verifyOrder(testId: string, expectedOrder: string[]): Promise<boolean>;
12
+ }
@@ -0,0 +1,11 @@
1
+ import { Page } from '@playwright/test';
2
+ import { ComponentBasePage } from '../base-page/component-base-page';
3
+ import { SortableListComponent } from './sortable-list-component.ts';
4
+ export declare class SortableListPage extends ComponentBasePage {
5
+ readonly component: SortableListComponent;
6
+ constructor(page: Page);
7
+ waitForComponent(): Promise<void>;
8
+ sortItem(testId: string, sourceIndex: number, targetIndex: number): Promise<void>;
9
+ verifyOrder(testId: string, expectedOrder: string[]): Promise<boolean>;
10
+ navigate(url: string): Promise<void>;
11
+ }
@@ -1,4 +1,9 @@
1
1
  import { ComponentParams } from './types';
2
+ import { Locator, Page } from '@playwright/test';
2
3
  export declare const addPropsToUrl: (props: ComponentParams, url: string) => string;
3
4
  export declare const createStoryBookComponentPath: (componentId: string, componentParams?: ComponentParams) => string;
4
5
  export declare const getTestId: (testId: string, testIdModifier: string) => string;
6
+ export declare function dragAndDrop(page: Page, dragLocator: Locator, dropLocator: Locator, targetPosition?: {
7
+ x: number;
8
+ y: number;
9
+ }): Promise<void>;
package/tests/index.d.ts CHANGED
@@ -26,3 +26,5 @@ export * from './components/formRow/form-row-component.ts';
26
26
  export * from './components/inlineCopy/inline-copy-component.ts';
27
27
  export * from './components/alert/alert-component.ts';
28
28
  export * from './components/inputs/inputs-v4/text-area/text-area-component.ts';
29
+ export * from './components/dropdown/dropdown-v4/treedropdown-component.ts';
30
+ export * from './components/sortablelist/sortable-list-component.ts';
@@ -89,6 +89,11 @@ export declare enum SearchTestIdModifiers {
89
89
  CLOSE = "search-close",
90
90
  CLEAR = "search-clear"
91
91
  }
92
+ export declare enum SortableTestIdModifiers {
93
+ CONTAINER = "sortable-list-container",
94
+ LIST = "sortable-list-draggable-list",
95
+ LOCKED_LIST = "sortable-list-locked-list"
96
+ }
92
97
  export declare enum TableTestIdModifiers {
93
98
  CONTAINER = "tbl-container",
94
99
  TABLE = "tbl-table",