@ironsource/shared-ui-e2e 2.1.3-rc.9 → 2.1.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/shared-e2e-commands.js +406 -293
- package/shared-e2e-commands.umd.cjs +1 -2
- package/tests/components/alert/alert-component.d.ts +29 -0
- package/tests/components/alert/alert-page.d.ts +15 -0
- package/tests/components/alert/consts.d.ts +3 -0
- package/tests/components/appHeader/app-header-component.d.ts +18 -0
- package/tests/components/appHeader/app-header-page.d.ts +11 -0
- package/tests/components/appHeader/consts.d.ts +3 -0
- package/tests/components/button/button-component.d.ts +9 -0
- package/tests/components/button/button-page.d.ts +3 -0
- package/tests/components/dropdown/base-dropdown.d.ts +2 -1
- package/tests/components/dropdown/dropdown-v4/consts.d.ts +2 -0
- package/tests/components/dropdown/dropdown-v4/dropdown-component.d.ts +3 -0
- package/tests/components/dropdown/dropdown-v4/dropdown-page.d.ts +1 -0
- package/tests/components/dropdown/types.d.ts +1 -0
- package/tests/components/formCard/consts.d.ts +3 -0
- package/tests/components/formCard/form-card-component.d.ts +30 -0
- package/tests/components/formCard/form-card-page.d.ts +13 -0
- package/tests/components/formRow/consts.d.ts +3 -0
- package/tests/components/formRow/form-row-component.d.ts +17 -0
- package/tests/components/formRow/form-row-page.d.ts +10 -0
- package/tests/components/inlineCopy/consts.d.ts +3 -0
- package/tests/components/inlineCopy/inline-copy-component.d.ts +11 -0
- package/tests/components/inlineCopy/inline-copy-page.d.ts +9 -0
- package/tests/components/inputs/input-v4/inputs-component.d.ts +2 -2
- package/tests/components/inputs/input-v4/inputs-page.d.ts +3 -2
- package/tests/components/inputs/types.d.ts +1 -1
- package/tests/components/search/consts.d.ts +3 -0
- package/tests/components/search/search-component.d.ts +25 -0
- package/tests/components/search/search-page.d.ts +14 -0
- package/tests/components/table/table-component.d.ts +11 -29
- package/tests/components/table/table-page.d.ts +4 -16
- package/tests/components/table/types.d.ts +10 -2
- package/tests/global/types.d.ts +4 -0
- package/tests/index.d.ts +11 -0
- package/tests/testids/index.d.ts +5 -2
- package/tsconfig.tsbuildinfo +1 -1
|
@@ -1,2 +1 @@
|
|
|
1
|
-
(function(c,i){typeof exports=="object"&&typeof module<"u"?i(exports):typeof define=="function"&&define.amd?define(["exports"],i):(c=typeof globalThis<"u"?globalThis:c||self,i(c["shared-ui-e2e"]={}))})(this,function(c){"use strict";var U=Object.defineProperty;var Y=(c,i,s)=>i in c?U(c,i,{enumerable:!0,configurable:!0,writable:!0,value:s}):c[i]=s;var r=(c,i,s)=>(Y(c,typeof i!="symbol"?i+"":i,s),s);var i=(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))(i||{}),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_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||{}),w=(a=>(a.WRAPPER="banner-wrapper",a.CONTENT="banner-content",a))(w||{}),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||{}),p=(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))(p||{}),m=(a=>(a.CONTAINER="search-container",a.FIELD="search-field",a.CLOSE="search-close",a.CLEAR="search-clear",a))(m||{}),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))(g||{}),C=(a=>(a.TEXT="tt-text",a.TRIGGER="tt-trigger",a.HEADER="tt-header",a))(C||{}),d=(a=>(a.WRAPPER="tabs-wrapper",a.TAB="tabs-tab",a))(d||{}),E=(a=>(a.CONTAINER="field-label-container",a.TEXT="field-label-text",a.MANDATORY="field-label-mandatory",a.TOOLTIP="field-label-help-tooltip",a))(E||{}),B=(a=>(a.CONTAINER="field-help-text-container",a.TEXT="field-help-text-text",a.ICON="field-help-text-icon",a))(B||{}),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||{}),y=(a=>(a.WRAPPER="multibar-wrapper",a.CLOSE_BTN="multibar-close-button",a.MENU="multibar-menu",a.ACTION="multibar-action",a))(y||{});const O=(a,t)=>{const e=new URLSearchParams(a).toString();return t.includes("?")?`${t}${e}`:`${t}?${e}`},L=(a,t={})=>{const e=[];Object.entries(t).forEach(([h,R])=>{e.push(`${h}:${R}`)});const o={id:a,viewMode:"story",args:e.join(";")};return O(o,"iframe.html")},n=(a,t)=>`${a}-${t}`;class P{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${w.WRAPPER}']`;await this.page.waitForSelector(e)}getBannerText({testId:t}){return this.page.getByTestId(n(t,w.CONTENT)).textContent()}hasBannerType({testId:t,type:e}){return this.page.getByTestId(n(t,w.WRAPPER)).locator(`.icon.icon-name--${e}`)!==null}}class S{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(L(t.storyId||this.componentId,e)),await this.page.waitForSelector(this.loadedPageSelector)}}class N{constructor(t){r(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)).locator(".font-heading-3").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(await this.page.getByTestId(n(t,T.ACTION_BUTTONS_WRAPPER)).locator(".primary")).click()}async clickOnDefaultButton({testId:t}){await(await this.page.getByTestId(n(t,T.ACTION_BUTTONS_WRAPPER)).locator(".default")).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)).locator(".subtitle").textContent()}async isDialogVisible({testId:t}){return await this.page.waitForTimeout(1e3),(await this.page.getByTestId(n(t,T.WRAPPER))).isVisible()}}class b{constructor(t){r(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()}async openDropdownComponent({testId:t}){await this.page.getByTestId(n(t,s.TRIGGER)).click({position:{x:10,y:10}})}async selectDropdownOptionByName({testId:t,name:e}){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()}}class x{constructor(t){r(this,"page");this.page=t}getLabelText({testId:t}){return this.page.getByTestId(n(t,E.TEXT)).textContent()}isMandatory({testId:t}){return this.page.getByTestId(n(t,E.MANDATORY)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,E.TOOLTIP));return await e.hover(),e.getAttribute("text")}}class I{constructor(t){r(this,"page");this.page=t}hasExtraText({testId:t}){return this.page.getByTestId(n(t,B.TEXT)).isVisible()}getExtraText({testId:t}){return this.page.getByTestId(n(t,B.TEXT)).textContent()}async hasExtraTextIconType({testId:t,type:e}){return await(await this.page.getByTestId(n(t,B.CONTAINER)).locator(`.icon.icon-name--${e}`)).count()!==0}}class k extends b{constructor(e){super(e);r(this,"fieldLabelComponent");r(this,"fieldHelpTextComponent");this.fieldLabelComponent=new x(e),this.fieldHelpTextComponent=new I(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,s.BUTTON_CONTENT)).textContent()}async searchForItem({testId:e,searchTerm:o}){return await this.openDropdownComponent({testId:e}),await this.page.getByTestId(n(e,p.FIELD)).fill(o),this.page.getByTestId(n(e,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}isErrorText({testId:e}){return this.page.getByTestId(n(e,s.TRIGGER)).locator(".state-error").isVisible()}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()}}class _ extends b{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,m.FIELD)).fill(e),this.page.getByTestId(n(t,s.LIST_CONTAINER)).locator("ul > li span").first().textContent()}}class F{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${i.TRIGGER}']`;await this.page.waitForSelector(e)}async clickOnApply(t){await this.page.getByTestId(n(t,i.ACTION_APPLY)).click()}async clickOnCancel(t){await this.page.getByTestId(n(t,i.ACTION_CANCEL)).click()}async openIncludeExcludeComponent(t){await this.page.getByTestId(n(t,i.TRIGGER)).click()}async searchForItem({testId:t,searchTerm:e}){return await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,i.SEARCH)).locator("input.transparent").fill(e),this.page.getByTestId(n(t,i.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,i.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,i.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,i.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,i.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,i.LIST_SELECTED)).locator("ul li button").nth(e).click(),o&&await this.clickOnApply(t)}async getSelectedCounter(t){return await this.page.getByTestId(n(t,i.LIST_SELECTED)).locator(".include-exclude-selected-header-left span").textContent()}async clearAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,i.CLEAR_ALL)).click(),await this.clickOnApply(t)}getTriggerText({testId:t}){return this.page.getByTestId(n(t,i.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent()}getTriggerDescription({testId:t}){return this.page.getByTestId(n(t,i.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent()}async selectAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,i.SELECT_ALL)).click(),await this.clickOnApply(t)}}class D{constructor(t){r(this,"page");this.page=t}getInputsFieldText({testId:t}){return this.page.getByTestId(n(t,p.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,p.FIELD)).getAttribute("placeholder")}getInputsType({testId:t}){return this.page.getByTestId(n(t,p.FIELD)).getAttribute("type")}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,p.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,p.FIELD)).clear()}isDisabled({testId:t}){return this.page.getByTestId(n(t,p.FIELD)).isDisabled()}}class H extends D{constructor(e){super(e);r(this,"fieldLabelComponent");r(this,"fieldHelpTextComponent");this.fieldLabelComponent=new x(e),this.fieldHelpTextComponent=new I(e)}getInputsLabelText({testId:e}){return this.fieldLabelComponent.getLabelText({testId:e})}async waitForComponent({testId:e}){const o=`[data-testid='${e}-${p.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,p.WRAPPER)).locator(".icon.icon-name--check")).click()}hasInlineErrorText({testId:e}){return this.page.getByTestId(n(e,p.TOOLTIP)).isVisible()}async getInlineErrorText({testId:e}){const o=await this.page.getByTestId(n(e,p.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,p.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,p.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible()}async clearInput({testId:e}){const o=await this.page.getByTestId(n(e,p.FIELD));await o.click({clickCount:2}),await o.type("")}hasExtraTextIconType({testId:e,type:o}){return this.fieldHelpTextComponent.hasExtraTextIconType({testId:e,type:o})}async isDisabled({testId:e}){return(await this.page.getByTestId(n(e,p.FIELD))).isDisabled()}hasApplyButton({testId:e}){return this.page.getByTestId(n(e,p.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,p.WRAPPER)).locator(".font-caption").textContent()).split("/").map(l=>parseInt(l.trim(),10))}getHelpIconText({testId:e}){return this.fieldLabelComponent.getHelpIconText({testId:e})}}class ${constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${d.WRAPPER}']`;await this.page.waitForSelector(e)}getSelectedTabText({testId:t}){return this.page.getByTestId(n(t,d.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,`${d.TAB}-${o+1}`)).click()}async getTabIndex({testId:t,tabName:e}){return(await this.page.getByTestId(n(t,d.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,`${d.TAB}-${o}`)).locator(".tab-item--disabled").isVisible()}}class G{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${C.TRIGGER}']`;await this.page.waitForSelector(e)}getTooltipText({testId:t}){return this.page.getByTestId(`${t}-${C.TRIGGER}`).getAttribute("text")}getTooltipHeaderText({testId:t}){return this.page.getByTestId(`${t}-${C.TRIGGER}`).getAttribute("header")}}class W{constructor(t){r(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(".table-row").count()}getTableRowContentByIndex({testId:t,index:e}){try{return this.page.getByTestId(`${t}-${g.BODY_WRAPPER}`).locator(".table-row").nth(e).innerText()}catch(o){throw console.error(o),new Error(o)}}async getTableRowsByRowValue({testId:t,rowHeader:e,rowValue:o}){const l=await this.getRowIndicesByRowValue({testId:t,rowHeader:e,rowValue:o}),h=[];for(const R of l){const A=await this.getTableRowContentByIndex({testId:t,index:R});h.push(A)}return h}async getRowIndicesByRowValue({testId:t,rowHeader:e,rowValue:o}){const l=await this.getColumnValuesByHeader({testId:t,header:e});return this.getIndicesOf(o,l)}getIndicesOf(t,e){const o=[];for(let l=0;l<e.length;l++)e[l]===t&&o.push(l);return o}async getColumnValuesByHeader({header:t,testId:e}){const o=await this.getColumnIndexByHeader({testId:e,header:t});return this.getColumnValuesByIndex({testId:e,index:o})}async getColumnIndexByHeader({header:t,testId:e}){return(await this.getColumnHeaders({testId:e})).indexOf(t)}async getColumnValuesByIndex({index:t,testId:e}){const o=[],l=await this.getTableRowCount({testId:e});for(let h=0;h<l;h++){const A=(await this.getTableRowContentByIndex({testId:e,index:h})).split(`
|
|
2
|
-
`)[t];o.push(A)}return o}async getColumnHeaders({testId:t}){return this.page.getByTestId(n(t,g.TABLE)).locator(".table-head-container").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 clickOnSortByHeaderName({testId:t,headerName:e}){await this.clickOnHeaderByName({testId:t,headerName:e})}async clickOnHeaderByName({testId:t,headerName:e}){const o=await this.getColumnIndexByHeader({testId:t,header:e});await this.page.getByTestId(n(t,g.TABLE)).locator(".table-head-container").nth(o).click()}async searchForItems({testId:t,searchTerm:e}){await this.clearSearchText({testId:t}),await this.page.getByTestId(n(t,p.FIELD)).fill(e)}async clearSearchText({testId:t}){await this.page.getByTestId(n(t,p.FIELD)).clear()}async isArrowVisible({testId:t,headerName:e}){const o=await this.getColumnIndexByHeader({header:e,testId:t});return this.page.getByTestId(n(t,g.TABLE)).locator(".table-head-container").nth(o).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 l=document.querySelector(o);l&&(l.scrollTop=l.scrollHeight)},e),await this.waitForTableToLoad()}async waitForTableToLoad(){await this.page.waitForSelector(".table-row.loading",{state:"hidden"})}async expandRow({testId:t,headerName:e,rowValue:o}){const l=await this.getRowIndicesByRowValue({testId:t,rowHeader:e,rowValue:o});await this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(".table-row").nth(l[0]).locator(".icon-wrapper").click()}async isRowExpanded({testId:t,headerName:e,rowValue:o}){const l=await this.getRowIndicesByRowValue({testId:t,rowHeader:e,rowValue:o});return this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(".table-row").nth(l[0]).locator(".icon-wrapper").isVisible()}async getExpandedRowContent({testId:t,headerName:e,rowValue:o}){await this.isRowExpanded({testId:t,headerName:e,rowValue:o})||await this.expandRow({testId:t,headerName:e,rowValue:o});const h=await this.getRowIndicesByRowValue({testId:t,rowHeader:e,rowValue:o});return this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(".table-row").nth(h[0]).locator(".icon-wrapper").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 clickOnRowCheckboxByIndex({testId:t,index:e}){await this.page.getByTestId(n(t,g.BODY_WRAPPER)).locator(".table-row").nth(e).locator(".states").click()}async clickOnRowCheckboxByRowValue({testId:t,rowHeader:e,rowValue:o}){const l=await this.getRowIndicesByRowValue({testId:t,rowHeader:e,rowValue:o});await this.clickOnRowCheckboxByIndex({testId:t,index:l})}getCheckedRowsNumber({testId:t}){return this.page.getByTestId(n(t,g.TABLE)).locator(".table-row").locator(".icon.checked").count()}async clickOnSelectAllCheckbox({testId:t}){await this.page.getByTestId(n(t,g.TABLE)).locator(".states").nth(0).click()}}class V{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}']`)}}class f{constructor(t){r(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}),l=`[data-testid='${t}-${u.ACTION_BUTTON}-${o}']`;await this.page.click(l)}async getActionButtonIndex({testId:t,buttonName:e}){return(await this.page.getByTestId(n(t,u.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e)}}class v{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${y.WRAPPER}']`;await this.page.waitForSelector(e)}async closeMultiBar({testId:t}){await this.page.getByTestId(n(t,y.CLOSE_BTN)).locator(".icon-wrapper").click()}getMultiBarCountText({testId:t}){return this.page.getByTestId(n(t,y.WRAPPER)).locator(".count-text").textContent()}async isMultiBarVisible({testId:t}){return await this.page.waitForTimeout(1e3),this.page.getByTestId(n(t,y.WRAPPER)).locator(".multi-bar-panel").isVisible()}async clickOnActionButton({testId:t,actionButtonId:e}){await this.page.getByTestId(n(t,`${y.ACTION}-${e}`)).locator(".start-icon").click()}}c.BannerComponent=P,c.ButtonComponent=V,c.ComponentBasePage=S,c.DialogComponent=N,c.DropdownComponent=k,c.DropdownComponentV3=_,c.FieldHelpTextComponent=I,c.FieldLabelComponent=x,c.IncludeExcludeComponent=F,c.InputsComponent=H,c.MultiBarComponent=v,c.SnackbarComponent=f,c.TableComponent=W,c.TabsComponent=$,c.TooltipComponent=G,Object.defineProperty(c,Symbol.toStringTag,{value:"Module"})});
|
|
1
|
+
(function(i,s){typeof exports=="object"&&typeof module<"u"?s(exports):typeof define=="function"&&define.amd?define(["exports"],s):(i=typeof globalThis<"u"?globalThis:i||self,s(i["shared-ui-e2e"]={}))})(this,function(i){"use strict";var it=Object.defineProperty;var ct=(i,s,l)=>s in i?it(i,s,{enumerable:!0,configurable:!0,writable:!0,value:l}):i[s]=l;var r=(i,s,l)=>(ct(i,typeof s!="symbol"?s+"":s,l),l);var s=(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))(s||{}),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||{}),I=(a=>(a.WRAPPER="banner-wrapper",a.CONTENT="banner-content",a))(I||{}),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||{}),c=(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))(c||{}),x=(a=>(a.CONTAINER="search-container",a.FIELD="search-field",a.CLOSE="search-close",a.CLEAR="search-clear",a))(x||{}),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||{}),R=(a=>(a.TEXT="tt-text",a.TRIGGER="tt-trigger",a.HEADER="tt-header",a))(R||{}),y=(a=>(a.WRAPPER="tabs-wrapper",a.TAB="tabs-tab",a))(y||{}),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||{}),A=(a=>(a.CONTAINER="field-help-text-container",a.TEXT="field-help-text-text",a.ICON="field-help-text-icon",a))(A||{}),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||{}),d=(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))(d||{}),L=(a=>(a.TITLE="ah-title",a.APP_KEY="ah-app-key",a.APP_PLATFORM="ah-app-platform",a.AB_ICON="ah-ab-icon",a))(L||{}),O=(a=>(a.TEXT="ic-text",a.COPY_BTN="ic-copy-btn",a))(O||{}),C=(a=>(a.WRAPPER="multibar-wrapper",a.CLOSE_BTN="multibar-close-button",a.MENU="multibar-menu",a.ACTION="multibar-action",a))(C||{});const H=(a,t)=>{const e=new URLSearchParams(a).toString();return t.includes("?")?`${t}${e}`:`${t}?${e}`},W=(a,t={})=>{const e=[];Object.entries(t).forEach(([nt,ot])=>{e.push(`${nt}:${ot}`)});const o={id:a,viewMode:"story",args:e.join(";")};return H(o,"iframe.html")},n=(a,t)=>`${a}-${t}`;class v{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${I.WRAPPER}']`;await this.page.waitForSelector(e)}getBannerText({testId:t}){return this.page.getByTestId(n(t,I.CONTENT)).textContent()}hasBannerType({testId:t,type:e}){return this.page.getByTestId(n(t,I.WRAPPER)).locator(`.icon.icon-name--${e}`)!==null}}class G{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(W(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()}}class N{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()}async getDropdownButtonContent(t){await 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()}}class E{constructor(t){r(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 b{constructor(t){r(this,"page");this.page=t}hasExtraText({testId:t}){return this.page.getByTestId(n(t,A.TEXT)).isVisible()}getExtraText({testId:t}){return this.page.getByTestId(n(t,A.TEXT)).textContent()}async hasExtraTextIconType({testId:t,type:e}){return await(await this.page.getByTestId(n(t,A.CONTAINER)).locator(`.icon.icon-name--${e}`)).count()!==0}}class V extends N{constructor(e){super(e);r(this,"fieldLabelComponent");r(this,"fieldHelpTextComponent");this.fieldLabelComponent=new E(e),this.fieldHelpTextComponent=new b(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,c.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,A.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 f extends N{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,x.FIELD)).fill(e),this.page.getByTestId(n(t,l.LIST_CONTAINER)).locator("ul > li span").first().textContent()}}class X{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${s.TRIGGER}']`;await this.page.waitForSelector(e)}async clickOnApply(t){await this.page.getByTestId(n(t,s.ACTION_APPLY)).click()}async clickOnCancel(t){await this.page.getByTestId(n(t,s.ACTION_CANCEL)).click()}async openIncludeExcludeComponent(t){await this.page.getByTestId(n(t,s.TRIGGER)).click()}async searchForItem({testId:t,searchTerm:e}){return await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,s.SEARCH)).locator("input.transparent").fill(e),this.page.getByTestId(n(t,s.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,s.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,s.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,s.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,s.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,s.LIST_SELECTED)).locator("ul li button").nth(e).click(),o&&await this.clickOnApply(t)}async getSelectedCounter(t){return await this.page.getByTestId(n(t,s.LIST_SELECTED)).locator(".include-exclude-selected-header-left span").textContent()}async clearAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,s.CLEAR_ALL)).click(),await this.clickOnApply(t)}getTriggerText({testId:t}){return this.page.getByTestId(n(t,s.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent()}getTriggerDescription({testId:t}){return this.page.getByTestId(n(t,s.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent()}async selectAll({testId:t}){await this.openIncludeExcludeComponent(t),await this.page.getByTestId(n(t,s.SELECT_ALL)).click(),await this.clickOnApply(t)}}class _{constructor(t){r(this,"page");this.page=t}getInputsFieldText({testId:t}){return this.page.getByTestId(n(t,c.FIELD)).inputValue()}getPlaceholderText({testId:t}){return this.page.getByTestId(n(t,c.FIELD)).getAttribute("placeholder")}getInputsType({testId:t}){return this.page.getByTestId(n(t,c.FIELD)).getAttribute("type")}async addInput({testId:t,text:e}){await this.page.getByTestId(n(t,c.FIELD)).type(e)}async clearInput({testId:t}){await this.page.getByTestId(n(t,c.FIELD)).clear()}isDisabled({testId:t}){return this.page.getByTestId(n(t,c.FIELD)).isDisabled()}}class Y extends _{constructor(e){super(e);r(this,"fieldLabelComponent");r(this,"fieldHelpTextComponent");this.fieldLabelComponent=new E(e),this.fieldHelpTextComponent=new b(e)}getInputsLabelText({testId:e}){return this.fieldLabelComponent.getLabelText({testId:e})}async waitForComponent({testId:e}){const o=`[data-testid='${e}-${c.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,c.WRAPPER)).locator(".icon.icon-name--check")).click()}hasInlineErrorText({testId:e}){return this.page.getByTestId(n(e,c.TOOLTIP)).isVisible()}async getInlineErrorText({testId:e}){const o=await this.page.getByTestId(n(e,c.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,c.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,c.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible()}async clearInput({testId:e}){await(await this.page.getByTestId(n(e,c.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,c.FIELD))).isDisabled()}hasApplyButton({testId:e}){return this.page.getByTestId(n(e,c.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,c.WRAPPER)).locator(".font-caption").textContent()).split("/").map(T=>parseInt(T.trim(),10))}getHelpIconText({testId:e}){return this.fieldLabelComponent.getHelpIconText({testId:e})}}class j{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${y.WRAPPER}']`;await this.page.waitForSelector(e)}getSelectedTabText({testId:t}){return this.page.getByTestId(n(t,y.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,`${y.TAB}-${o+1}`)).click()}async getTabIndex({testId:t,tabName:e}){return(await this.page.getByTestId(n(t,y.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,`${y.TAB}-${o}`)).locator(".tab-item--disabled").isVisible()}}class K{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${R.TRIGGER}']`;await this.page.waitForSelector(e)}getTooltipText({testId:t}){return this.page.getByTestId(`${t}-${R.TRIGGER}`).getAttribute("text")}getTooltipHeaderText({testId:t}){return this.page.getByTestId(`${t}-${R.TRIGGER}`).getAttribute("header")}}const w=".table-row",S=".icon-wrapper",k=".states",P=".table-head-container",F=".table-row.loading",q=1e3;class z{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(w).count()}async getColumnHeaders({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(P).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(P,{hasText:t}).click()}async searchForItems({testId:t,searchTerm:e}){await this.clearSearchText({testId:t}),await this.page.getByTestId(n(t,c.FIELD)).fill(e)}async clearSearchText({testId:t}){await this.page.getByTestId(n(t,c.FIELD)).clear(),await this.waitForTableToLoad()}isArrowVisible({testId:t,headerName:e}){return this.page.getByTestId(n(t,p.TABLE)).locator(P,{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(q)}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(w,{hasText:e}).locator(S).click()}isRowExpanded({testId:t,rowValue:e}){return this.page.getByTestId(n(t,p.BODY_WRAPPER)).locator(w,{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(w,{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(w,{hasText:e}).locator(k).click()}getCheckedRowsNumber({testId:t}){return this.page.getByTestId(n(t,p.TABLE)).locator(w).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))}}class ${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 J{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 Q{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${C.WRAPPER}']`;await this.page.waitForSelector(e)}async closeMultiBar({testId:t}){await this.page.getByTestId(n(t,C.CLOSE_BTN)).locator(".icon-wrapper").click()}getMultiBarCountText({testId:t}){return this.page.getByTestId(n(t,C.WRAPPER)).locator(".count-text").textContent()}async isMultiBarVisible({testId:t}){return await this.page.waitForTimeout(1e3),this.page.getByTestId(n(t,C.WRAPPER)).locator(".multi-bar-panel").isVisible()}async clickOnActionButton({testId:t,actionButtonId:e}){await this.page.getByTestId(n(t,`${C.ACTION}-${e}`)).locator(".start-icon").click()}}class Z{constructor(t){r(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 E(this.page).getLabelText({testId:t})}isFormRowMandatory({testId:t}){return new E(this.page).isMandatory({testId:t})}getIconText({testId:t}){return new b(this.page).getExtraText({testId:t})}}class M{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${d.CONTENT}']`;await this.page.waitForSelector(e)}getCardTitle({testId:t}){return this.page.getByTestId(n(t,d.TITLE)).textContent()}getCardContentText({testId:t}){return this.page.getByTestId(n(t,d.CONTENT)).textContent()}getCardLabelText({testId:t}){return new E(this.page).getLabelText({testId:t})}async clickOnSaveButton({testId:t}){await this.page.getByTestId(n(t,d.SAVE_BUTTON)).click()}async clickOnCancelButton({testId:t}){await this.page.getByTestId(n(t,d.CANCEL_BUTTON)).click()}isSaveButtonLoading({testId:t}){return new $(this.page).isButtonLoading({testId:t})}async clearForm({testId:t,inputType:e}){(await this.page.getByTestId(n(t,d.CONTENT)).locator(`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`).all()).forEach(T=>T.clear())}}class m extends _{constructor(t){super(t)}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${c.WRAPPER}']`;await this.page.waitForSelector(e)}async isViewOnly({testId:t}){return await this.page.getByTestId(n(t,c.WRAPPER)).locator(".view-only.input-type").count()>0}getLabel({testId:t}){return this.page.getByTestId(n(t,c.LABEL_TEXT)).textContent()}isInputMandatory({testId:t}){return this.page.getByTestId(n(t,c.MANDATORY)).isVisible()}hasInputExtraHelpText({testId:t}){return this.page.getByTestId(n(t,c.EXTRA_TEXT)).isVisible()}async getHelpIconText({testId:t}){const e=await this.page.getByTestId(n(t,c.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,c.EXTRA_TEXT)).textContent()}getErrorExtraText({testId:t}){return this.page.getByTestId(n(t,c.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,c.WRAPPER)).getAttribute("type")==="password"}async clickOnPasswordButton({testId:t}){await(await this.page.getByTestId(n(t,c.WRAPPER)).locator(".password-visibility")).click()}}class tt{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${x.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,x.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 D{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${O.TEXT}']`;await this.page.waitForSelector(e)}getInlineCopyText({testId:t}){return this.page.getByTestId(`${t}-${O.TEXT}`).textContent()}}class et{constructor(t){r(this,"page");this.page=t}async waitForComponent({testId:t}){const e=`[data-testid='${t}-${L.TITLE}']`;await this.page.waitForSelector(e)}getHeaderTitle({testId:t}){return this.page.getByTestId(`${t}-${L.TITLE}`).textContent()}getInlineCopyText({testId:t}){return new D(this.page).getInlineCopyText({testId:t})}async isIconPresent({testId:t,iconName:e}){return await this.page.getByTestId(`${t}-${L.APP_PLATFORM}`).getAttribute("data-platform")===e}}class at{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")}}i.AlertComponent=at,i.AppHeaderComponent=et,i.BannerComponent=v,i.ButtonComponent=$,i.ComponentBasePage=G,i.DialogComponent=U,i.DropdownComponent=V,i.DropdownComponentV3=f,i.FieldHelpTextComponent=b,i.FieldLabelComponent=E,i.FormCardComponent=M,i.FormRowComponent=Z,i.IncludeExcludeComponent=X,i.InlineCopyComponent=D,i.InputsComponent=Y,i.MultiBarComponent=Q,i.SearchComponent=tt,i.SnackbarComponent=J,i.TableComponent=z,i.TabsComponent=j,i.TooltipComponent=K,Object.defineProperty(i,Symbol.toStringTag,{value:"Module"})});
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
export declare class AlertComponent {
|
|
3
|
+
readonly page: Page;
|
|
4
|
+
constructor(page: Page);
|
|
5
|
+
waitForComponent({ testId }: {
|
|
6
|
+
testId: string;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
getAlertText({ testId }: {
|
|
9
|
+
testId: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
getAlertTitle({ testId }: {
|
|
12
|
+
testId: string;
|
|
13
|
+
}): Promise<string>;
|
|
14
|
+
clickOnActionButton({ testId }: {
|
|
15
|
+
testId: string;
|
|
16
|
+
}): Promise<void>;
|
|
17
|
+
getActionButtonText({ testId }: {
|
|
18
|
+
testId: string;
|
|
19
|
+
}): Promise<string>;
|
|
20
|
+
closeAlert({ testId }: {
|
|
21
|
+
testId: string;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
isAlertVisible({ testId }: {
|
|
24
|
+
testId: string;
|
|
25
|
+
}): Promise<boolean>;
|
|
26
|
+
getAlertIconType({ testId }: {
|
|
27
|
+
testId: string;
|
|
28
|
+
}): Promise<string>;
|
|
29
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { ComponentBasePage } from '../base-page/component-base-page.ts';
|
|
2
|
+
import { Page } from '@playwright/test';
|
|
3
|
+
import { AlertComponent } from './alert-component.ts';
|
|
4
|
+
export declare class AlertPage extends ComponentBasePage {
|
|
5
|
+
readonly component: AlertComponent;
|
|
6
|
+
constructor(page: Page);
|
|
7
|
+
getAlertText(): Promise<string>;
|
|
8
|
+
getAlertTitle(): Promise<string>;
|
|
9
|
+
clickOnActionButton(): Promise<void>;
|
|
10
|
+
getActionButtonText(): Promise<string>;
|
|
11
|
+
closeAlert(): Promise<void>;
|
|
12
|
+
isAlertVisible(): Promise<boolean>;
|
|
13
|
+
waitForComponent(): Promise<void>;
|
|
14
|
+
getAlertIconType(): Promise<string>;
|
|
15
|
+
}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
export declare class AppHeaderComponent {
|
|
3
|
+
readonly page: Page;
|
|
4
|
+
constructor(page: Page);
|
|
5
|
+
waitForComponent({ testId }: {
|
|
6
|
+
testId: string;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
getHeaderTitle({ testId }: {
|
|
9
|
+
testId: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
getInlineCopyText({ testId }: {
|
|
12
|
+
testId: string;
|
|
13
|
+
}): Promise<string>;
|
|
14
|
+
isIconPresent({ testId, iconName, }: {
|
|
15
|
+
testId: string;
|
|
16
|
+
iconName: string;
|
|
17
|
+
}): Promise<boolean>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
import { AppHeaderComponent } from './app-header-component';
|
|
3
|
+
import { ComponentBasePage } from '../base-page/component-base-page';
|
|
4
|
+
export declare class AppHeaderPage extends ComponentBasePage {
|
|
5
|
+
readonly component: AppHeaderComponent;
|
|
6
|
+
constructor(page: Page);
|
|
7
|
+
getHeaderTitle(): Promise<string>;
|
|
8
|
+
getInlineCopyText(): Promise<string>;
|
|
9
|
+
isIconPresent(iconName: string): Promise<boolean>;
|
|
10
|
+
waitForComponent(): Promise<void>;
|
|
11
|
+
}
|
|
@@ -8,4 +8,13 @@ export declare class ButtonComponent {
|
|
|
8
8
|
clickOnButton({ testId }: {
|
|
9
9
|
testId: string;
|
|
10
10
|
}): Promise<void>;
|
|
11
|
+
isButtonLoading({ testId }: {
|
|
12
|
+
testId: string;
|
|
13
|
+
}): Promise<boolean>;
|
|
14
|
+
getButtonText({ testId }: {
|
|
15
|
+
testId: string;
|
|
16
|
+
}): Promise<string>;
|
|
17
|
+
isButtonDisabled({ testId }: {
|
|
18
|
+
testId: string;
|
|
19
|
+
}): Promise<boolean>;
|
|
11
20
|
}
|
|
@@ -6,4 +6,7 @@ export declare class ButtonPage extends ComponentBasePage {
|
|
|
6
6
|
constructor(page: Page);
|
|
7
7
|
waitForComponent(): Promise<void>;
|
|
8
8
|
clickOnButton(): Promise<void>;
|
|
9
|
+
isButtonLoading(): Promise<boolean>;
|
|
10
|
+
getButtonText(): Promise<string>;
|
|
11
|
+
isButtonDisabled(): Promise<boolean>;
|
|
9
12
|
}
|
|
@@ -7,10 +7,11 @@ export declare class BaseDropdownComponent {
|
|
|
7
7
|
testId: string;
|
|
8
8
|
}): Promise<void>;
|
|
9
9
|
selectDropdownOptionByIndex({ testId, index }: SelectionByIndex): Promise<void>;
|
|
10
|
+
getDropdownButtonContent(testId: string): Promise<void>;
|
|
10
11
|
openDropdownComponent({ testId }: {
|
|
11
12
|
testId: string;
|
|
12
13
|
}): Promise<void>;
|
|
13
|
-
selectDropdownOptionByName({ testId, name }: SelectionByName): Promise<void>;
|
|
14
|
+
selectDropdownOptionByName({ testId, name, shouldOpen, }: SelectionByName): Promise<void>;
|
|
14
15
|
selectMultipleItemsByIndex({ testId, itemsToSelect }: SelectMultiple): Promise<void>;
|
|
15
16
|
selectMultipleItemsByName({ testId, itemsToSelect, }: SelectMultipleByName): Promise<void>;
|
|
16
17
|
clickOnApply({ testId }: {
|
|
@@ -1,3 +1,5 @@
|
|
|
1
1
|
export declare const dropdownDefaultStoryId = "v4-components-dropdown-singleselection--basic";
|
|
2
2
|
export declare const defaultTestId = "dropdown-default";
|
|
3
3
|
export declare const loadedPageSelector = "[data-testid='dropdown-default-dd-trigger']";
|
|
4
|
+
export declare const chipMultiStoryId = "v4-components-dropdown-triggers-chip--multi-selection";
|
|
5
|
+
export declare const chipSingleStoryId = "v4-components-dropdown-triggers-chip--single-selection";
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
export declare class FormCardComponent {
|
|
3
|
+
readonly page: Page;
|
|
4
|
+
constructor(page: Page);
|
|
5
|
+
waitForComponent({ testId }: {
|
|
6
|
+
testId: string;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
getCardTitle({ testId }: {
|
|
9
|
+
testId: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
getCardContentText({ testId }: {
|
|
12
|
+
testId: string;
|
|
13
|
+
}): Promise<string>;
|
|
14
|
+
getCardLabelText({ testId }: {
|
|
15
|
+
testId: string;
|
|
16
|
+
}): any;
|
|
17
|
+
clickOnSaveButton({ testId }: {
|
|
18
|
+
testId: string;
|
|
19
|
+
}): Promise<void>;
|
|
20
|
+
clickOnCancelButton({ testId }: {
|
|
21
|
+
testId: string;
|
|
22
|
+
}): Promise<void>;
|
|
23
|
+
isSaveButtonLoading({ testId }: {
|
|
24
|
+
testId: string;
|
|
25
|
+
}): Promise<boolean>;
|
|
26
|
+
clearForm({ testId, inputType, }: {
|
|
27
|
+
testId: string;
|
|
28
|
+
inputType: string;
|
|
29
|
+
}): Promise<void>;
|
|
30
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
import { FormCardComponent } from './form-card-component';
|
|
3
|
+
import { ComponentBasePage } from '../base-page/component-base-page';
|
|
4
|
+
export declare class FormCardPage extends ComponentBasePage {
|
|
5
|
+
readonly component: FormCardComponent;
|
|
6
|
+
constructor(page: Page);
|
|
7
|
+
getCardTitle(): Promise<string>;
|
|
8
|
+
getCardContentText(): Promise<string>;
|
|
9
|
+
waitForComponent(): Promise<void>;
|
|
10
|
+
clickOnSaveButton(): Promise<void>;
|
|
11
|
+
clickOnCancelButton(): Promise<void>;
|
|
12
|
+
isSaveButtonLoading(): Promise<boolean>;
|
|
13
|
+
}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
export declare class FormRowComponent {
|
|
3
|
+
readonly page: Page;
|
|
4
|
+
constructor(page: Page);
|
|
5
|
+
waitForComponent({ testId }: {
|
|
6
|
+
testId: string;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
getFormRowTitle({ testId }: {
|
|
9
|
+
testId: string;
|
|
10
|
+
}): any;
|
|
11
|
+
isFormRowMandatory({ testId }: {
|
|
12
|
+
testId: string;
|
|
13
|
+
}): any;
|
|
14
|
+
getIconText({ testId }: {
|
|
15
|
+
testId: string;
|
|
16
|
+
}): any;
|
|
17
|
+
}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { ComponentBasePage } from '../base-page/component-base-page.ts';
|
|
2
|
+
import { FormRowComponent } from './form-row-component.ts';
|
|
3
|
+
import { Page } from '@playwright/test';
|
|
4
|
+
export declare class FormRowPage extends ComponentBasePage {
|
|
5
|
+
readonly component: FormRowComponent;
|
|
6
|
+
constructor(page: Page);
|
|
7
|
+
waitForComponent(): Promise<void>;
|
|
8
|
+
getFormRowTitle(): any;
|
|
9
|
+
isFormRowMandatory(): any;
|
|
10
|
+
}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
export declare class InlineCopyComponent {
|
|
3
|
+
readonly page: Page;
|
|
4
|
+
constructor(page: Page);
|
|
5
|
+
waitForComponent({ testId }: {
|
|
6
|
+
testId: string;
|
|
7
|
+
}): Promise<void>;
|
|
8
|
+
getInlineCopyText({ testId }: {
|
|
9
|
+
testId: string;
|
|
10
|
+
}): Promise<string>;
|
|
11
|
+
}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
import { InlineCopyComponent } from './inline-copy-component';
|
|
3
|
+
import { ComponentBasePage } from '../base-page/component-base-page';
|
|
4
|
+
export declare class InlineCopyPage extends ComponentBasePage {
|
|
5
|
+
readonly component: InlineCopyComponent;
|
|
6
|
+
constructor(page: Page);
|
|
7
|
+
getInlineCopyText(): Promise<string>;
|
|
8
|
+
waitForComponent(): Promise<void>;
|
|
9
|
+
}
|
|
@@ -44,7 +44,7 @@ export declare class InputsComponent extends BaseInputComponent {
|
|
|
44
44
|
clearInput({ testId }: {
|
|
45
45
|
testId: string;
|
|
46
46
|
}): Promise<void>;
|
|
47
|
-
hasExtraTextIconType({ testId, type }: HasHelpTextTypeParams):
|
|
47
|
+
hasExtraTextIconType({ testId, type }: HasHelpTextTypeParams): Promise<boolean>;
|
|
48
48
|
isDisabled({ testId }: {
|
|
49
49
|
testId: string;
|
|
50
50
|
}): Promise<boolean>;
|
|
@@ -62,5 +62,5 @@ export declare class InputsComponent extends BaseInputComponent {
|
|
|
62
62
|
}): Promise<number[]>;
|
|
63
63
|
getHelpIconText({ testId }: {
|
|
64
64
|
testId: string;
|
|
65
|
-
}): any
|
|
65
|
+
}): Promise<any>;
|
|
66
66
|
}
|
|
@@ -20,13 +20,14 @@ export declare class InputsPage extends ComponentBasePage {
|
|
|
20
20
|
hasApplyButton(): Promise<boolean>;
|
|
21
21
|
hasExtraTextIconType({ type }: {
|
|
22
22
|
type: string;
|
|
23
|
-
}):
|
|
23
|
+
}): Promise<boolean>;
|
|
24
24
|
isDisabled(): Promise<boolean>;
|
|
25
25
|
getMaxLengthNumber(): Promise<number>;
|
|
26
26
|
getActualNumberLength(): Promise<number>;
|
|
27
|
-
getHelpIconText(): any
|
|
27
|
+
getHelpIconText(): Promise<any>;
|
|
28
28
|
clickOnShowPassword(): Promise<void>;
|
|
29
29
|
clickOnHidePassword(): Promise<void>;
|
|
30
30
|
isPasswordHidden(): Promise<boolean>;
|
|
31
31
|
waitForComponent(): Promise<void>;
|
|
32
|
+
clearInput(): Promise<void>;
|
|
32
33
|
}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
import { SearchParams } from '../../global/types.ts';
|
|
3
|
+
export declare class SearchComponent {
|
|
4
|
+
readonly page: Page;
|
|
5
|
+
constructor(page: Page);
|
|
6
|
+
waitForComponent({ testId }: {
|
|
7
|
+
testId: string;
|
|
8
|
+
}): Promise<void>;
|
|
9
|
+
searchInput({ testId, searchTerm }: SearchParams): Promise<void>;
|
|
10
|
+
clearInput({ testId }: {
|
|
11
|
+
testId: string;
|
|
12
|
+
}): Promise<void>;
|
|
13
|
+
clickOnXButton({ testId }: {
|
|
14
|
+
testId: string;
|
|
15
|
+
}): Promise<void>;
|
|
16
|
+
isDisabled({ testId }: {
|
|
17
|
+
testId: string;
|
|
18
|
+
}): Promise<boolean>;
|
|
19
|
+
getSearchPlaceholder({ testId }: {
|
|
20
|
+
testId: string;
|
|
21
|
+
}): Promise<string>;
|
|
22
|
+
getSearchInputValue({ testId }: {
|
|
23
|
+
testId: string;
|
|
24
|
+
}): Promise<string>;
|
|
25
|
+
}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import { Page } from '@playwright/test';
|
|
2
|
+
import { SearchComponent } from './search-component';
|
|
3
|
+
import { ComponentBasePage } from '../base-page/component-base-page';
|
|
4
|
+
export declare class SearchPage extends ComponentBasePage {
|
|
5
|
+
readonly component: SearchComponent;
|
|
6
|
+
constructor(page: Page);
|
|
7
|
+
waitForComponent(): Promise<void>;
|
|
8
|
+
searchInput(value: string): Promise<void>;
|
|
9
|
+
clearInput(): Promise<void>;
|
|
10
|
+
clickOnXButton(): Promise<void>;
|
|
11
|
+
isDisabled(): Promise<boolean>;
|
|
12
|
+
getSearchPlaceholder(): Promise<string>;
|
|
13
|
+
getSearchInputValue(): Promise<string>;
|
|
14
|
+
}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { Page } from '@playwright/test';
|
|
2
|
-
import { HeaderParams,
|
|
2
|
+
import { HeaderParams, RowValueParams } from './types.ts';
|
|
3
|
+
import { SearchParams } from '../../global/types';
|
|
3
4
|
export declare class TableComponent {
|
|
4
5
|
readonly page: Page;
|
|
5
6
|
constructor(page: Page);
|
|
@@ -9,23 +10,6 @@ export declare class TableComponent {
|
|
|
9
10
|
getTableRowCount({ testId }: {
|
|
10
11
|
testId: string;
|
|
11
12
|
}): Promise<number>;
|
|
12
|
-
getTableRowContentByIndex({ testId, index, }: {
|
|
13
|
-
testId: string;
|
|
14
|
-
index: number;
|
|
15
|
-
}): Promise<string>;
|
|
16
|
-
getTableRowsByRowValue({ testId, rowHeader, rowValue, }: {
|
|
17
|
-
testId: string;
|
|
18
|
-
rowHeader: string;
|
|
19
|
-
rowValue: string;
|
|
20
|
-
}): Promise<any[]>;
|
|
21
|
-
private getRowIndicesByRowValue;
|
|
22
|
-
private getIndicesOf;
|
|
23
|
-
getColumnValuesByHeader({ header, testId, }: {
|
|
24
|
-
header: string;
|
|
25
|
-
testId: string;
|
|
26
|
-
}): Promise<any[]>;
|
|
27
|
-
private getColumnIndexByHeader;
|
|
28
|
-
private getColumnValuesByIndex;
|
|
29
13
|
getColumnHeaders({ testId }: {
|
|
30
14
|
testId: string;
|
|
31
15
|
}): Promise<string[]>;
|
|
@@ -35,8 +19,7 @@ export declare class TableComponent {
|
|
|
35
19
|
getTableFooter({ testId }: {
|
|
36
20
|
testId: string;
|
|
37
21
|
}): Promise<string>;
|
|
38
|
-
|
|
39
|
-
clickOnHeaderByName({ testId, headerName }: HeaderParams): Promise<void>;
|
|
22
|
+
clickOnHeaderByName(headerName: string): Promise<void>;
|
|
40
23
|
searchForItems({ testId, searchTerm }: SearchParams): Promise<void>;
|
|
41
24
|
clearSearchText({ testId }: {
|
|
42
25
|
testId: string;
|
|
@@ -46,13 +29,10 @@ export declare class TableComponent {
|
|
|
46
29
|
testId: string;
|
|
47
30
|
}): Promise<void>;
|
|
48
31
|
waitForTableToLoad(): Promise<void>;
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}): Promise<void>;
|
|
54
|
-
isRowExpanded({ testId, headerName, rowValue }: any): Promise<boolean>;
|
|
55
|
-
getExpandedRowContent({ testId, headerName, rowValue }: any): Promise<string>;
|
|
32
|
+
waitingForTableLoadingToAppear(): Promise<void>;
|
|
33
|
+
expandRow({ testId, rowValue }: RowValueParams): Promise<void>;
|
|
34
|
+
isRowExpanded({ testId, rowValue }: RowValueParams): Promise<boolean>;
|
|
35
|
+
getExpandedRowContent({ testId, rowValue }: RowValueParams): Promise<string>;
|
|
56
36
|
isEmptyStateVisible({ testId }: {
|
|
57
37
|
testId: string;
|
|
58
38
|
}): Promise<boolean>;
|
|
@@ -62,12 +42,14 @@ export declare class TableComponent {
|
|
|
62
42
|
getEmptyStateSubtitle({ testId }: {
|
|
63
43
|
testId: string;
|
|
64
44
|
}): Promise<string>;
|
|
65
|
-
|
|
66
|
-
clickOnRowCheckboxByRowValue({ testId, rowHeader, rowValue }: any): Promise<void>;
|
|
45
|
+
clickOnRowCheckboxByRowValue({ testId, rowValue }: RowValueParams): Promise<void>;
|
|
67
46
|
getCheckedRowsNumber({ testId }: {
|
|
68
47
|
testId: string;
|
|
69
48
|
}): Promise<number>;
|
|
70
49
|
clickOnSelectAllCheckbox({ testId }: {
|
|
71
50
|
testId: string;
|
|
72
51
|
}): Promise<void>;
|
|
52
|
+
getTableLocator({ testId }: {
|
|
53
|
+
testId: string;
|
|
54
|
+
}): import("playwright-core").Locator;
|
|
73
55
|
}
|
|
@@ -6,30 +6,18 @@ export declare class TablePage extends ComponentBasePage {
|
|
|
6
6
|
constructor(page: Page);
|
|
7
7
|
waitForComponent(): Promise<void>;
|
|
8
8
|
getTableRowCount(): Promise<number>;
|
|
9
|
-
getTableRowContentByIndex({ index }: {
|
|
10
|
-
index: number;
|
|
11
|
-
}): Promise<string>;
|
|
12
|
-
getTableRowByRowValue({ rowHeader, rowValue, }: {
|
|
13
|
-
rowHeader: string;
|
|
14
|
-
rowValue: string;
|
|
15
|
-
}): Promise<any[]>;
|
|
16
|
-
getColumnValuesByHeader({ header }: {
|
|
17
|
-
header: string;
|
|
18
|
-
}): Promise<any[]>;
|
|
19
9
|
getTableLabel(): Promise<string>;
|
|
20
10
|
getTableFooter(): Promise<string>;
|
|
21
11
|
searchForItems(searchTerm: string): Promise<void>;
|
|
22
|
-
clickOnSortByHeaderName(headerName: string): Promise<void>;
|
|
23
12
|
isArrowVisible(headerName: string): Promise<boolean>;
|
|
24
13
|
scrollDownTableRows(): Promise<void>;
|
|
25
14
|
isEmptyStateVisible(): Promise<boolean>;
|
|
26
15
|
getEmptyStateTitle(): Promise<string>;
|
|
27
16
|
getEmptyStateSubtitle(): Promise<string>;
|
|
28
|
-
clickOnRowCheckboxByIndex(index: number): Promise<void>;
|
|
29
|
-
clickOnRowCheckboxByRowValue({ rowHeader, rowValue, }: {
|
|
30
|
-
rowHeader: string;
|
|
31
|
-
rowValue: string;
|
|
32
|
-
}): Promise<void>;
|
|
33
17
|
getCheckedRowsNumber(): Promise<number>;
|
|
34
18
|
clickOnSelectAllCheckbox(): Promise<void>;
|
|
19
|
+
getColumnHeaders(): Promise<string[]>;
|
|
20
|
+
clickOnHeaderByName(headerName: string): Promise<void>;
|
|
21
|
+
clickOnRowCheckboxByRowValue(rowValue: string): Promise<void>;
|
|
22
|
+
getTableLocator(): import("playwright-core").Locator;
|
|
35
23
|
}
|
|
@@ -2,7 +2,15 @@ export type HeaderParams = {
|
|
|
2
2
|
testId: string;
|
|
3
3
|
headerName: string;
|
|
4
4
|
};
|
|
5
|
-
export type
|
|
5
|
+
export type IndexTableParams = {
|
|
6
6
|
testId: string;
|
|
7
|
-
|
|
7
|
+
index: number;
|
|
8
|
+
};
|
|
9
|
+
export type RowValueParams = {
|
|
10
|
+
testId: string;
|
|
11
|
+
rowValue: string;
|
|
12
|
+
};
|
|
13
|
+
export type IndicesOfParams = {
|
|
14
|
+
searchStr: string;
|
|
15
|
+
array: string[];
|
|
8
16
|
};
|