New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@ironsource/shared-ui-e2e

Package Overview
Dependencies
Maintainers
0
Versions
375
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@ironsource/shared-ui-e2e - npm Package Compare versions

Comparing version 2.1.12-test.99 to 2.1.12-test.100

tests/components/chart/multiChart/consts.d.ts

2

package.json
{
"name": "@ironsource/shared-ui-e2e",
"private": false,
"version": "2.1.12-test.99",
"version": "2.1.12-test.100",
"description": "",

@@ -6,0 +6,0 @@ "type": "module",

@@ -1,12 +0,12 @@

var v = Object.defineProperty;
var W = (a, t, e) => t in a ? v(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
var c = (a, t, e) => (W(a, typeof t != "symbol" ? t + "" : t, e), e);
var g = /* @__PURE__ */ ((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))(g || {}), s = /* @__PURE__ */ ((a) => (a.TRIGGER = "dd-trigger", a.WRAPPER = "dd-wrapper", a.BUTTON = "dd-button", a.BUTTON_WRAPPER = "dd-button-wrapper", a.BUTTON_CONTENT = "dd-button-content", a.BUTTON_CONTENT_SUFFIX = "dd-button-content-suffix", a.BUTTON_CLEAR = "dd-button-clear", a.LABEL = "dd-label", a.LIST_CONTAINER = "dd-list-container", a.SEARCH = "dd-search", a.TITLE = "dd-title", a.ACTION_CANCEL = "dd-action-cancel", a.ACTION_APPLY = "dd-action-apply", a.ACTION_CLEAR_ALL = "dd-action-clear-all", a.HELPER_TEXT = "dd-helper-text", a.HELPER_TEXT_ERROR = "dd-helper-text-error", a.SELECT_ALL = "dd-select-all", a.NO_RESULT = "dd-no-result", a))(s || {}), R = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(R || {}), d = /* @__PURE__ */ ((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 || {}), u = /* @__PURE__ */ ((a) => (a.WRAPPER = "dialog-wrapper", a.HEADER = "dialog-header", a.ACTION_CLOSE = "dialog-action-close", a.HEADER_SECONDARY = "dialog-header-secondary", a.CONTENT = "dialog-content", a.ACTION_BUTTONS_WRAPPER = "dialog-action-buttons-wrapper", a.BACKDROP = "dialog-backdrop", a.SAVE_BUTTON = "dialog-save-button", a.CANCEL_BUTTON = "dialog-cancel-button", a))(u || {}), r = /* @__PURE__ */ ((a) => (a.WRAPPER = "input-wrapper", a.TOOLTIP = "input-tooltip", a.TOOLTIP_WITHOUT_ICON = "input-tooltip-without-icon", a.MANDATORY = "input-mandatory", a.LABEL_CONTAINER = "input-label-container", a.LABEL_TEXT = "input-label-text", a.FIELD = "input-field", a.EXTRA_TEXT = "input-extra-text", a.TOGGLE_PASSWORD = "input-toggle-password-icon", a))(r || {}), C = /* @__PURE__ */ ((a) => (a.WRAPPER = "ta-wrapper", a.LABEL = "ta-label", a.FIELD = "ta-field", a.TEXT = "ta-text", a))(C || {}), N = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(N || {}), p = /* @__PURE__ */ ((a) => (a.CONTAINER = "tbl-container", a.TABLE = "tbl-table", a.HEADER = "tbl-header", a.TITLE = "tbl-title", a.HEADER_RIGHT = "tbl-header-right", a.ACTIONS = "tbl-actions", a.SECTIONS = "tbl-sections", a.BODY_WRAPPER = "tbl-body-wrapper", a.EMPTY_STATE = "tbl-empty-state", a.PRE_SEARCH_HEADER = "tbl-pre-search-header", a))(p || {}), O = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(O || {}), B = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(B || {}), x = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(x || {}), w = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(w || {}), y = /* @__PURE__ */ ((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))(y || {}), E = /* @__PURE__ */ ((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))(E || {}), b = /* @__PURE__ */ ((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 || {}), _ = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))(_ || {}), m = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(m || {}), T = /* @__PURE__ */ ((a) => (a.CONTAINER = "sortable-list-container", a.DRAGGABLE_LIST = "sortable-list-draggable-list", a.LOCKED_LIST = "sortable-list-locked-list", a))(T || {});
const U = (a, t) => {
var ot = Object.defineProperty;
var st = (a, t, e) => t in a ? ot(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
var r = (a, t, e) => (st(a, typeof t != "symbol" ? t + "" : t, e), e);
var T = /* @__PURE__ */ ((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))(T || {}), c = /* @__PURE__ */ ((a) => (a.TRIGGER = "dd-trigger", a.WRAPPER = "dd-wrapper", a.BUTTON = "dd-button", a.BUTTON_WRAPPER = "dd-button-wrapper", a.BUTTON_CONTENT = "dd-button-content", a.BUTTON_CONTENT_SUFFIX = "dd-button-content-suffix", a.BUTTON_CLEAR = "dd-button-clear", a.LABEL = "dd-label", a.LIST_CONTAINER = "dd-list-container", a.SEARCH = "dd-search", a.TITLE = "dd-title", a.ACTION_CANCEL = "dd-action-cancel", a.ACTION_APPLY = "dd-action-apply", a.ACTION_CLEAR_ALL = "dd-action-clear-all", a.HELPER_TEXT = "dd-helper-text", a.HELPER_TEXT_ERROR = "dd-helper-text-error", a.SELECT_ALL = "dd-select-all", a.NO_RESULT = "dd-no-result", a))(c || {}), F = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(F || {}), w = /* @__PURE__ */ ((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))(w || {}), E = /* @__PURE__ */ ((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))(E || {}), l = /* @__PURE__ */ ((a) => (a.WRAPPER = "input-wrapper", a.TOOLTIP = "input-tooltip", a.TOOLTIP_WITHOUT_ICON = "input-tooltip-without-icon", a.MANDATORY = "input-mandatory", a.LABEL_CONTAINER = "input-label-container", a.LABEL_TEXT = "input-label-text", a.FIELD = "input-field", a.EXTRA_TEXT = "input-extra-text", a.TOGGLE_PASSWORD = "input-toggle-password-icon", a.CLEAR_BUTTON = "input-clear-button", a.LOADING = "input-loading", a))(l || {}), V = /* @__PURE__ */ ((a) => (a.WRAPPER = "swicth-wrapper", a.BUTTON = "swicth-button", a.TEXT = "swicth-text", a))(V || {}), B = /* @__PURE__ */ ((a) => (a.WRAPPER = "ta-wrapper", a.LABEL = "ta-label", a.FIELD = "ta-field", a.TEXT = "ta-text", a))(B || {}), G = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(G || {}), g = /* @__PURE__ */ ((a) => (a.CONTAINER = "tbl-container", a.TABLE = "tbl-table", a.HEADER = "tbl-header", a.TITLE = "tbl-title", a.HEADER_RIGHT = "tbl-header-right", a.ACTIONS = "tbl-actions", a.SECTIONS = "tbl-sections", a.BODY_WRAPPER = "tbl-body-wrapper", a.EMPTY_STATE = "tbl-empty-state", a.PRE_SEARCH_HEADER = "tbl-pre-search-header", a))(g || {}), $ = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))($ || {}), L = /* @__PURE__ */ ((a) => (a.WRAPPER = "dr-wrapper", a.FIELD = "dr-field", a.TRIGGER = "dr-trigger", a.CONTAINER = "dr-container", a.MENU = "dr-menu", a.MESSAGE = "dr-message", a.ACTION_APPLY = "dr-action-apply", a.ACTION_CANCEL = "dr-action-cancel", a))(L || {}), R = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(R || {}), b = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(b || {}), I = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(I || {}), m = /* @__PURE__ */ ((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))(m || {}), A = /* @__PURE__ */ ((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))(A || {}), f = /* @__PURE__ */ ((a) => (a.TITLE = "ah-title", a.APP_KEY = "ah-app-key", a.APP_PLATFORM = "ah-app-platform", a.AB_ICON = "ah-ab-icon", a))(f || {}), X = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))(X || {}), O = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(O || {}), h = /* @__PURE__ */ ((a) => (a.CONTAINER = "sortable-list-container", a.DRAGGABLE_LIST = "sortable-list-draggable-list", a.LOCKED_LIST = "sortable-list-locked-list", a))(h || {}), d = /* @__PURE__ */ ((a) => (a.CONTAINER = "chart-container", a.HEADER = "chart-header", a.TREND = "chart-trend", a.TYPE_SWITCHER = "chart-type-switcher", a.LEGEND = "chart-legend", a.LEGEND_CONTAINER = "chart-legend-container", a.LEGEND_SORT = "chart-legend-sort", a.EXTRA_CHART = "chart-extra-chart", a.LOADER = "chart-loader", a))(d || {});
const it = (a, t) => {
const e = new URLSearchParams(a).toString();
return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
}, V = (a, t = {}) => {
}, ct = (a, t = {}) => {
const e = [];
Object.entries(t).forEach(([l, h]) => {
e.push(`${l}:${h}`);
Object.entries(t).forEach(([i, p]) => {
e.push(`${i}:${p}`);
});

@@ -18,26 +18,26 @@ const o = {

};
return U(o, "iframe.html");
return it(o, "iframe.html");
}, n = (a, t) => `${a}-${t}`;
class Q {
class Et {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${R.WRAPPER}']`;
const e = `[data-testid='${t}-${F.WRAPPER}']`;
await this.page.waitForSelector(e);
}
getBannerText({ testId: t }) {
return this.page.getByTestId(n(t, R.CONTENT)).textContent();
return this.page.getByTestId(n(t, F.CONTENT)).textContent();
}
hasBannerType({ testId: t, type: e }) {
return this.page.getByTestId(n(t, R.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
return this.page.getByTestId(n(t, F.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
}
}
class Z {
class wt {
constructor(t) {
c(this, "page");
c(this, "testId");
c(this, "componentId");
c(this, "loadedPageSelector");
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;

@@ -51,3 +51,3 @@ }

await this.page.goto(
V(
ct(
t.storyId || this.componentId,

@@ -59,20 +59,20 @@ e

}
class M {
class Ct {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${u.WRAPPER}']`;
const e = `[data-testid='${t}-${E.WRAPPER}']`;
await this.page.waitForSelector(e);
}
getDialogTitle({ testId: t }) {
return this.page.getByTestId(n(t, u.HEADER)).textContent();
return this.page.getByTestId(n(t, E.HEADER)).textContent();
}
getDialogText({ testId: t }) {
return this.page.getByTestId(n(t, u.CONTENT)).textContent();
return this.page.getByTestId(n(t, E.CONTENT)).textContent();
}
async closeDialog({ testId: t }) {
await (await this.page.getByTestId(
n(t, u.ACTION_CLOSE)
n(t, E.ACTION_CLOSE)
)).click();

@@ -82,3 +82,3 @@ }

await this.page.getByTestId(
n(t, u.SAVE_BUTTON)
n(t, E.SAVE_BUTTON)
).click();

@@ -88,3 +88,3 @@ }

await this.page.getByTestId(
n(t, u.CANCEL_BUTTON)
n(t, E.CANCEL_BUTTON)
).click();

@@ -94,11 +94,11 @@ }

await (await this.page.getByTestId(
n(t, u.ACTION_BUTTONS_WRAPPER)
n(t, E.ACTION_BUTTONS_WRAPPER)
).locator(".danger")).click();
}
getDialogSubtitle({ testId: t }) {
return this.page.getByTestId(n(t, u.HEADER_SECONDARY)).locator(".subtitle").textContent();
return this.page.getByTestId(n(t, E.HEADER_SECONDARY)).locator(".subtitle").textContent();
}
async isDialogVisible({ testId: t }) {
return await this.page.waitForTimeout(1e3), (await this.page.getByTestId(
n(t, u.WRAPPER)
n(t, E.WRAPPER)
)).isVisible();

@@ -108,3 +108,3 @@ }

await this.page.waitForSelector(
n(t, u.WRAPPER),
n(t, E.WRAPPER),
{ state: "hidden" }

@@ -114,5 +114,5 @@ );

}
class G {
class Q {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;

@@ -122,3 +122,3 @@ }

await this.page.getByTestId(
n(t, s.WRAPPER)
n(t, c.WRAPPER)
);

@@ -130,9 +130,9 @@ }

}) {
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li").nth(e).click();
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(e).click();
}
getDropdownButtonContent(t) {
return this.page.getByTestId(n(t, s.BUTTON_CONTENT)).textContent();
return this.page.getByTestId(n(t, c.BUTTON_CONTENT)).textContent();
}
async openDropdownComponent({ testId: t }) {
await this.page.getByTestId(n(t, s.TRIGGER)).click({ position: { x: 15, y: 15 } });
await this.page.getByTestId(n(t, c.TRIGGER)).click({ position: { x: 15, y: 15 } });
}

@@ -144,11 +144,22 @@ async selectDropdownOptionByName({

}) {
o && await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li div.text-container", { hasText: e }).click();
o && await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li div.text-container", { hasText: e }).click();
}
async selectDropdownOptionByNameV2({
testId: t,
name: e,
shouldOpen: o = !0
}) {
o && await this.openDropdownComponent({ testId: t }), await (await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator(`li div.option-content:has-text("${e}")`)).click();
}
async clearAllOptions({ testId: t }) {
await this.page.getByTestId(n(t, s.ACTION_CLEAR_ALL)).click();
await this.page.getByTestId(n(t, c.ACTION_CLEAR_ALL)).click();
}
async selectMultipleItemsByIndex({ testId: t, itemsToSelect: e }) {
await this.openDropdownComponent({ testId: t }), await this.clearAllOptions({ testId: t });
for (const o of e)
await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li").nth(o).click();
async selectMultipleItemsByIndex({
testId: t,
itemsToSelect: e,
shouldOpen: o = !0
}) {
o && await this.openDropdownComponent({ testId: t }), await this.clearAllOptions({ testId: t });
for (const s of e)
await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(s).click();
}

@@ -163,29 +174,29 @@ async selectMultipleItemsByName({

});
for (const i of e)
await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span", { hasText: i }).first().click();
for (const s of e)
await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span", { hasText: s }).first().click();
}
async clickOnApply({ testId: t }) {
await this.page.getByTestId(n(t, s.ACTION_APPLY)).click();
await this.page.getByTestId(n(t, c.ACTION_APPLY)).click();
}
async clickOnCancel({ testId: t }) {
await this.page.getByTestId(n(t, s.ACTION_CANCEL)).click();
await this.page.getByTestId(n(t, c.ACTION_CANCEL)).click();
}
async isValidationAppear({ testId: t }) {
return (await this.page.getByTestId(n(t, s.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error");
return (await this.page.getByTestId(n(t, c.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error");
}
}
class A {
class D {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
getLabelText({ testId: t }) {
return this.page.getByTestId(n(t, x.TEXT)).textContent();
return this.page.getByTestId(n(t, b.TEXT)).textContent();
}
isMandatory({ testId: t }) {
return this.page.getByTestId(n(t, x.MANDATORY)).isVisible();
return this.page.getByTestId(n(t, b.MANDATORY)).isVisible();
}
async getHelpIconText({ testId: t }) {
const e = await this.page.getByTestId(
n(t, x.TOOLTIP)
n(t, b.TOOLTIP)
);

@@ -195,23 +206,23 @@ return await e.hover(), e.getAttribute("text");

}
class F {
class Y {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
hasExtraText({ testId: t }) {
return this.page.getByTestId(n(t, w.TEXT)).isVisible();
return this.page.getByTestId(n(t, I.TEXT)).isVisible();
}
getExtraText({ testId: t }) {
return this.page.getByTestId(n(t, w.TEXT)).textContent();
return this.page.getByTestId(n(t, I.TEXT)).textContent();
}
async hasExtraTextIconType({ testId: t, type: e }) {
return await (await this.page.getByTestId(n(t, w.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
return await (await this.page.getByTestId(n(t, I.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
}
}
class X extends G {
class Z extends Q {
constructor(e) {
super(e);
c(this, "fieldLabelComponent");
c(this, "fieldHelpTextComponent");
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new F(e);
r(this, "fieldLabelComponent");
r(this, "fieldHelpTextComponent");
this.fieldLabelComponent = new D(e), this.fieldHelpTextComponent = new Y(e);
}

@@ -237,36 +248,44 @@ getDropdownTitle({ testId: e }) {

async getSelectedLabel({ testId: e }) {
let i = await this.page.getByTestId(n(e, s.BUTTON_CONTENT)).textContent();
let s = await this.page.getByTestId(n(e, c.BUTTON_CONTENT)).textContent();
if (await this.page.getByTestId(
n(e, s.BUTTON_CONTENT_SUFFIX)
n(e, c.BUTTON_CONTENT_SUFFIX)
).isVisible({ timeout: 1e3 })) {
const h = await this.page.getByTestId(
n(e, s.BUTTON_CONTENT_SUFFIX)
const p = await this.page.getByTestId(
n(e, c.BUTTON_CONTENT_SUFFIX)
).textContent();
i = `${i}${h}`;
s = `${s}${p}`;
}
return i;
return s;
}
async searchForItem({ testId: e, searchTerm: o }) {
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, r.FIELD)).fill(o), this.page.getByTestId(n(e, s.LIST_CONTAINER)).locator("ul > li span").first().textContent();
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, l.FIELD)).fill(o), this.page.getByTestId(n(e, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
}
async isErrorText({ testId: e }) {
return await this.page.getByTestId(n(e, w.TEXT)).count() > 0;
return await this.page.getByTestId(n(e, I.TEXT)).count() > 0;
}
async isDisabled({ testId: e }) {
return (await this.page.getByTestId(n(e, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
return (await this.page.getByTestId(n(e, c.TRIGGER)).locator(".button__container--disabled")).isVisible();
}
isSelectAllChecked({ testId: e }) {
return this.page.getByTestId(n(e, s.SELECT_ALL)).locator(".checkbox.input").isChecked();
return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".checkbox.input").isChecked();
}
isSelectAllIndeterminate({ testId: e }) {
return this.page.getByTestId(n(e, s.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
}
async removeChipSelection({ testId: e }) {
await this.page.getByTestId(n(e, s.BUTTON_CLEAR)).click();
await this.page.getByTestId(n(e, c.BUTTON_CLEAR)).click();
}
getDropdownOptions({ testId: e }) {
return this.page.getByTestId(n(e, s.LIST_CONTAINER)).locator(".list").allTextContents();
return this.page.getByTestId(n(e, c.LIST_CONTAINER)).locator(".list").allTextContents();
}
async getDropdownOptionsV2({ testId: e }) {
const o = [], s = await this.page.getByTestId(n(e, c.LIST_CONTAINER)).locator(".list li").all();
for (const i of s) {
const p = await i.textContent();
o.push(p);
}
return o;
}
}
class tt extends G {
class mt extends Q {
constructor(t) {

@@ -276,18 +295,18 @@ super(t);

getDropdownTitle({ testId: t }) {
return this.page.getByTestId(n(t, s.WRAPPER)).locator("label > span").textContent();
return this.page.getByTestId(n(t, c.WRAPPER)).locator("label > span").textContent();
}
getSelectedItem({ testId: t }) {
return this.page.getByTestId(n(t, s.TRIGGER)).locator("button > span").textContent();
return this.page.getByTestId(n(t, c.TRIGGER)).locator("button > span").textContent();
}
async searchForItem({ testId: t, searchTerm: e }) {
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, N.FIELD)).fill(e), this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span").first().textContent();
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, G.FIELD)).fill(e), this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
}
}
class et {
class It {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${g.TRIGGER}']`;
const e = `[data-testid='${t}-${T.TRIGGER}']`;
await this.page.waitForSelector(e);

@@ -297,3 +316,3 @@ }

await this.page.getByTestId(
n(t, g.ACTION_APPLY)
n(t, T.ACTION_APPLY)
).click();

@@ -303,16 +322,16 @@ }

await this.page.getByTestId(
n(t, g.ACTION_CANCEL)
n(t, T.ACTION_CANCEL)
).click();
}
async openIncludeExcludeComponent(t) {
await this.page.getByTestId(n(t, g.TRIGGER)).click();
await this.page.getByTestId(n(t, T.TRIGGER)).click();
}
async searchForItem({ testId: t, searchTerm: e }) {
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, g.SEARCH)).locator("input.transparent").fill(e), this.page.getByTestId(n(t, g.LIST)).locator("ul > li .v-popper span").first().textContent();
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.SEARCH)).locator("input.transparent").fill(e), this.page.getByTestId(n(t, T.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, g.LIST)).locator("ul > li .v-popper span", { hasText: e }).first().click(), await this.clickOnApply(t);
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.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, g.LIST)).locator(".include-exclude-list ul > li").nth(e).click(), await this.page.waitForSelector("include-exclude-list-header-loading", {
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.LIST)).locator(".include-exclude-list ul > li").nth(e).click(), await this.page.waitForSelector("include-exclude-list-header-loading", {
state: "hidden"

@@ -324,7 +343,7 @@ }), o && await this.clickOnApply(t);

for (const o of e)
await this.page.getByTestId(n(t, g.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
await this.page.getByTestId(n(t, T.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, g.LIST_SELECTED)
n(t, T.LIST_SELECTED)
).locator("ul > li", { hasText: e }).locator(".clear-button").click(), await this.clickOnApply(t);

@@ -334,3 +353,3 @@ }

await this.page.getByTestId(
n(t, g.LIST_SELECTED)
n(t, T.LIST_SELECTED)
).locator("ul li button").nth(e).click(), o && await this.clickOnApply(t);

@@ -340,48 +359,48 @@ }

return await this.page.getByTestId(
n(t, g.LIST_SELECTED)
n(t, T.LIST_SELECTED)
).locator(".include-exclude-selected-header-left span").textContent();
}
async clearAll({ testId: t }) {
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, g.CLEAR_ALL)).click(), await this.clickOnApply(t);
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.CLEAR_ALL)).click(), await this.clickOnApply(t);
}
getTriggerText({ testId: t }) {
return this.page.getByTestId(n(t, g.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
return this.page.getByTestId(n(t, T.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
}
getTriggerDescription({ testId: t }) {
return this.page.getByTestId(n(t, g.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
return this.page.getByTestId(n(t, T.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
}
async selectAll({ testId: t }) {
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, g.SELECT_ALL)).click(), await this.clickOnApply(t);
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.SELECT_ALL)).click(), await this.clickOnApply(t);
}
}
class f {
class M {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
getInputsFieldText({ testId: t }) {
return this.page.getByTestId(n(t, r.FIELD)).inputValue();
return this.page.getByTestId(n(t, l.FIELD)).inputValue();
}
getPlaceholderText({ testId: t }) {
return this.page.getByTestId(n(t, r.FIELD)).getAttribute("placeholder");
return this.page.getByTestId(n(t, l.FIELD)).getAttribute("placeholder");
}
getInputsType({ testId: t }) {
return this.page.getByTestId(n(t, r.FIELD)).getAttribute("type");
return this.page.getByTestId(n(t, l.FIELD)).getAttribute("type");
}
async addInput({ testId: t, text: e }) {
await this.page.getByTestId(n(t, r.FIELD)).type(e);
await this.page.getByTestId(n(t, l.FIELD)).type(e);
}
async clearInput({ testId: t }) {
await this.page.getByTestId(n(t, r.FIELD)).clear();
await this.page.getByTestId(n(t, l.FIELD)).clear();
}
isDisabled({ testId: t }) {
return this.page.getByTestId(n(t, r.FIELD)).isDisabled();
return this.page.getByTestId(n(t, l.FIELD)).isDisabled();
}
}
class at extends f {
class Bt extends M {
constructor(e) {
super(e);
c(this, "fieldLabelComponent");
c(this, "fieldHelpTextComponent");
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new F(e);
r(this, "fieldLabelComponent");
r(this, "fieldHelpTextComponent");
this.fieldLabelComponent = new D(e), this.fieldHelpTextComponent = new Y(e);
}

@@ -392,3 +411,3 @@ getInputsLabelText({ testId: e }) {

async waitForComponent({ testId: e }) {
const o = `[data-testid='${e}-${r.WRAPPER}']`;
const o = `[data-testid='${e}-${l.WRAPPER}']`;
await this.page.waitForSelector(o);

@@ -406,3 +425,3 @@ }

async clickOnApplyButton({ testId: e }) {
await (await this.page.getByTestId(n(e, r.WRAPPER)).locator(".icon.icon-name--check")).click();
await (await this.page.getByTestId(n(e, l.WRAPPER)).locator(".icon.icon-name--check")).click();
}

@@ -419,6 +438,6 @@ hasInlineErrorText({

}) {
const i = this.page.getByTestId(
const s = this.page.getByTestId(
n(e, o)
);
return await i.hover(), i.getAttribute("text");
return await s.hover(), s.getAttribute("text");
}

@@ -429,3 +448,3 @@ async clickOnShowPassword({ testId: e }) {

async clickOnPasswordIcon({ testId: e }) {
await this.page.getByTestId(n(e, r.TOGGLE_PASSWORD)).click();
await this.page.getByTestId(n(e, l.TOGGLE_PASSWORD)).click();
}

@@ -436,7 +455,7 @@ async clickOnHidePassword({ testId: e }) {

isPasswordHidden({ testId: e }) {
return this.page.getByTestId(n(e, r.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
return this.page.getByTestId(n(e, l.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
}
async clearInput({ testId: e }) {
await (await this.page.getByTestId(
n(e, r.FIELD)
n(e, l.FIELD)
)).clear();

@@ -449,7 +468,7 @@ }

return (await this.page.getByTestId(
n(e, r.FIELD)
n(e, l.FIELD)
)).isDisabled();
}
hasApplyButton({ testId: e }) {
return this.page.getByTestId(n(e, r.WRAPPER)).locator(".icon.icon-name--check").isVisible();
return this.page.getByTestId(n(e, l.WRAPPER)).locator(".icon.icon-name--check").isVisible();
}

@@ -463,3 +482,3 @@ async getMaxLengthNumber({ testId: e }) {

async getFontCaptionText({ testId: e }) {
return (await this.page.getByTestId(n(e, r.WRAPPER)).locator(".font-caption").textContent()).split("/").map((i) => parseInt(i.trim(), 10));
return (await this.page.getByTestId(n(e, l.WRAPPER)).locator(".font-caption").textContent()).split("/").map((s) => parseInt(s.trim(), 10));
}

@@ -470,16 +489,16 @@ getHelpIconText({ testId: e }) {

async isValidationAppear({ testId: e }) {
return (await this.page.getByTestId(n(e, r.WRAPPER)).getAttribute("class")).includes("variant-error");
return (await this.page.getByTestId(n(e, l.WRAPPER)).getAttribute("class")).includes("variant-error");
}
}
class nt {
class Lt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${B.WRAPPER}']`;
const e = `[data-testid='${t}-${R.WRAPPER}']`;
await this.page.waitForSelector(e);
}
getSelectedTabText({ testId: t }) {
return this.page.getByTestId(n(t, B.WRAPPER)).locator(".tab-item--active").textContent();
return this.page.getByTestId(n(t, R.WRAPPER)).locator(".tab-item--active").textContent();
}

@@ -489,53 +508,53 @@ async selectTab({ testId: t, tabName: e }) {

await this.page.getByTestId(
n(t, `${B.TAB}-${o + 1}`)
n(t, `${R.TAB}-${o + 1}`)
).click();
}
async getTabIndex({ testId: t, tabName: e }) {
return (await this.page.getByTestId(n(t, B.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
return (await this.page.getByTestId(n(t, R.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, `${B.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
return this.page.getByTestId(n(t, `${R.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
}
}
class ot {
class At {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${O.TRIGGER}']`;
const e = `[data-testid='${t}-${$.TRIGGER}']`;
await this.page.waitForSelector(e);
}
getTooltipText({ testId: t }) {
return this.page.getByTestId(`${t}-${O.TRIGGER}`).getAttribute("text");
return this.page.getByTestId(`${t}-${$.TRIGGER}`).getAttribute("text");
}
getTooltipHeaderText({ testId: t }) {
return this.page.getByTestId(`${t}-${O.TRIGGER}`).getAttribute("header");
return this.page.getByTestId(`${t}-${$.TRIGGER}`).getAttribute("header");
}
}
const I = ".table-row", S = ".icon-wrapper", $ = ".states", P = ".table-head-container", H = ".table-row.loading", Y = 1e3;
class it {
const x = ".table-row", W = ".icon-wrapper", K = ".states", U = ".table-head-container", j = ".table-row.loading", rt = 1e3;
class xt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${p.CONTAINER}']`;
const e = `[data-testid='${t}-${g.CONTAINER}']`;
await this.page.waitForSelector(e);
}
getTableRowCount({ testId: t }) {
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I).count();
return this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x).count();
}
async getColumnHeaders({ testId: t }) {
return this.page.getByTestId(n(t, p.TABLE)).locator(P).allTextContents();
return this.page.getByTestId(n(t, g.TABLE)).locator(U).allTextContents();
}
getTableLabel({ testId: t }) {
return this.page.getByTestId(n(t, p.HEADER)).innerText();
return this.page.getByTestId(n(t, g.HEADER)).innerText();
}
getTableFooter({ testId: t }) {
return this.page.getByTestId(n(t, p.CONTAINER)).locator(".table-footer").innerText();
return this.page.getByTestId(n(t, g.CONTAINER)).locator(".table-footer").innerText();
}
async clickOnHeaderByName(t) {
await this.page.locator(P, {
await this.page.locator(U, {
hasText: t

@@ -545,9 +564,9 @@ }).click();

async searchForItems({ testId: t, searchTerm: e }) {
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, r.FIELD)).fill(e);
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, l.FIELD)).fill(e);
}
async clearSearchText({ testId: t }) {
await this.page.getByTestId(n(t, r.FIELD)).clear(), await this.waitForTableToLoad();
await this.page.getByTestId(n(t, l.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();
return this.page.getByTestId(n(t, g.TABLE)).locator(U, { hasText: e }).locator(".table-sort-icon").isVisible();
}

@@ -557,11 +576,11 @@ async scrollDownTableRows({ testId: t }) {

t,
p.TABLE
g.TABLE
)}]`;
await this.page.focus(e), await this.page.evaluate((o) => {
const i = document.querySelector(o);
i && (i.scrollTop = i.scrollHeight);
}, e), await this.page.waitForTimeout(Y);
const s = document.querySelector(o);
s && (s.scrollTop = s.scrollHeight);
}, e), await this.page.waitForTimeout(rt);
}
async waitForTableToLoad() {
await this.page.waitForSelector(H, {
await this.page.waitForSelector(j, {
state: "hidden"

@@ -571,9 +590,9 @@ });

async waitingForTableLoadingToAppear() {
await this.page.waitForSelector(H);
await this.page.waitForSelector(j);
}
async expandRow({ testId: t, rowValue: e }) {
await this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I, { hasText: e }).locator(S).click();
await this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x, { hasText: e }).locator(W).click();
}
isRowExpanded({ testId: t, rowValue: e }) {
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I, { hasText: e }).locator(S).isVisible();
return this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x, { hasText: e }).locator(W).isVisible();
}

@@ -584,27 +603,27 @@ async getExpandedRowContent({ testId: t, rowValue: e }) {

rowValue: e
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I, { hasText: e }).locator(S).textContent();
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x, { hasText: e }).locator(W).textContent();
}
isEmptyStateVisible({ testId: t }) {
return this.page.getByTestId(n(t, p.TABLE)).locator(".empty-state").isVisible();
return this.page.getByTestId(n(t, g.TABLE)).locator(".empty-state").isVisible();
}
getEmptyStateTitle({ testId: t }) {
return this.page.getByTestId(n(t, p.TABLE)).locator(".font-heading-4.title").textContent();
return this.page.getByTestId(n(t, g.TABLE)).locator(".font-heading-4.title").textContent();
}
getEmptyStateSubtitle({ testId: t }) {
return this.page.getByTestId(n(t, p.TABLE)).locator(".font-body-1.subtitle").textContent();
return this.page.getByTestId(n(t, g.TABLE)).locator(".font-body-1.subtitle").textContent();
}
async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
await this.page.getByTestId(n(t, p.TABLE)).locator(I, {
await this.page.getByTestId(n(t, g.TABLE)).locator(x, {
hasText: e
}).locator($).click();
}).locator(K).click();
}
getCheckedRowsNumber({ testId: t }) {
return this.page.getByTestId(n(t, p.TABLE)).locator(I).locator(".icon.checked").count();
return this.page.getByTestId(n(t, g.TABLE)).locator(x).locator(".icon.checked").count();
}
async clickOnSelectAllCheckbox({ testId: t }) {
await this.page.getByTestId(n(t, p.TABLE)).locator($).nth(0).click();
await this.page.getByTestId(n(t, g.TABLE)).locator(K).nth(0).click();
}
getTableLocator({ testId: t }) {
return this.page.getByTestId(
n(t, p.CONTAINER)
n(t, g.CONTAINER)
);

@@ -616,5 +635,5 @@ }

}
class K {
class lt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;

@@ -639,23 +658,23 @@ }

}
class st {
class Rt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${y.CONTAINER}']`;
const e = `[data-testid='${t}-${m.CONTAINER}']`;
await this.page.waitForSelector(e);
}
getSnackbarTitle({ testId: t }) {
return this.page.getByTestId(n(t, y.TITLE)).textContent();
return this.page.getByTestId(n(t, m.TITLE)).textContent();
}
async closeSnackbar({ testId: t }) {
await this.page.getByTestId(n(t, y.CLOSE)).locator(".icon-name--x").click();
await this.page.getByTestId(n(t, m.CLOSE)).locator(".icon-name--x").click();
}
async waitForSnackbarToBeClosed({ testId: t }) {
const e = `[data-testid='${t}-${y.CONTAINER}']`;
const e = `[data-testid='${t}-${m.CONTAINER}']`;
await this.page.waitForSelector(e, { state: "detached" });
}
getSnackbarDescription({ testId: t }) {
return this.page.getByTestId(n(t, y.MESSAGE)).textContent();
return this.page.getByTestId(n(t, m.MESSAGE)).textContent();
}

@@ -666,4 +685,4 @@ async clickOnActionButton({ testId: t, buttonName: e }) {

buttonName: e
}), i = `[data-testid='${t}-${y.ACTION_BUTTON}-${o}']`;
await this.page.click(i);
}), s = `[data-testid='${t}-${m.ACTION_BUTTON}-${o}']`;
await this.page.click(s);
}

@@ -674,22 +693,22 @@ async getActionButtonIndex({

}) {
return (await this.page.getByTestId(n(t, y.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
return (await this.page.getByTestId(n(t, m.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
}
}
class rt {
class Ot {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${m.WRAPPER}']`;
const e = `[data-testid='${t}-${O.WRAPPER}']`;
await this.page.waitForSelector(e);
}
async closeMultiBar({ testId: t }) {
await this.page.getByTestId(n(t, m.CLOSE_BTN)).locator(".icon-wrapper").click();
await this.page.getByTestId(n(t, O.CLOSE_BTN)).locator(".icon-wrapper").click();
}
getMultiBarCountText({ testId: t }) {
return this.page.getByTestId(n(t, m.WRAPPER)).locator(".count-text").textContent();
return this.page.getByTestId(n(t, O.WRAPPER)).locator(".count-text").textContent();
}
async isMultiBarVisible({ testId: t }) {
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, m.WRAPPER)).locator(".multi-bar-panel").isVisible();
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, O.WRAPPER)).locator(".multi-bar-panel").isVisible();
}

@@ -700,3 +719,3 @@ async clickOnActionButton({ testId: t, actionButtonId: e }) {

t,
`${m.ACTION}-${e}`
`${O.ACTION}-${e}`
)

@@ -706,47 +725,47 @@ ).locator(".start-icon").click();

}
class ct {
class Nt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${x.TEXT}']`;
const e = `[data-testid='${t}-${b.TEXT}']`;
await this.page.waitForSelector(e);
}
getFormRowTitle({ testId: t }) {
return new A(this.page).getLabelText({ testId: t });
return new D(this.page).getLabelText({ testId: t });
}
isFormRowMandatory({ testId: t }) {
return new A(this.page).isMandatory({ testId: t });
return new D(this.page).isMandatory({ testId: t });
}
getIconText({ testId: t }) {
return new F(this.page).getExtraText({ testId: t });
return new Y(this.page).getExtraText({ testId: t });
}
}
class lt {
class bt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${E.CONTENT}']`;
const e = `[data-testid='${t}-${A.CONTENT}']`;
await this.page.waitForSelector(e);
}
getCardTitle({ testId: t }) {
return this.page.getByTestId(n(t, E.TITLE)).textContent();
return this.page.getByTestId(n(t, A.TITLE)).textContent();
}
getCardContentText({ testId: t }) {
return this.page.getByTestId(n(t, E.CONTENT)).textContent();
return this.page.getByTestId(n(t, A.CONTENT)).textContent();
}
getCardLabelText({ testId: t }) {
return new A(this.page).getLabelText({ testId: t });
return new D(this.page).getLabelText({ testId: t });
}
async clickOnSaveButton({ testId: t }) {
await this.page.getByTestId(n(t, E.SAVE_BUTTON)).click();
await this.page.getByTestId(n(t, A.SAVE_BUTTON)).click();
}
async clickOnCancelButton({ testId: t }) {
await this.page.getByTestId(n(t, E.CANCEL_BUTTON)).click();
await this.page.getByTestId(n(t, A.CANCEL_BUTTON)).click();
}
isSaveButtonLoading({ testId: t }) {
return new K(this.page).isButtonLoading({ testId: t });
return new lt(this.page).isButtonLoading({ testId: t });
}

@@ -757,8 +776,8 @@ async clearForm({

}) {
(await this.page.getByTestId(n(t, E.CONTENT)).locator(
(await this.page.getByTestId(n(t, A.CONTENT)).locator(
`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`
).all()).forEach((i) => i.clear());
).all()).forEach((s) => s.clear());
}
}
class L extends f {
class N extends M {
constructor(t) {

@@ -768,26 +787,26 @@ super(t);

async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${r.WRAPPER}']`;
const e = `[data-testid='${t}-${l.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;
return await this.page.getByTestId(n(t, l.WRAPPER)).locator(".view-only.input-type").count() > 0;
}
getLabel({ testId: t }) {
return this.page.getByTestId(n(t, r.LABEL_TEXT)).textContent();
return this.page.getByTestId(n(t, l.LABEL_TEXT)).textContent();
}
isInputMandatory({ testId: t }) {
return this.page.getByTestId(n(t, r.MANDATORY)).isVisible();
return this.page.getByTestId(n(t, l.MANDATORY)).isVisible();
}
hasInputExtraHelpText({ testId: t }) {
return this.page.getByTestId(n(t, r.EXTRA_TEXT)).isVisible();
return this.page.getByTestId(n(t, l.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");
const e = await this.page.getByTestId(n(t, l.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();
return this.page.getByTestId(n(t, l.EXTRA_TEXT)).textContent();
}
getErrorExtraText({ testId: t }) {
return this.page.getByTestId(n(t, r.EXTRA_TEXT)).locator(".error").textContent();
return this.page.getByTestId(n(t, l.EXTRA_TEXT)).locator(".error").textContent();
}

@@ -798,63 +817,63 @@ async showPassword({ testId: t }) {

async isPasswordHidden({ testId: t }) {
return await this.page.getByTestId(n(t, r.WRAPPER)).getAttribute("type") === "password";
return await this.page.getByTestId(n(t, l.WRAPPER)).getAttribute("type") === "password";
}
async clickOnPasswordButton({ testId: t }) {
await (await this.page.getByTestId(n(t, r.WRAPPER)).locator(".password-visibility")).click();
await (await this.page.getByTestId(n(t, l.WRAPPER)).locator(".password-visibility")).click();
}
}
class pt {
class St {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${N.CONTAINER}']`;
const e = `[data-testid='${t}-${G.CONTAINER}']`;
await this.page.waitForSelector(e);
}
async searchInput({ testId: t, searchTerm: e }) {
await new L(this.page).addInput({ testId: t, text: e });
await new N(this.page).addInput({ testId: t, text: e });
}
async clearInput({ testId: t }) {
await new L(this.page).clearInput({ testId: t });
await new N(this.page).clearInput({ testId: t });
}
async clickOnXButton({ testId: t }) {
await this.page.getByTestId(n(t, N.CLEAR)).locator(".icon-name--x-circle").click();
await this.page.getByTestId(n(t, G.CLEAR)).locator(".icon-name--x-circle").click();
}
isDisabled({ testId: t }) {
return new L(this.page).isDisabled({ testId: t });
return new N(this.page).isDisabled({ testId: t });
}
getSearchPlaceholder({ testId: t }) {
return new L(this.page).getPlaceholderText({ testId: t });
return new N(this.page).getPlaceholderText({ testId: t });
}
getSearchInputValue({ testId: t }) {
return new L(this.page).getInputsFieldText({ testId: t });
return new N(this.page).getInputsFieldText({ testId: t });
}
}
class j {
class pt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${_.TEXT}']`;
const e = `[data-testid='${t}-${X.TEXT}']`;
await this.page.waitForSelector(e);
}
getInlineCopyText({ testId: t }) {
return this.page.getByTestId(`${t}-${_.TEXT}`).textContent();
return this.page.getByTestId(`${t}-${X.TEXT}`).textContent();
}
}
class gt {
class Pt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${b.TITLE}']`;
const e = `[data-testid='${t}-${f.TITLE}']`;
await this.page.waitForSelector(e);
}
getHeaderTitle({ testId: t }) {
return this.page.getByTestId(`${t}-${b.TITLE}`).textContent();
return this.page.getByTestId(`${t}-${f.TITLE}`).textContent();
}
getInlineCopyText({ testId: t }) {
return new j(this.page).getInlineCopyText({
return new pt(this.page).getInlineCopyText({
testId: t

@@ -867,75 +886,75 @@ });

}) {
return await this.page.getByTestId(`${t}-${b.APP_PLATFORM}`).getAttribute("data-platform") === e;
return await this.page.getByTestId(`${t}-${f.APP_PLATFORM}`).getAttribute("data-platform") === e;
}
}
class Tt {
class _t {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${d.WRAPPER}']`;
const e = `[data-testid='${t}-${w.WRAPPER}']`;
await this.page.waitForSelector(e);
}
getAlertText({ testId: t }) {
return this.page.getByTestId(n(t, d.MESSAGE)).textContent();
return this.page.getByTestId(n(t, w.MESSAGE)).textContent();
}
getAlertTitle({ testId: t }) {
return this.page.getByTestId(n(t, d.TITLE)).textContent();
return this.page.getByTestId(n(t, w.TITLE)).textContent();
}
async clickOnActionButton({ testId: t }) {
await this.page.click(
n(t, d.ACTION_BUTTON)
n(t, w.ACTION_BUTTON)
);
}
getActionButtonText({ testId: t }) {
return this.page.getByTestId(n(t, d.ACTION_BUTTON)).textContent();
return this.page.getByTestId(n(t, w.ACTION_BUTTON)).textContent();
}
async closeAlert({ testId: t }) {
await this.page.getByTestId(n(t, d.CLOSE_BUTTON)).click();
await this.page.getByTestId(n(t, w.CLOSE_BUTTON)).click();
}
async isAlertVisible({ testId: t }) {
return await this.page.getByTestId(n(t, d.WRAPPER)).count() > 0;
return await this.page.getByTestId(n(t, w.WRAPPER)).count() > 0;
}
getAlertIconType({ testId: t }) {
return this.page.getByTestId(n(t, d.WRAPPER)).getAttribute("class");
return this.page.getByTestId(n(t, w.WRAPPER)).getAttribute("class");
}
}
class q {
class gt {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${C.FIELD}']`;
const e = `[data-testid='${t}-${B.FIELD}']`;
await this.page.waitForSelector(e);
}
async addInput({ testId: t, text: e }) {
await this.page.getByTestId(n(t, C.FIELD)).type(e);
await this.page.getByTestId(n(t, B.FIELD)).type(e);
}
async clearInput({ testId: t }) {
await this.page.getByTestId(n(t, C.FIELD)).clear();
await this.page.getByTestId(n(t, B.FIELD)).clear();
}
getInput({ testId: t }) {
return this.page.getByTestId(n(t, C.FIELD)).inputValue();
return this.page.getByTestId(n(t, B.FIELD)).inputValue();
}
getPlaceholderText({ testId: t }) {
return this.page.getByTestId(n(t, C.FIELD)).getAttribute("placeholder");
return this.page.getByTestId(n(t, B.FIELD)).getAttribute("placeholder");
}
isDisabled({ testId: t }) {
return this.page.getByTestId(n(t, C.FIELD)).isDisabled();
return this.page.getByTestId(n(t, B.FIELD)).isDisabled();
}
}
class ht extends q {
class Dt extends gt {
getLabelText({ testId: t }) {
return this.page.getByTestId(n(t, x.TEXT)).textContent();
return this.page.getByTestId(n(t, b.TEXT)).textContent();
}
hasFieldHelpText({ testId: t }) {
return this.page.getByTestId(n(t, w.CONTAINER)).isVisible();
return this.page.getByTestId(n(t, I.CONTAINER)).isVisible();
}
getFieldHelpText({ testId: t }) {
return this.page.getByTestId(n(t, w.CONTAINER)).textContent();
return this.page.getByTestId(n(t, I.CONTAINER)).textContent();
}
}
class ut extends X {
class kt extends Z {
constructor(t) {

@@ -963,27 +982,27 @@ super(t);

getSelectedLabel({ testId: t }) {
return this.page.getByTestId(n(t, s.BUTTON_CONTENT)).textContent();
return this.page.getByTestId(n(t, c.BUTTON_CONTENT)).textContent();
}
async searchForItem({ testId: t, searchTerm: e }) {
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, r.FIELD)).fill(e), this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span").first().textContent();
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, l.FIELD)).fill(e), this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
}
async isErrorText({ testId: t }) {
return await this.page.getByTestId(n(t, w.TEXT)).count() > 0;
return await this.page.getByTestId(n(t, I.TEXT)).count() > 0;
}
async isDisabled({ testId: t }) {
return (await this.page.getByTestId(n(t, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
return (await this.page.getByTestId(n(t, c.TRIGGER)).locator(".button__container--disabled")).isVisible();
}
async clearAllOptions({ testId: t }) {
await this.page.getByTestId(n(t, s.ACTION_CLEAR_ALL)).click();
await this.page.getByTestId(n(t, c.ACTION_CLEAR_ALL)).click();
}
isSelectAllChecked({ testId: t }) {
return this.page.getByTestId(n(t, s.SELECT_ALL)).locator(".checkbox.input").isChecked();
return this.page.getByTestId(n(t, c.SELECT_ALL)).locator(".checkbox.input").isChecked();
}
isSelectAllIndeterminate({ testId: t }) {
return this.page.getByTestId(n(t, s.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
return this.page.getByTestId(n(t, c.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
}
async removeChipSelection({ testId: t }) {
await this.page.getByTestId(n(t, s.BUTTON_CLEAR)).click();
await this.page.getByTestId(n(t, c.BUTTON_CLEAR)).click();
}
getDropdownOptions({ testId: t }) {
return this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(".list").allTextContents();
return this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator(".list").allTextContents();
}

@@ -994,3 +1013,3 @@ async expandTreeNode({

}) {
const o = this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(".item--multi", { hasText: e }).locator(".tree-main-arrow-wrapper");
const o = this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator(".item--multi", { hasText: e }).locator(".tree-main-arrow-wrapper");
if (await o.isVisible())

@@ -1005,8 +1024,8 @@ await o.click();

item: o,
shouldExpand: i = !1
shouldExpand: s = !1
}) {
await this.openDropdownComponent({ testId: t }), i && await this.expandTreeNode({ testId: t, nodeName: e });
const l = this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(`text=${o}`);
if (await l.isVisible())
await l.click();
await this.openDropdownComponent({ testId: t }), s && await this.expandTreeNode({ testId: t, nodeName: e });
const i = this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator(`text=${o}`);
if (await i.isVisible())
await i.click();
else

@@ -1021,7 +1040,7 @@ throw new Error(`Option with text "${o}" not found in the dropdown.`);

await this.openDropdownComponent({ testId: t });
for (const i of e)
for (const s of e)
await this.selectTreeDropdownOptionByName({
testId: t,
node: o,
item: i,
item: s,
shouldExpand: !0

@@ -1032,30 +1051,30 @@ });

}
const z = ".sortable-item";
class dt {
const Tt = ".sortable-item";
class Ft {
constructor(t) {
c(this, "page");
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = `[data-testid='${t}-${T.CONTAINER}']`;
const e = `[data-testid='${t}-${h.CONTAINER}']`;
await this.page.waitForSelector(e);
}
async isComponentLoaded(t) {
const e = `[data-testid='${t}-${T.CONTAINER}']`;
const e = `[data-testid='${t}-${h.CONTAINER}']`;
return this.page.isVisible(e);
}
async getItems(t) {
return this.page.getByTestId(n(t, T.CONTAINER)).locator(".sortable-item").allTextContents();
return this.page.getByTestId(n(t, h.CONTAINER)).locator(".sortable-item").allTextContents();
}
async sortItem(t, e, o) {
const i = await this.page.getByTestId(
const s = await this.page.getByTestId(
n(t, "sortable-list-item")
), l = i.nth(e), h = i.nth(o);
await l.dragTo(h);
), i = s.nth(e), p = s.nth(o);
await i.dragTo(p);
}
async verifyOrder(t, e) {
return (await this.getItems(t)).every((i, l) => i === e[l]);
return (await this.getItems(t)).every((s, i) => s === e[i]);
}
async getListItemLocator({ testId: t, item: e, modifier: o }) {
return this.page.getByTestId(n(t, o)).locator(z, {
return this.page.getByTestId(n(t, o)).locator(Tt, {
hasText: e

@@ -1065,7 +1084,7 @@ });

async selectItem({ testId: t, item: e, isLockedItem: o }) {
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
await (await this.getListItemLocator({
testId: t,
item: e,
modifier: i
modifier: s
})).click();

@@ -1077,7 +1096,7 @@ }

async expandItem({ testId: t, item: e, isLockedItem: o }) {
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
await (await this.getListItemLocator({
testId: t,
item: e,
modifier: i
modifier: s
})).locator(".expand-icon").click();

@@ -1089,3 +1108,3 @@ }

childItem: o,
isLockedItem: i
isLockedItem: s
}) {

@@ -1095,3 +1114,3 @@ await this.expandItem({

item: e,
isLockedItem: i
isLockedItem: s
}), await this.page.locator("ul li span", {

@@ -1102,7 +1121,7 @@ hasText: o

async isListOpened({ testId: t, item: e, isLockedItem: o }) {
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
return await (await this.getListItemLocator({
testId: t,
item: e,
modifier: i
modifier: s
})).locator(".child-list ul").count() > 0;

@@ -1114,7 +1133,7 @@ }

async openItemMenu({ testId: t, item: e, isLockedItem: o }) {
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
await (await this.getListItemLocator({
testId: t,
item: e,
modifier: i
modifier: s
})).locator(".item__menu button").click();

@@ -1126,3 +1145,3 @@ }

isLockedItem: o,
menuItem: i
menuItem: s
}) {

@@ -1134,4 +1153,4 @@ await this.openItemMenu({

});
const l = this.page.locator(".dropdown-list-wrapper");
await l.locator("ul.list li", { hasText: i }).click(), await l.waitFor({ state: "detached" });
const i = this.page.locator(".dropdown-list-wrapper");
await i.locator("ul.list li", { hasText: s }).click(), await i.waitFor({ state: "detached" });
}

@@ -1142,55 +1161,329 @@ async isMenuOpened() {

async dragAndDrop({ testId: t, item: e, isLockedItem: o }) {
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST, h = await (await this.getListItemLocator({
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST, p = await (await this.getListItemLocator({
testId: t,
item: e,
modifier: i
modifier: s
})).locator(".item.drag-allowed").first().boundingBox();
if (h) {
const k = h.x, D = h.y;
await this.page.mouse.move(k, D), await this.page.mouse.down(), await this.page.mouse.move(k + 20, D - 20), await this.page.mouse.up();
if (p) {
const u = p.x, y = p.y;
await this.page.mouse.move(u, y), await this.page.mouse.down(), await this.page.mouse.move(u + 20, y - 20), await this.page.mouse.up();
}
}
async getListOrder() {
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o, i) => (e[i + 1] = o, e), {});
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o, s) => (e[s + 1] = o, e), {});
}
async searchForItem({ testId: t, searchTerm: e }) {
return await this.page.getByTestId(n(t, r.FIELD)).fill(e), this.page.getByTestId(n(t, T.CONTAINER)).locator("ul > li span").first().textContent();
return await this.page.getByTestId(n(t, l.FIELD)).fill(e), this.page.getByTestId(n(t, h.CONTAINER)).locator("ul > li span").first().textContent();
}
// returns array of booleans according to the search results in each group
async verifySearchResultDisplayed({ testId: t, item: e }) {
const o = [], i = await this.page.getByTestId(n(t, T.CONTAINER)).all();
let l;
for (const h of i)
l = await h.locator(".child-list span", { hasText: e }).count(), o.push(l > 0);
const o = [], s = await this.page.getByTestId(n(t, h.CONTAINER)).all();
let i;
for (const p of s)
i = await p.locator(".child-list span", { hasText: e }).count(), o.push(i > 0);
return o;
}
async getSelectedItem(t) {
return this.page.getByTestId(n(t, T.CONTAINER)).locator(".sortable-item--selected").textContent();
return this.page.getByTestId(n(t, h.CONTAINER)).locator(".sortable-item--selected").textContent();
}
}
class $t {
constructor(t) {
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = n(t, V.WRAPPER);
await this.page.getByTestId(e).waitFor({ state: "visible" });
}
async selectView({ view: t, testId: e }) {
const o = `[text="${t}"]`, s = n(e, V.WRAPPER);
await (await this.page.getByTestId(s).locator(o)).click();
}
}
class ft {
constructor(t) {
r(this, "page");
this.page = t;
}
async waitForComponent({ testId: t }) {
const e = n(t, L.WRAPPER);
await this.page.getByTestId(e).waitFor({ state: "visible" });
}
async openDateRangeComponent(t) {
const e = n(t, L.TRIGGER);
await (await this.page.getByTestId(e)).click();
}
async selectDateRangeMenu({
testId: t,
option: e
}) {
await this.openDateRangeComponent(t);
const o = n(t, L.MENU);
await (await this.page.getByTestId(
`${o}-${e}`
)).click();
}
// month year should be the calendar month title, like - "May 2024"
async selectSpecificDates({
testId: t,
startMonthYear: e,
startDate: o,
endMonthYear: s,
endDate: i
}) {
await this.openDateRangeComponent(t);
const p = await this.goToStartMonthYear(e);
await (await this.getDayElement(
p,
o
)).click();
const y = await this.goToEndMonthYear(s);
await (await this.getDayElement(y, i)).click();
}
async getDayElement(t, e) {
const o = await t.locator(".date-wrapper").all();
for (const s of o)
if (await s.textContent() === e)
return s;
return null;
}
async goToStartMonthYear(t) {
let o = 1;
for (; o < 24; ) {
const s = await this.page.$$(".month-header span.month-name");
for (const p of s)
if (await p.textContent() === t)
return this.page.locator(".calendar-month", {
hasText: t
});
await (await this.page.locator(".previous")).click(), o++, await this.page.waitForTimeout(500);
}
}
async goToEndMonthYear(t) {
let o = 1;
for (; o < 24; ) {
const s = await this.page.$$(".month-header span.month-name");
for (const p of s)
if (await p.textContent() === t)
return this.page.locator(".calendar-month", {
hasText: t
});
await (await this.page.locator(".next")).click(), o++, await this.page.waitForTimeout(500);
}
}
async getSelectedDays() {
const t = await this.page.locator("span.start-day.today").count(), e = await this.page.locator("span.selected-day-between").count(), o = await this.page.locator("span.end-day").count();
return t + e + o - 1;
}
async clickOnApply(t) {
const e = n(
t,
L.ACTION_APPLY
);
await (await this.page.getByTestId(e)).click();
}
async clickOnCancel(t) {
const e = n(
t,
L.ACTION_CANCEL
);
await (await this.page.getByTestId(e)).click();
}
async getDateRangeLabel(t) {
const e = n(t, L.TRIGGER);
return (await this.page.getByTestId(e)).textContent();
}
createRangeLabel({
startMonthYear: t,
startDate: e,
endMonthYear: o,
endDate: s
}) {
const i = {
January: "Jan",
February: "Feb",
March: "Mar",
April: "Apr",
May: "May",
June: "Jun",
July: "Jul",
August: "Aug",
September: "Sep",
October: "Oct",
November: "Nov",
December: "Dec"
}, [p, u] = t.split(" "), y = i[p], [C, S] = o.split(" "), P = i[C];
return `${y} ${e}, ${u} - ${P} ${s}, ${S}`;
}
calculateDaysBetweenDates(t) {
const [e, o] = t.split(" - ");
function s(C) {
const [S, P] = C.split(", "), [_, v] = S.split(" "), k = {
Jan: 0,
Feb: 1,
Mar: 2,
Apr: 3,
May: 4,
Jun: 5,
Jul: 6,
Aug: 7,
Sep: 8,
Oct: 9,
Nov: 10,
Dec: 11
}[_];
if (k === void 0)
throw new Error(`Invalid month: ${_}`);
return new Date(parseInt(P), k, parseInt(v));
}
const i = s(e), y = (s(o).getTime() - i.getTime()) / (1e3 * 60 * 60 * 24);
return Math.floor(y + 1);
}
}
const q = ".header-texts .header-row", tt = ".container .font-body-2", ht = ".font-caption", et = ".legend__list li", z = `${et} ${tt}`, dt = "chart-legend-search-clear", ut = ".checkboxes svg.checked";
class Gt {
constructor(t) {
r(this, "page");
r(this, "inputComponent");
r(this, "dropdownComponent");
this.page = t, this.inputComponent = new N(t), this.dropdownComponent = new Z(t);
}
async waitForComponent(t) {
const e = n(t, d.CONTAINER);
await this.page.getByTestId(e).waitFor({ state: "visible" });
}
async getChartHeaderData({
testId: t,
chartTitle: e,
extraChartIndex: o
}) {
var s, i, p;
try {
const u = o !== "" ? `${n(
t,
d.EXTRA_CHART
)}-${o}-${d.HEADER}` : n(t, d.HEADER), y = o !== "" ? `${n(
t,
d.EXTRA_CHART
)}-${o}-${d.TREND}` : n(t, d.TREND), C = await this.page.getByTestId(u), S = C.locator(q, {
hasText: e
}), P = C.locator(q).nth(1), _ = C.getByTestId(y), v = ((s = await S.textContent()) == null ? void 0 : s.trim().replace(":", "")) || null, J = ((i = await P.textContent()) == null ? void 0 : i.trim()) || null, k = ((p = await _.textContent()) == null ? void 0 : p.trim()) || null, at = await _.evaluate((nt) => {
const H = nt.className;
return H.includes("up") ? "up" : H.includes("down") ? "down" : H.includes("neutral") ? "neutral" : "unknown";
});
return {
title: v,
value: J,
trend: k,
trendDirection: at
};
} catch (u) {
return console.error(
`Failed to retrieve chart header data for testId: ${t}, chartTitle: ${e}`,
u
), null;
}
}
async getLegend(t) {
return this.page.getByTestId(
`${n(t, d.LEGEND)}-${d.LEGEND_CONTAINER}`
);
}
async selectLegendItem({
testId: t,
itemToSelect: e
}) {
const s = await (await this.getLegend(t)).locator(z).all();
for (const i of s)
await i.textContent() === e && await i.click();
}
async clearLegendSearch(t) {
const e = n(t, dt);
await this.page.getByTestId(e).click();
}
async searchAndSelectLegendItems({
testId: t,
itemsToSelect: e
}) {
const o = n(t, d.LEGEND);
for (const s of e)
await this.inputComponent.addInput({
testId: o,
text: s
}), await this.selectLegendItem({
testId: t,
itemToSelect: s
}), await this.clearLegendSearch(t);
}
async getLegendItems(t) {
const e = [], s = await (await this.getLegend(t)).locator(z).all();
for (const i of s) {
const p = await i.textContent();
e.push(p);
}
return e;
}
async getSelectedItems(t) {
const e = [], s = await (await this.getLegend(t)).locator(et).all();
for (const i of s)
if (await i.locator(ut).count() > 0) {
const u = await i.locator(tt).textContent(), y = await i.locator(ht).textContent();
e.push({ itemLabel: u, subLabel: y });
}
return e;
}
async sortBy({ testId: t, sortType: e }) {
const o = `${n(
t,
d.LEGEND
)}-chart-legend-sort`;
await this.page.getByTestId(o).click(), await this.dropdownComponent.selectDropdownOptionByName({
testId: o,
name: e,
shouldOpen: !1
});
}
async getSortOptions(t) {
const e = `${n(
t,
d.LEGEND
)}-chart-legend-sort`, o = {
testId: e
};
await this.page.getByTestId(e).click();
const s = await this.dropdownComponent.getDropdownOptionsV2(
o
);
return await this.page.getByTestId(e).click(), s;
}
}
export {
Tt as AlertComponent,
gt as AppHeaderComponent,
Q as BannerComponent,
K as ButtonComponent,
Z as ComponentBasePage,
M as DialogComponent,
X as DropdownComponent,
tt as DropdownComponentV3,
F as FieldHelpTextComponent,
A as FieldLabelComponent,
lt as FormCardComponent,
ct as FormRowComponent,
et as IncludeExcludeComponent,
j as InlineCopyComponent,
at as InputsComponent,
rt as MultiBarComponent,
pt as SearchComponent,
st as SnackbarComponent,
dt as SortableListComponent,
it as TableComponent,
nt as TabsComponent,
ht as TextAreaComponent,
ot as TooltipComponent,
ut as TreeDropdownComponent
_t as AlertComponent,
Pt as AppHeaderComponent,
Et as BannerComponent,
lt as ButtonComponent,
wt as ComponentBasePage,
ft as DateRangeComponent,
Ct as DialogComponent,
Z as DropdownComponent,
mt as DropdownComponentV3,
Y as FieldHelpTextComponent,
D as FieldLabelComponent,
bt as FormCardComponent,
Nt as FormRowComponent,
It as IncludeExcludeComponent,
pt as InlineCopyComponent,
Bt as InputsComponent,
Ot as MultiBarComponent,
Gt as MultiChartComponent,
St as SearchComponent,
Rt as SnackbarComponent,
Ft as SortableListComponent,
$t as SwitchComponent,
xt as TableComponent,
Lt as TabsComponent,
Dt as TextAreaComponent,
At as TooltipComponent,
kt as TreeDropdownComponent
};

@@ -15,6 +15,7 @@ import { Page } from '@playwright/test';

selectDropdownOptionByName({ testId, name, shouldOpen, }: SelectionByName): Promise<void>;
selectDropdownOptionByNameV2({ testId, name, shouldOpen, }: SelectionByName): Promise<void>;
clearAllOptions({ testId }: {
testId: string;
}): Promise<void>;
selectMultipleItemsByIndex({ testId, itemsToSelect }: SelectMultiple): Promise<void>;
selectMultipleItemsByIndex({ testId, itemsToSelect, shouldOpen, }: SelectMultiple): Promise<void>;
selectMultipleItemsByName({ testId, itemsToSelect, shouldClearAll, }: SelectMultipleByName): Promise<void>;

@@ -21,0 +22,0 @@ clickOnApply({ testId }: {

@@ -50,3 +50,6 @@ import { Page } from '@playwright/test';

}): Promise<string[]>;
getDropdownOptionsV2({ testId }: {
testId: string;
}): Promise<any[]>;
}
export {};

@@ -14,2 +14,3 @@ export type SelectionByIndex = {

shouldClearAll?: boolean;
shouldOpen?: boolean;
};

@@ -16,0 +17,0 @@ export type SelectMultipleByName = {

@@ -31,1 +31,4 @@ export * from './global/types';

export * from './components/sortablelist/sortable-list-component.ts';
export * from './components/switch/switch-component.ts';
export * from './components/date-range/date-range-component.ts';
export * from './components/chart/multiChart/multi-chart-component.ts';

@@ -32,2 +32,14 @@ export declare enum IncludeExcludeTestIdModifiers {

}
export declare enum ColumnPickerTestIdModifiers {
TRIGGER = "column-picker-trigger",
WRAPPER = "column-picker-wrapper"
}
export declare enum ColumnConfiguratorTestIdModifiers {
WRAPPER = "column-configurator-wrapper",
SECTION_HEADER = "column-configurator-section-header",
ADD_BUTTON = "column-configurator-add-button",
DROPDOWN = "column-configurator-dropdown",
LIST = "column-configurator-list",
REMOVE_BUTTON = "column-configurator-remove-button"
}
export declare enum BannerTestIdModifiers {

@@ -37,2 +49,6 @@ WRAPPER = "banner-wrapper",

}
export declare enum LinkTestIdModifiers {
WRAPPER = "link-wrapper",
ICON = "link-icon"
}
export declare enum AlertTestIdModifiers {

@@ -65,4 +81,11 @@ WRAPPER = "alert-wrapper",

EXTRA_TEXT = "input-extra-text",
TOGGLE_PASSWORD = "input-toggle-password-icon"
TOGGLE_PASSWORD = "input-toggle-password-icon",
CLEAR_BUTTON = "input-clear-button",
LOADING = "input-loading"
}
export declare enum TagsFieldTestIdModifiers {
WRAPPER = "tags-field-wrapper",
FIELD = "tags-field-field",
CHIP = "tags-field-chip"
}
export declare enum CheckboxTestIdModifiers {

@@ -236,1 +259,24 @@ WRAPPER = "cb-wrapper",

}
export declare enum ChartTestIdModifiers {
CONTAINER = "chart-container",
HEADER = "chart-header",
TREND = "chart-trend",
TYPE_SWITCHER = "chart-type-switcher",
LEGEND = "chart-legend",
LEGEND_CONTAINER = "chart-legend-container",
LEGEND_SORT = "chart-legend-sort",
EXTRA_CHART = "chart-extra-chart",
LOADER = "chart-loader"
}
export declare enum ChartSettingsHeaderTestIdModifiers {
CONTAINER = "chart-settings-header-container",
TYPE_DROPDOWN = "chart-settings-header-type-dropdown"
}
export declare enum ChartTooltipTestIdModifiers {
CONTAINER = "chart-tooltip-container"
}
export declare enum EmptyStateTestIdModifiers {
CONTAINER = "empty-state-container",
TITLE = "empty-state-title",
SUBTITLE = "empty-state-subtitle"
}

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc