@ironsource/shared-ui-e2e 2.1.12-rc.32 → 2.1.12-rc.36
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 +276 -195
- package/shared-e2e-commands.umd.cjs +1 -1
- package/tests/components/date-range/consts.d.ts +3 -0
- package/tests/components/date-range/date-range-component.d.ts +25 -0
- package/tests/components/date-range/date-range-page.d.ts +19 -0
- package/tests/components/date-range/types.d.ts +16 -0
- package/tests/index.d.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/shared-e2e-commands.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var c = (a, t, e) => (
|
|
4
|
-
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 || {}),
|
|
5
|
-
const
|
|
1
|
+
var j = Object.defineProperty;
|
|
2
|
+
var q = (a, t, e) => t in a ? j(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var c = (a, t, e) => (q(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
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 || {}), i = /* @__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))(i || {}), b = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(b || {}), 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 || {}), F = /* @__PURE__ */ ((a) => (a.WRAPPER = "swicth-wrapper", a.BUTTON = "swicth-button", a.TEXT = "swicth-text", a))(F || {}), E = /* @__PURE__ */ ((a) => (a.WRAPPER = "ta-wrapper", a.LABEL = "ta-label", a.FIELD = "ta-field", a.TEXT = "ta-text", a))(E || {}), P = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(P || {}), 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 || {}), N = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(N || {}), C = /* @__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))(C || {}), B = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(B || {}), A = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(A || {}), 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 || {}), I = /* @__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))(I || {}), S = /* @__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))(S || {}), $ = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))($ || {}), x = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(x || {}), T = /* @__PURE__ */ ((a) => (a.CONTAINER = "sortable-list-container", a.DRAGGABLE_LIST = "sortable-list-draggable-list", a.LOCKED_LIST = "sortable-list-locked-list", a))(T || {});
|
|
5
|
+
const z = (a, t) => {
|
|
6
6
|
const e = new URLSearchParams(a).toString();
|
|
7
7
|
return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
|
|
8
|
-
},
|
|
8
|
+
}, Q = (a, t = {}) => {
|
|
9
9
|
const e = [];
|
|
10
10
|
Object.entries(t).forEach(([l, h]) => {
|
|
11
11
|
e.push(`${l}:${h}`);
|
|
@@ -15,25 +15,25 @@ const V = (a, t) => {
|
|
|
15
15
|
viewMode: "story",
|
|
16
16
|
args: e.join(";")
|
|
17
17
|
};
|
|
18
|
-
return
|
|
18
|
+
return z(o, "iframe.html");
|
|
19
19
|
}, n = (a, t) => `${a}-${t}`;
|
|
20
|
-
class
|
|
20
|
+
class it {
|
|
21
21
|
constructor(t) {
|
|
22
22
|
c(this, "page");
|
|
23
23
|
this.page = t;
|
|
24
24
|
}
|
|
25
25
|
async waitForComponent({ testId: t }) {
|
|
26
|
-
const e = `[data-testid='${t}-${
|
|
26
|
+
const e = `[data-testid='${t}-${b.WRAPPER}']`;
|
|
27
27
|
await this.page.waitForSelector(e);
|
|
28
28
|
}
|
|
29
29
|
getBannerText({ testId: t }) {
|
|
30
|
-
return this.page.getByTestId(n(t,
|
|
30
|
+
return this.page.getByTestId(n(t, b.CONTENT)).textContent();
|
|
31
31
|
}
|
|
32
32
|
hasBannerType({ testId: t, type: e }) {
|
|
33
|
-
return this.page.getByTestId(n(t,
|
|
33
|
+
return this.page.getByTestId(n(t, b.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
class
|
|
36
|
+
class ct {
|
|
37
37
|
constructor(t) {
|
|
38
38
|
c(this, "page");
|
|
39
39
|
c(this, "testId");
|
|
@@ -47,14 +47,14 @@ class M {
|
|
|
47
47
|
...t.additionalComponentParams
|
|
48
48
|
};
|
|
49
49
|
await this.page.goto(
|
|
50
|
-
|
|
50
|
+
Q(
|
|
51
51
|
t.storyId || this.componentId,
|
|
52
52
|
e
|
|
53
53
|
)
|
|
54
54
|
), await this.page.waitForSelector(this.loadedPageSelector);
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
|
-
class
|
|
57
|
+
class rt {
|
|
58
58
|
constructor(t) {
|
|
59
59
|
c(this, "page");
|
|
60
60
|
this.page = t;
|
|
@@ -104,42 +104,42 @@ class tt {
|
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class U {
|
|
108
108
|
constructor(t) {
|
|
109
109
|
c(this, "page");
|
|
110
110
|
this.page = t;
|
|
111
111
|
}
|
|
112
112
|
async waitForComponent({ testId: t }) {
|
|
113
113
|
await this.page.getByTestId(
|
|
114
|
-
n(t,
|
|
114
|
+
n(t, i.WRAPPER)
|
|
115
115
|
);
|
|
116
116
|
}
|
|
117
117
|
async selectDropdownOptionByIndex({
|
|
118
118
|
testId: t,
|
|
119
119
|
index: e
|
|
120
120
|
}) {
|
|
121
|
-
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
121
|
+
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li").nth(e).click();
|
|
122
122
|
}
|
|
123
123
|
getDropdownButtonContent(t) {
|
|
124
|
-
return this.page.getByTestId(n(t,
|
|
124
|
+
return this.page.getByTestId(n(t, i.BUTTON_CONTENT)).textContent();
|
|
125
125
|
}
|
|
126
126
|
async openDropdownComponent({ testId: t }) {
|
|
127
|
-
await this.page.getByTestId(n(t,
|
|
127
|
+
await this.page.getByTestId(n(t, i.TRIGGER)).click({ position: { x: 15, y: 15 } });
|
|
128
128
|
}
|
|
129
129
|
async selectDropdownOptionByName({
|
|
130
130
|
testId: t,
|
|
131
131
|
name: e,
|
|
132
132
|
shouldOpen: o = !0
|
|
133
133
|
}) {
|
|
134
|
-
o && await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
134
|
+
o && await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li div.text-container", { hasText: e }).click();
|
|
135
135
|
}
|
|
136
136
|
async clearAllOptions({ testId: t }) {
|
|
137
|
-
await this.page.getByTestId(n(t,
|
|
137
|
+
await this.page.getByTestId(n(t, i.ACTION_CLEAR_ALL)).click();
|
|
138
138
|
}
|
|
139
139
|
async selectMultipleItemsByIndex({ testId: t, itemsToSelect: e }) {
|
|
140
140
|
await this.openDropdownComponent({ testId: t }), await this.clearAllOptions({ testId: t });
|
|
141
141
|
for (const o of e)
|
|
142
|
-
await this.page.getByTestId(n(t,
|
|
142
|
+
await this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li").nth(o).click();
|
|
143
143
|
}
|
|
144
144
|
async selectMultipleItemsByName({
|
|
145
145
|
testId: t,
|
|
@@ -149,38 +149,38 @@ class f {
|
|
|
149
149
|
await this.openDropdownComponent({ testId: t }), o && await this.clearAllOptions({
|
|
150
150
|
testId: t
|
|
151
151
|
});
|
|
152
|
-
for (const
|
|
153
|
-
await this.page.getByTestId(n(t,
|
|
152
|
+
for (const s of e)
|
|
153
|
+
await this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li span", { hasText: s }).first().click();
|
|
154
154
|
}
|
|
155
155
|
async clickOnApply({ testId: t }) {
|
|
156
|
-
await this.page.getByTestId(n(t,
|
|
156
|
+
await this.page.getByTestId(n(t, i.ACTION_APPLY)).click();
|
|
157
157
|
}
|
|
158
158
|
async clickOnCancel({ testId: t }) {
|
|
159
|
-
await this.page.getByTestId(n(t,
|
|
159
|
+
await this.page.getByTestId(n(t, i.ACTION_CANCEL)).click();
|
|
160
160
|
}
|
|
161
161
|
async isValidationAppear({ testId: t }) {
|
|
162
|
-
return (await this.page.getByTestId(n(t,
|
|
162
|
+
return (await this.page.getByTestId(n(t, i.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error");
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
class
|
|
165
|
+
class R {
|
|
166
166
|
constructor(t) {
|
|
167
167
|
c(this, "page");
|
|
168
168
|
this.page = t;
|
|
169
169
|
}
|
|
170
170
|
getLabelText({ testId: t }) {
|
|
171
|
-
return this.page.getByTestId(n(t,
|
|
171
|
+
return this.page.getByTestId(n(t, A.TEXT)).textContent();
|
|
172
172
|
}
|
|
173
173
|
isMandatory({ testId: t }) {
|
|
174
|
-
return this.page.getByTestId(n(t,
|
|
174
|
+
return this.page.getByTestId(n(t, A.MANDATORY)).isVisible();
|
|
175
175
|
}
|
|
176
176
|
async getHelpIconText({ testId: t }) {
|
|
177
177
|
const e = await this.page.getByTestId(
|
|
178
|
-
n(t,
|
|
178
|
+
n(t, A.TOOLTIP)
|
|
179
179
|
);
|
|
180
180
|
return await e.hover(), e.getAttribute("text");
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
class
|
|
183
|
+
class G {
|
|
184
184
|
constructor(t) {
|
|
185
185
|
c(this, "page");
|
|
186
186
|
this.page = t;
|
|
@@ -195,12 +195,12 @@ class k {
|
|
|
195
195
|
return await (await this.page.getByTestId(n(t, w.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
class
|
|
198
|
+
class Z extends U {
|
|
199
199
|
constructor(e) {
|
|
200
200
|
super(e);
|
|
201
201
|
c(this, "fieldLabelComponent");
|
|
202
202
|
c(this, "fieldHelpTextComponent");
|
|
203
|
-
this.fieldLabelComponent = new
|
|
203
|
+
this.fieldLabelComponent = new R(e), this.fieldHelpTextComponent = new G(e);
|
|
204
204
|
}
|
|
205
205
|
getDropdownTitle({ testId: e }) {
|
|
206
206
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -221,54 +221,54 @@ class Y extends f {
|
|
|
221
221
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
|
|
222
222
|
}
|
|
223
223
|
async getSelectedLabel({ testId: e }) {
|
|
224
|
-
let
|
|
224
|
+
let s = await this.page.getByTestId(n(e, i.BUTTON_CONTENT)).textContent();
|
|
225
225
|
if (await this.page.getByTestId(
|
|
226
|
-
n(e,
|
|
226
|
+
n(e, i.BUTTON_CONTENT_SUFFIX)
|
|
227
227
|
).isVisible({ timeout: 1e3 })) {
|
|
228
228
|
const h = await this.page.getByTestId(
|
|
229
|
-
n(e,
|
|
229
|
+
n(e, i.BUTTON_CONTENT_SUFFIX)
|
|
230
230
|
).textContent();
|
|
231
|
-
|
|
231
|
+
s = `${s}${h}`;
|
|
232
232
|
}
|
|
233
|
-
return
|
|
233
|
+
return s;
|
|
234
234
|
}
|
|
235
235
|
async searchForItem({ testId: e, searchTerm: o }) {
|
|
236
|
-
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, r.FIELD)).fill(o), this.page.getByTestId(n(e,
|
|
236
|
+
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, r.FIELD)).fill(o), this.page.getByTestId(n(e, i.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
237
237
|
}
|
|
238
238
|
async isErrorText({ testId: e }) {
|
|
239
239
|
return await this.page.getByTestId(n(e, w.TEXT)).count() > 0;
|
|
240
240
|
}
|
|
241
241
|
async isDisabled({ testId: e }) {
|
|
242
|
-
return (await this.page.getByTestId(n(e,
|
|
242
|
+
return (await this.page.getByTestId(n(e, i.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
243
243
|
}
|
|
244
244
|
isSelectAllChecked({ testId: e }) {
|
|
245
|
-
return this.page.getByTestId(n(e,
|
|
245
|
+
return this.page.getByTestId(n(e, i.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
246
246
|
}
|
|
247
247
|
isSelectAllIndeterminate({ testId: e }) {
|
|
248
|
-
return this.page.getByTestId(n(e,
|
|
248
|
+
return this.page.getByTestId(n(e, i.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
249
249
|
}
|
|
250
250
|
async removeChipSelection({ testId: e }) {
|
|
251
|
-
await this.page.getByTestId(n(e,
|
|
251
|
+
await this.page.getByTestId(n(e, i.BUTTON_CLEAR)).click();
|
|
252
252
|
}
|
|
253
253
|
getDropdownOptions({ testId: e }) {
|
|
254
|
-
return this.page.getByTestId(n(e,
|
|
254
|
+
return this.page.getByTestId(n(e, i.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
class
|
|
257
|
+
class lt extends U {
|
|
258
258
|
constructor(t) {
|
|
259
259
|
super(t);
|
|
260
260
|
}
|
|
261
261
|
getDropdownTitle({ testId: t }) {
|
|
262
|
-
return this.page.getByTestId(n(t,
|
|
262
|
+
return this.page.getByTestId(n(t, i.WRAPPER)).locator("label > span").textContent();
|
|
263
263
|
}
|
|
264
264
|
getSelectedItem({ testId: t }) {
|
|
265
|
-
return this.page.getByTestId(n(t,
|
|
265
|
+
return this.page.getByTestId(n(t, i.TRIGGER)).locator("button > span").textContent();
|
|
266
266
|
}
|
|
267
267
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
268
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
268
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, P.FIELD)).fill(e), this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
class
|
|
271
|
+
class pt {
|
|
272
272
|
constructor(t) {
|
|
273
273
|
c(this, "page");
|
|
274
274
|
this.page = t;
|
|
@@ -334,7 +334,7 @@ class at {
|
|
|
334
334
|
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, g.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class V {
|
|
338
338
|
constructor(t) {
|
|
339
339
|
c(this, "page");
|
|
340
340
|
this.page = t;
|
|
@@ -358,12 +358,12 @@ class v {
|
|
|
358
358
|
return this.page.getByTestId(n(t, r.FIELD)).isDisabled();
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
class
|
|
361
|
+
class gt extends V {
|
|
362
362
|
constructor(e) {
|
|
363
363
|
super(e);
|
|
364
364
|
c(this, "fieldLabelComponent");
|
|
365
365
|
c(this, "fieldHelpTextComponent");
|
|
366
|
-
this.fieldLabelComponent = new
|
|
366
|
+
this.fieldLabelComponent = new R(e), this.fieldHelpTextComponent = new G(e);
|
|
367
367
|
}
|
|
368
368
|
getInputsLabelText({ testId: e }) {
|
|
369
369
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -394,10 +394,10 @@ class nt extends v {
|
|
|
394
394
|
testId: e,
|
|
395
395
|
inputTestId: o
|
|
396
396
|
}) {
|
|
397
|
-
const
|
|
397
|
+
const s = this.page.getByTestId(
|
|
398
398
|
n(e, o)
|
|
399
399
|
);
|
|
400
|
-
return await
|
|
400
|
+
return await s.hover(), s.getAttribute("text");
|
|
401
401
|
}
|
|
402
402
|
async clickOnShowPassword({ testId: e }) {
|
|
403
403
|
await this.isPasswordHidden({ testId: e }) && await this.clickOnPasswordIcon({ testId: e });
|
|
@@ -434,7 +434,7 @@ class nt extends v {
|
|
|
434
434
|
return (await this.getFontCaptionText({ testId: e }))[0];
|
|
435
435
|
}
|
|
436
436
|
async getFontCaptionText({ testId: e }) {
|
|
437
|
-
return (await this.page.getByTestId(n(e, r.WRAPPER)).locator(".font-caption").textContent()).split("/").map((
|
|
437
|
+
return (await this.page.getByTestId(n(e, r.WRAPPER)).locator(".font-caption").textContent()).split("/").map((s) => parseInt(s.trim(), 10));
|
|
438
438
|
}
|
|
439
439
|
getHelpIconText({ testId: e }) {
|
|
440
440
|
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
@@ -443,7 +443,7 @@ class nt extends v {
|
|
|
443
443
|
return (await this.page.getByTestId(n(e, r.WRAPPER)).getAttribute("class")).includes("variant-error");
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
|
-
class
|
|
446
|
+
class Tt {
|
|
447
447
|
constructor(t) {
|
|
448
448
|
c(this, "page");
|
|
449
449
|
this.page = t;
|
|
@@ -469,24 +469,24 @@ class ot {
|
|
|
469
469
|
return this.page.getByTestId(n(t, `${B.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
|
-
class
|
|
472
|
+
class ht {
|
|
473
473
|
constructor(t) {
|
|
474
474
|
c(this, "page");
|
|
475
475
|
this.page = t;
|
|
476
476
|
}
|
|
477
477
|
async waitForComponent({ testId: t }) {
|
|
478
|
-
const e = `[data-testid='${t}-${
|
|
478
|
+
const e = `[data-testid='${t}-${N.TRIGGER}']`;
|
|
479
479
|
await this.page.waitForSelector(e);
|
|
480
480
|
}
|
|
481
481
|
getTooltipText({ testId: t }) {
|
|
482
|
-
return this.page.getByTestId(`${t}-${
|
|
482
|
+
return this.page.getByTestId(`${t}-${N.TRIGGER}`).getAttribute("text");
|
|
483
483
|
}
|
|
484
484
|
getTooltipHeaderText({ testId: t }) {
|
|
485
|
-
return this.page.getByTestId(`${t}-${
|
|
485
|
+
return this.page.getByTestId(`${t}-${N.TRIGGER}`).getAttribute("header");
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
const
|
|
489
|
-
class
|
|
488
|
+
const m = ".table-row", D = ".icon-wrapper", f = ".states", k = ".table-head-container", W = ".table-row.loading", M = 1e3;
|
|
489
|
+
class ut {
|
|
490
490
|
constructor(t) {
|
|
491
491
|
c(this, "page");
|
|
492
492
|
this.page = t;
|
|
@@ -496,10 +496,10 @@ class st {
|
|
|
496
496
|
await this.page.waitForSelector(e);
|
|
497
497
|
}
|
|
498
498
|
getTableRowCount({ testId: t }) {
|
|
499
|
-
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(
|
|
499
|
+
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(m).count();
|
|
500
500
|
}
|
|
501
501
|
async getColumnHeaders({ testId: t }) {
|
|
502
|
-
return this.page.getByTestId(n(t, p.TABLE)).locator(
|
|
502
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(k).allTextContents();
|
|
503
503
|
}
|
|
504
504
|
getTableLabel({ testId: t }) {
|
|
505
505
|
return this.page.getByTestId(n(t, p.HEADER)).innerText();
|
|
@@ -508,7 +508,7 @@ class st {
|
|
|
508
508
|
return this.page.getByTestId(n(t, p.CONTAINER)).locator(".table-footer").innerText();
|
|
509
509
|
}
|
|
510
510
|
async clickOnHeaderByName(t) {
|
|
511
|
-
await this.page.locator(
|
|
511
|
+
await this.page.locator(k, {
|
|
512
512
|
hasText: t
|
|
513
513
|
}).click();
|
|
514
514
|
}
|
|
@@ -519,7 +519,7 @@ class st {
|
|
|
519
519
|
await this.page.getByTestId(n(t, r.FIELD)).clear(), await this.waitForTableToLoad();
|
|
520
520
|
}
|
|
521
521
|
isArrowVisible({ testId: t, headerName: e }) {
|
|
522
|
-
return this.page.getByTestId(n(t, p.TABLE)).locator(
|
|
522
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(k, { hasText: e }).locator(".table-sort-icon").isVisible();
|
|
523
523
|
}
|
|
524
524
|
async scrollDownTableRows({ testId: t }) {
|
|
525
525
|
const e = `[data-testid=${n(
|
|
@@ -527,29 +527,29 @@ class st {
|
|
|
527
527
|
p.TABLE
|
|
528
528
|
)}]`;
|
|
529
529
|
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
530
|
-
const
|
|
531
|
-
|
|
532
|
-
}, e), await this.page.waitForTimeout(
|
|
530
|
+
const s = document.querySelector(o);
|
|
531
|
+
s && (s.scrollTop = s.scrollHeight);
|
|
532
|
+
}, e), await this.page.waitForTimeout(M);
|
|
533
533
|
}
|
|
534
534
|
async waitForTableToLoad() {
|
|
535
|
-
await this.page.waitForSelector(
|
|
535
|
+
await this.page.waitForSelector(W, {
|
|
536
536
|
state: "hidden"
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
async waitingForTableLoadingToAppear() {
|
|
540
|
-
await this.page.waitForSelector(
|
|
540
|
+
await this.page.waitForSelector(W);
|
|
541
541
|
}
|
|
542
542
|
async expandRow({ testId: t, rowValue: e }) {
|
|
543
|
-
await this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(
|
|
543
|
+
await this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(m, { hasText: e }).locator(D).click();
|
|
544
544
|
}
|
|
545
545
|
isRowExpanded({ testId: t, rowValue: e }) {
|
|
546
|
-
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(
|
|
546
|
+
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(m, { hasText: e }).locator(D).isVisible();
|
|
547
547
|
}
|
|
548
548
|
async getExpandedRowContent({ testId: t, rowValue: e }) {
|
|
549
549
|
return await this.isRowExpanded({
|
|
550
550
|
testId: t,
|
|
551
551
|
rowValue: e
|
|
552
|
-
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(
|
|
552
|
+
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(m, { hasText: e }).locator(D).textContent();
|
|
553
553
|
}
|
|
554
554
|
isEmptyStateVisible({ testId: t }) {
|
|
555
555
|
return this.page.getByTestId(n(t, p.TABLE)).locator(".empty-state").isVisible();
|
|
@@ -561,15 +561,15 @@ class st {
|
|
|
561
561
|
return this.page.getByTestId(n(t, p.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
562
562
|
}
|
|
563
563
|
async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
|
|
564
|
-
await this.page.getByTestId(n(t, p.TABLE)).locator(
|
|
564
|
+
await this.page.getByTestId(n(t, p.TABLE)).locator(m, {
|
|
565
565
|
hasText: e
|
|
566
|
-
}).locator(
|
|
566
|
+
}).locator(f).click();
|
|
567
567
|
}
|
|
568
568
|
getCheckedRowsNumber({ testId: t }) {
|
|
569
|
-
return this.page.getByTestId(n(t, p.TABLE)).locator(
|
|
569
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(m).locator(".icon.checked").count();
|
|
570
570
|
}
|
|
571
571
|
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
572
|
-
await this.page.getByTestId(n(t, p.TABLE)).locator(
|
|
572
|
+
await this.page.getByTestId(n(t, p.TABLE)).locator(f).nth(0).click();
|
|
573
573
|
}
|
|
574
574
|
getTableLocator({ testId: t }) {
|
|
575
575
|
return this.page.getByTestId(
|
|
@@ -580,7 +580,7 @@ class st {
|
|
|
580
580
|
return this.getTableLocator({ testId: t }).locator(e).allTextContents();
|
|
581
581
|
}
|
|
582
582
|
}
|
|
583
|
-
class
|
|
583
|
+
class tt {
|
|
584
584
|
constructor(t) {
|
|
585
585
|
c(this, "page");
|
|
586
586
|
this.page = t;
|
|
@@ -602,7 +602,7 @@ class j {
|
|
|
602
602
|
return this.page.getByTestId(t).isDisabled();
|
|
603
603
|
}
|
|
604
604
|
}
|
|
605
|
-
class
|
|
605
|
+
class dt {
|
|
606
606
|
constructor(t) {
|
|
607
607
|
c(this, "page");
|
|
608
608
|
this.page = t;
|
|
@@ -628,8 +628,8 @@ class ct {
|
|
|
628
628
|
const o = await this.getActionButtonIndex({
|
|
629
629
|
testId: t,
|
|
630
630
|
buttonName: e
|
|
631
|
-
}),
|
|
632
|
-
await this.page.click(
|
|
631
|
+
}), s = `[data-testid='${t}-${y.ACTION_BUTTON}-${o}']`;
|
|
632
|
+
await this.page.click(s);
|
|
633
633
|
}
|
|
634
634
|
async getActionButtonIndex({
|
|
635
635
|
testId: t,
|
|
@@ -638,89 +638,89 @@ class ct {
|
|
|
638
638
|
return (await this.page.getByTestId(n(t, y.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
|
-
class
|
|
641
|
+
class yt {
|
|
642
642
|
constructor(t) {
|
|
643
643
|
c(this, "page");
|
|
644
644
|
this.page = t;
|
|
645
645
|
}
|
|
646
646
|
async waitForComponent({ testId: t }) {
|
|
647
|
-
const e = `[data-testid='${t}-${
|
|
647
|
+
const e = `[data-testid='${t}-${x.WRAPPER}']`;
|
|
648
648
|
await this.page.waitForSelector(e);
|
|
649
649
|
}
|
|
650
650
|
async closeMultiBar({ testId: t }) {
|
|
651
|
-
await this.page.getByTestId(n(t,
|
|
651
|
+
await this.page.getByTestId(n(t, x.CLOSE_BTN)).locator(".icon-wrapper").click();
|
|
652
652
|
}
|
|
653
653
|
getMultiBarCountText({ testId: t }) {
|
|
654
|
-
return this.page.getByTestId(n(t,
|
|
654
|
+
return this.page.getByTestId(n(t, x.WRAPPER)).locator(".count-text").textContent();
|
|
655
655
|
}
|
|
656
656
|
async isMultiBarVisible({ testId: t }) {
|
|
657
|
-
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t,
|
|
657
|
+
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, x.WRAPPER)).locator(".multi-bar-panel").isVisible();
|
|
658
658
|
}
|
|
659
659
|
async clickOnActionButton({ testId: t, actionButtonId: e }) {
|
|
660
660
|
await this.page.getByTestId(
|
|
661
661
|
n(
|
|
662
662
|
t,
|
|
663
|
-
`${
|
|
663
|
+
`${x.ACTION}-${e}`
|
|
664
664
|
)
|
|
665
665
|
).locator(".start-icon").click();
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
|
-
class
|
|
668
|
+
class wt {
|
|
669
669
|
constructor(t) {
|
|
670
670
|
c(this, "page");
|
|
671
671
|
this.page = t;
|
|
672
672
|
}
|
|
673
673
|
async waitForComponent({ testId: t }) {
|
|
674
|
-
const e = `[data-testid='${t}-${
|
|
674
|
+
const e = `[data-testid='${t}-${A.TEXT}']`;
|
|
675
675
|
await this.page.waitForSelector(e);
|
|
676
676
|
}
|
|
677
677
|
getFormRowTitle({ testId: t }) {
|
|
678
|
-
return new
|
|
678
|
+
return new R(this.page).getLabelText({ testId: t });
|
|
679
679
|
}
|
|
680
680
|
isFormRowMandatory({ testId: t }) {
|
|
681
|
-
return new
|
|
681
|
+
return new R(this.page).isMandatory({ testId: t });
|
|
682
682
|
}
|
|
683
683
|
getIconText({ testId: t }) {
|
|
684
|
-
return new
|
|
684
|
+
return new G(this.page).getExtraText({ testId: t });
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
|
-
class
|
|
687
|
+
class Et {
|
|
688
688
|
constructor(t) {
|
|
689
689
|
c(this, "page");
|
|
690
690
|
this.page = t;
|
|
691
691
|
}
|
|
692
692
|
async waitForComponent({ testId: t }) {
|
|
693
|
-
const e = `[data-testid='${t}-${
|
|
693
|
+
const e = `[data-testid='${t}-${I.CONTENT}']`;
|
|
694
694
|
await this.page.waitForSelector(e);
|
|
695
695
|
}
|
|
696
696
|
getCardTitle({ testId: t }) {
|
|
697
|
-
return this.page.getByTestId(n(t,
|
|
697
|
+
return this.page.getByTestId(n(t, I.TITLE)).textContent();
|
|
698
698
|
}
|
|
699
699
|
getCardContentText({ testId: t }) {
|
|
700
|
-
return this.page.getByTestId(n(t,
|
|
700
|
+
return this.page.getByTestId(n(t, I.CONTENT)).textContent();
|
|
701
701
|
}
|
|
702
702
|
getCardLabelText({ testId: t }) {
|
|
703
|
-
return new
|
|
703
|
+
return new R(this.page).getLabelText({ testId: t });
|
|
704
704
|
}
|
|
705
705
|
async clickOnSaveButton({ testId: t }) {
|
|
706
|
-
await this.page.getByTestId(n(t,
|
|
706
|
+
await this.page.getByTestId(n(t, I.SAVE_BUTTON)).click();
|
|
707
707
|
}
|
|
708
708
|
async clickOnCancelButton({ testId: t }) {
|
|
709
|
-
await this.page.getByTestId(n(t,
|
|
709
|
+
await this.page.getByTestId(n(t, I.CANCEL_BUTTON)).click();
|
|
710
710
|
}
|
|
711
711
|
isSaveButtonLoading({ testId: t }) {
|
|
712
|
-
return new
|
|
712
|
+
return new tt(this.page).isButtonLoading({ testId: t });
|
|
713
713
|
}
|
|
714
714
|
async clearForm({
|
|
715
715
|
testId: t,
|
|
716
716
|
inputType: e
|
|
717
717
|
}) {
|
|
718
|
-
(await this.page.getByTestId(n(t,
|
|
718
|
+
(await this.page.getByTestId(n(t, I.CONTENT)).locator(
|
|
719
719
|
`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`
|
|
720
|
-
).all()).forEach((
|
|
720
|
+
).all()).forEach((s) => s.clear());
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
class L extends
|
|
723
|
+
class L extends V {
|
|
724
724
|
constructor(t) {
|
|
725
725
|
super(t);
|
|
726
726
|
}
|
|
@@ -760,13 +760,13 @@ class L extends v {
|
|
|
760
760
|
await (await this.page.getByTestId(n(t, r.WRAPPER)).locator(".password-visibility")).click();
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
|
-
class
|
|
763
|
+
class Ct {
|
|
764
764
|
constructor(t) {
|
|
765
765
|
c(this, "page");
|
|
766
766
|
this.page = t;
|
|
767
767
|
}
|
|
768
768
|
async waitForComponent({ testId: t }) {
|
|
769
|
-
const e = `[data-testid='${t}-${
|
|
769
|
+
const e = `[data-testid='${t}-${P.CONTAINER}']`;
|
|
770
770
|
await this.page.waitForSelector(e);
|
|
771
771
|
}
|
|
772
772
|
async searchInput({ testId: t, searchTerm: e }) {
|
|
@@ -776,7 +776,7 @@ class gt {
|
|
|
776
776
|
await new L(this.page).clearInput({ testId: t });
|
|
777
777
|
}
|
|
778
778
|
async clickOnXButton({ testId: t }) {
|
|
779
|
-
await this.page.getByTestId(n(t,
|
|
779
|
+
await this.page.getByTestId(n(t, P.CLEAR)).locator(".icon-name--x-circle").click();
|
|
780
780
|
}
|
|
781
781
|
isDisabled({ testId: t }) {
|
|
782
782
|
return new L(this.page).isDisabled({ testId: t });
|
|
@@ -788,33 +788,33 @@ class gt {
|
|
|
788
788
|
return new L(this.page).getInputsFieldText({ testId: t });
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
|
-
class
|
|
791
|
+
class et {
|
|
792
792
|
constructor(t) {
|
|
793
793
|
c(this, "page");
|
|
794
794
|
this.page = t;
|
|
795
795
|
}
|
|
796
796
|
async waitForComponent({ testId: t }) {
|
|
797
|
-
const e = `[data-testid='${t}-${
|
|
797
|
+
const e = `[data-testid='${t}-${$.TEXT}']`;
|
|
798
798
|
await this.page.waitForSelector(e);
|
|
799
799
|
}
|
|
800
800
|
getInlineCopyText({ testId: t }) {
|
|
801
|
-
return this.page.getByTestId(`${t}-${
|
|
801
|
+
return this.page.getByTestId(`${t}-${$.TEXT}`).textContent();
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
class
|
|
804
|
+
class It {
|
|
805
805
|
constructor(t) {
|
|
806
806
|
c(this, "page");
|
|
807
807
|
this.page = t;
|
|
808
808
|
}
|
|
809
809
|
async waitForComponent({ testId: t }) {
|
|
810
|
-
const e = `[data-testid='${t}-${
|
|
810
|
+
const e = `[data-testid='${t}-${S.TITLE}']`;
|
|
811
811
|
await this.page.waitForSelector(e);
|
|
812
812
|
}
|
|
813
813
|
getHeaderTitle({ testId: t }) {
|
|
814
|
-
return this.page.getByTestId(`${t}-${
|
|
814
|
+
return this.page.getByTestId(`${t}-${S.TITLE}`).textContent();
|
|
815
815
|
}
|
|
816
816
|
getInlineCopyText({ testId: t }) {
|
|
817
|
-
return new
|
|
817
|
+
return new et(this.page).getInlineCopyText({
|
|
818
818
|
testId: t
|
|
819
819
|
});
|
|
820
820
|
}
|
|
@@ -822,10 +822,10 @@ class Tt {
|
|
|
822
822
|
testId: t,
|
|
823
823
|
iconName: e
|
|
824
824
|
}) {
|
|
825
|
-
return await this.page.getByTestId(`${t}-${
|
|
825
|
+
return await this.page.getByTestId(`${t}-${S.APP_PLATFORM}`).getAttribute("data-platform") === e;
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
class
|
|
828
|
+
class mt {
|
|
829
829
|
constructor(t) {
|
|
830
830
|
c(this, "page");
|
|
831
831
|
this.page = t;
|
|
@@ -858,34 +858,34 @@ class ht {
|
|
|
858
858
|
return this.page.getByTestId(n(t, d.WRAPPER)).getAttribute("class");
|
|
859
859
|
}
|
|
860
860
|
}
|
|
861
|
-
class
|
|
861
|
+
class at {
|
|
862
862
|
constructor(t) {
|
|
863
863
|
c(this, "page");
|
|
864
864
|
this.page = t;
|
|
865
865
|
}
|
|
866
866
|
async waitForComponent({ testId: t }) {
|
|
867
|
-
const e = `[data-testid='${t}-${
|
|
867
|
+
const e = `[data-testid='${t}-${E.FIELD}']`;
|
|
868
868
|
await this.page.waitForSelector(e);
|
|
869
869
|
}
|
|
870
870
|
async addInput({ testId: t, text: e }) {
|
|
871
|
-
await this.page.getByTestId(n(t,
|
|
871
|
+
await this.page.getByTestId(n(t, E.FIELD)).type(e);
|
|
872
872
|
}
|
|
873
873
|
async clearInput({ testId: t }) {
|
|
874
|
-
await this.page.getByTestId(n(t,
|
|
874
|
+
await this.page.getByTestId(n(t, E.FIELD)).clear();
|
|
875
875
|
}
|
|
876
876
|
getInput({ testId: t }) {
|
|
877
|
-
return this.page.getByTestId(n(t,
|
|
877
|
+
return this.page.getByTestId(n(t, E.FIELD)).inputValue();
|
|
878
878
|
}
|
|
879
879
|
getPlaceholderText({ testId: t }) {
|
|
880
|
-
return this.page.getByTestId(n(t,
|
|
880
|
+
return this.page.getByTestId(n(t, E.FIELD)).getAttribute("placeholder");
|
|
881
881
|
}
|
|
882
882
|
isDisabled({ testId: t }) {
|
|
883
|
-
return this.page.getByTestId(n(t,
|
|
883
|
+
return this.page.getByTestId(n(t, E.FIELD)).isDisabled();
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
|
-
class
|
|
886
|
+
class Bt extends at {
|
|
887
887
|
getLabelText({ testId: t }) {
|
|
888
|
-
return this.page.getByTestId(n(t,
|
|
888
|
+
return this.page.getByTestId(n(t, A.TEXT)).textContent();
|
|
889
889
|
}
|
|
890
890
|
hasFieldHelpText({ testId: t }) {
|
|
891
891
|
return this.page.getByTestId(n(t, w.CONTAINER)).isVisible();
|
|
@@ -894,7 +894,7 @@ class ut extends z {
|
|
|
894
894
|
return this.page.getByTestId(n(t, w.CONTAINER)).textContent();
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
|
-
class
|
|
897
|
+
class xt extends Z {
|
|
898
898
|
constructor(t) {
|
|
899
899
|
super(t);
|
|
900
900
|
}
|
|
@@ -917,37 +917,37 @@ class dt extends Y {
|
|
|
917
917
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: t, type: e });
|
|
918
918
|
}
|
|
919
919
|
getSelectedLabel({ testId: t }) {
|
|
920
|
-
return this.page.getByTestId(n(t,
|
|
920
|
+
return this.page.getByTestId(n(t, i.BUTTON_CONTENT)).textContent();
|
|
921
921
|
}
|
|
922
922
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
923
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, r.FIELD)).fill(e), this.page.getByTestId(n(t,
|
|
923
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, r.FIELD)).fill(e), this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
924
924
|
}
|
|
925
925
|
async isErrorText({ testId: t }) {
|
|
926
926
|
return await this.page.getByTestId(n(t, w.TEXT)).count() > 0;
|
|
927
927
|
}
|
|
928
928
|
async isDisabled({ testId: t }) {
|
|
929
|
-
return (await this.page.getByTestId(n(t,
|
|
929
|
+
return (await this.page.getByTestId(n(t, i.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
930
930
|
}
|
|
931
931
|
async clearAllOptions({ testId: t }) {
|
|
932
|
-
await this.page.getByTestId(n(t,
|
|
932
|
+
await this.page.getByTestId(n(t, i.ACTION_CLEAR_ALL)).click();
|
|
933
933
|
}
|
|
934
934
|
isSelectAllChecked({ testId: t }) {
|
|
935
|
-
return this.page.getByTestId(n(t,
|
|
935
|
+
return this.page.getByTestId(n(t, i.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
936
936
|
}
|
|
937
937
|
isSelectAllIndeterminate({ testId: t }) {
|
|
938
|
-
return this.page.getByTestId(n(t,
|
|
938
|
+
return this.page.getByTestId(n(t, i.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
939
939
|
}
|
|
940
940
|
async removeChipSelection({ testId: t }) {
|
|
941
|
-
await this.page.getByTestId(n(t,
|
|
941
|
+
await this.page.getByTestId(n(t, i.BUTTON_CLEAR)).click();
|
|
942
942
|
}
|
|
943
943
|
getDropdownOptions({ testId: t }) {
|
|
944
|
-
return this.page.getByTestId(n(t,
|
|
944
|
+
return this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
945
945
|
}
|
|
946
946
|
async expandTreeNode({
|
|
947
947
|
testId: t,
|
|
948
948
|
nodeName: e
|
|
949
949
|
}) {
|
|
950
|
-
const o = this.page.getByTestId(n(t,
|
|
950
|
+
const o = this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator(".item--multi", { hasText: e }).locator(".tree-main-arrow-wrapper");
|
|
951
951
|
if (await o.isVisible())
|
|
952
952
|
await o.click();
|
|
953
953
|
else
|
|
@@ -957,10 +957,10 @@ class dt extends Y {
|
|
|
957
957
|
testId: t,
|
|
958
958
|
node: e,
|
|
959
959
|
item: o,
|
|
960
|
-
shouldExpand:
|
|
960
|
+
shouldExpand: s = !1
|
|
961
961
|
}) {
|
|
962
|
-
await this.openDropdownComponent({ testId: t }),
|
|
963
|
-
const l = this.page.getByTestId(n(t,
|
|
962
|
+
await this.openDropdownComponent({ testId: t }), s && await this.expandTreeNode({ testId: t, nodeName: e });
|
|
963
|
+
const l = this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator(`text=${o}`);
|
|
964
964
|
if (await l.isVisible())
|
|
965
965
|
await l.click();
|
|
966
966
|
else
|
|
@@ -972,18 +972,18 @@ class dt extends Y {
|
|
|
972
972
|
node: o
|
|
973
973
|
}) {
|
|
974
974
|
await this.openDropdownComponent({ testId: t });
|
|
975
|
-
for (const
|
|
975
|
+
for (const s of e)
|
|
976
976
|
await this.selectTreeDropdownOptionByName({
|
|
977
977
|
testId: t,
|
|
978
978
|
node: o,
|
|
979
|
-
item:
|
|
979
|
+
item: s,
|
|
980
980
|
shouldExpand: !0
|
|
981
981
|
});
|
|
982
982
|
await this.clickOnApply({ testId: t });
|
|
983
983
|
}
|
|
984
984
|
}
|
|
985
|
-
const
|
|
986
|
-
class
|
|
985
|
+
const nt = ".sortable-item";
|
|
986
|
+
class At {
|
|
987
987
|
constructor(t) {
|
|
988
988
|
c(this, "page");
|
|
989
989
|
this.page = t;
|
|
@@ -1000,76 +1000,76 @@ class yt {
|
|
|
1000
1000
|
return this.page.getByTestId(n(t, T.CONTAINER)).locator(".sortable-item").allTextContents();
|
|
1001
1001
|
}
|
|
1002
1002
|
async sortItem(t, e, o) {
|
|
1003
|
-
const
|
|
1003
|
+
const s = await this.page.getByTestId(
|
|
1004
1004
|
n(t, "sortable-list-item")
|
|
1005
|
-
), l =
|
|
1005
|
+
), l = s.nth(e), h = s.nth(o);
|
|
1006
1006
|
await l.dragTo(h);
|
|
1007
1007
|
}
|
|
1008
1008
|
async verifyOrder(t, e) {
|
|
1009
|
-
return (await this.getItems(t)).every((
|
|
1009
|
+
return (await this.getItems(t)).every((s, l) => s === e[l]);
|
|
1010
1010
|
}
|
|
1011
1011
|
async getListItemLocator({ testId: t, item: e, modifier: o }) {
|
|
1012
|
-
return this.page.getByTestId(n(t, o)).locator(
|
|
1012
|
+
return this.page.getByTestId(n(t, o)).locator(nt, {
|
|
1013
1013
|
hasText: e
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
1016
1016
|
async selectItem({ testId: t, item: e, isLockedItem: o }) {
|
|
1017
|
-
const
|
|
1017
|
+
const s = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1018
1018
|
await (await this.getListItemLocator({
|
|
1019
1019
|
testId: t,
|
|
1020
1020
|
item: e,
|
|
1021
|
-
modifier:
|
|
1021
|
+
modifier: s
|
|
1022
1022
|
})).click();
|
|
1023
1023
|
}
|
|
1024
1024
|
async isItemSelected(t) {
|
|
1025
1025
|
return await this.page.locator(".sortable-item--selected", { hasText: t }).count() > 0;
|
|
1026
1026
|
}
|
|
1027
1027
|
async expandItem({ testId: t, item: e, isLockedItem: o }) {
|
|
1028
|
-
const
|
|
1028
|
+
const s = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1029
1029
|
await (await this.getListItemLocator({
|
|
1030
1030
|
testId: t,
|
|
1031
1031
|
item: e,
|
|
1032
|
-
modifier:
|
|
1032
|
+
modifier: s
|
|
1033
1033
|
})).locator(".expand-icon").click();
|
|
1034
1034
|
}
|
|
1035
1035
|
async selectChildItem({
|
|
1036
1036
|
testId: t,
|
|
1037
1037
|
item: e,
|
|
1038
1038
|
childItem: o,
|
|
1039
|
-
isLockedItem:
|
|
1039
|
+
isLockedItem: s
|
|
1040
1040
|
}) {
|
|
1041
1041
|
await this.expandItem({
|
|
1042
1042
|
testId: t,
|
|
1043
1043
|
item: e,
|
|
1044
|
-
isLockedItem:
|
|
1044
|
+
isLockedItem: s
|
|
1045
1045
|
}), await this.page.locator("ul li span", {
|
|
1046
1046
|
hasText: o
|
|
1047
1047
|
}).click();
|
|
1048
1048
|
}
|
|
1049
1049
|
async isListOpened({ testId: t, item: e, isLockedItem: o }) {
|
|
1050
|
-
const
|
|
1050
|
+
const s = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1051
1051
|
return await (await this.getListItemLocator({
|
|
1052
1052
|
testId: t,
|
|
1053
1053
|
item: e,
|
|
1054
|
-
modifier:
|
|
1054
|
+
modifier: s
|
|
1055
1055
|
})).locator(".child-list ul").count() > 0;
|
|
1056
1056
|
}
|
|
1057
1057
|
async isChildItemSelected(t) {
|
|
1058
1058
|
return await this.page.locator("ul li span", { hasText: t }).count() > 0;
|
|
1059
1059
|
}
|
|
1060
1060
|
async openItemMenu({ testId: t, item: e, isLockedItem: o }) {
|
|
1061
|
-
const
|
|
1061
|
+
const s = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1062
1062
|
await (await this.getListItemLocator({
|
|
1063
1063
|
testId: t,
|
|
1064
1064
|
item: e,
|
|
1065
|
-
modifier:
|
|
1065
|
+
modifier: s
|
|
1066
1066
|
})).locator(".item__menu button").click();
|
|
1067
1067
|
}
|
|
1068
1068
|
async selectMenuItem({
|
|
1069
1069
|
testId: t,
|
|
1070
1070
|
item: e,
|
|
1071
1071
|
isLockedItem: o,
|
|
1072
|
-
menuItem:
|
|
1072
|
+
menuItem: s
|
|
1073
1073
|
}) {
|
|
1074
1074
|
await this.openItemMenu({
|
|
1075
1075
|
testId: t,
|
|
@@ -1077,33 +1077,33 @@ class yt {
|
|
|
1077
1077
|
isLockedItem: o
|
|
1078
1078
|
});
|
|
1079
1079
|
const l = this.page.locator(".dropdown-list-wrapper");
|
|
1080
|
-
await l.locator("ul.list li", { hasText:
|
|
1080
|
+
await l.locator("ul.list li", { hasText: s }).click(), await l.waitFor({ state: "detached" });
|
|
1081
1081
|
}
|
|
1082
1082
|
async isMenuOpened() {
|
|
1083
1083
|
return await this.page.locator(".dropdown-list-wrapper").count() > 0;
|
|
1084
1084
|
}
|
|
1085
1085
|
async dragAndDrop({ testId: t, item: e, isLockedItem: o }) {
|
|
1086
|
-
const
|
|
1086
|
+
const s = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST, h = await (await this.getListItemLocator({
|
|
1087
1087
|
testId: t,
|
|
1088
1088
|
item: e,
|
|
1089
|
-
modifier:
|
|
1089
|
+
modifier: s
|
|
1090
1090
|
})).locator(".item.drag-allowed").first().boundingBox();
|
|
1091
1091
|
if (h) {
|
|
1092
|
-
const
|
|
1093
|
-
await this.page.mouse.move(
|
|
1092
|
+
const _ = h.x, O = h.y;
|
|
1093
|
+
await this.page.mouse.move(_, O), await this.page.mouse.down(), await this.page.mouse.move(_ + 20, O - 20), await this.page.mouse.up();
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
async getListOrder() {
|
|
1097
|
-
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o,
|
|
1097
|
+
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o, s) => (e[s + 1] = o, e), {});
|
|
1098
1098
|
}
|
|
1099
1099
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
1100
1100
|
return await this.page.getByTestId(n(t, r.FIELD)).fill(e), this.page.getByTestId(n(t, T.CONTAINER)).locator("ul > li span").first().textContent();
|
|
1101
1101
|
}
|
|
1102
1102
|
// returns array of booleans according to the search results in each group
|
|
1103
1103
|
async verifySearchResultDisplayed({ testId: t, item: e }) {
|
|
1104
|
-
const o = [],
|
|
1104
|
+
const o = [], s = await this.page.getByTestId(n(t, T.CONTAINER)).all();
|
|
1105
1105
|
let l;
|
|
1106
|
-
for (const h of
|
|
1106
|
+
for (const h of s)
|
|
1107
1107
|
l = await h.locator(".child-list span", { hasText: e }).count(), o.push(l > 0);
|
|
1108
1108
|
return o;
|
|
1109
1109
|
}
|
|
@@ -1111,46 +1111,127 @@ class yt {
|
|
|
1111
1111
|
return this.page.getByTestId(n(t, T.CONTAINER)).locator(".sortable-item--selected").textContent();
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
|
-
class
|
|
1114
|
+
class Lt {
|
|
1115
1115
|
constructor(t) {
|
|
1116
1116
|
c(this, "page");
|
|
1117
1117
|
this.page = t;
|
|
1118
1118
|
}
|
|
1119
1119
|
async waitForComponent({ testId: t }) {
|
|
1120
|
-
const e = n(t,
|
|
1120
|
+
const e = n(t, F.WRAPPER);
|
|
1121
1121
|
await this.page.getByTestId(e).waitFor({ state: "visible" });
|
|
1122
1122
|
}
|
|
1123
1123
|
async selectView({ view: t, testId: e }) {
|
|
1124
1124
|
const o = `[text="${t}"]`;
|
|
1125
1125
|
console.log(o);
|
|
1126
|
-
const
|
|
1127
|
-
await (await this.page.getByTestId(
|
|
1126
|
+
const s = n(e, F.WRAPPER);
|
|
1127
|
+
await (await this.page.getByTestId(s).locator(o)).click();
|
|
1128
|
+
}
|
|
1129
|
+
}
|
|
1130
|
+
class Rt {
|
|
1131
|
+
constructor(t) {
|
|
1132
|
+
c(this, "page");
|
|
1133
|
+
this.page = t;
|
|
1134
|
+
}
|
|
1135
|
+
async waitForComponent({ testId: t }) {
|
|
1136
|
+
const e = n(t, C.WRAPPER);
|
|
1137
|
+
await this.page.getByTestId(e).waitFor({ state: "visible" });
|
|
1138
|
+
}
|
|
1139
|
+
async openDateRangeComponent(t) {
|
|
1140
|
+
const e = n(t, C.TRIGGER);
|
|
1141
|
+
await (await this.page.getByTestId(e)).click();
|
|
1142
|
+
}
|
|
1143
|
+
async selectDateRangeMenu({
|
|
1144
|
+
testId: t,
|
|
1145
|
+
option: e
|
|
1146
|
+
}) {
|
|
1147
|
+
await this.openDateRangeComponent(t);
|
|
1148
|
+
const o = n(t, C.MENU);
|
|
1149
|
+
await (await this.page.getByTestId(
|
|
1150
|
+
`${o}-${e}`
|
|
1151
|
+
)).click();
|
|
1152
|
+
}
|
|
1153
|
+
async selectSpecificDates({
|
|
1154
|
+
testId: t,
|
|
1155
|
+
startDate: e,
|
|
1156
|
+
endDate: o
|
|
1157
|
+
}) {
|
|
1158
|
+
await this.openDateRangeComponent(t), await (await this.getDayElement(e)).click(), await (await this.getDayElement(o)).click();
|
|
1159
|
+
}
|
|
1160
|
+
async getDayElement(t) {
|
|
1161
|
+
return await this.page.$(`text="${t}"`);
|
|
1162
|
+
}
|
|
1163
|
+
async getSelectedDays() {
|
|
1164
|
+
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();
|
|
1165
|
+
return t + e + o - 1;
|
|
1166
|
+
}
|
|
1167
|
+
async clickOnApply(t) {
|
|
1168
|
+
const e = n(
|
|
1169
|
+
t,
|
|
1170
|
+
C.ACTION_APPLY
|
|
1171
|
+
);
|
|
1172
|
+
await (await this.page.getByTestId(e)).click();
|
|
1173
|
+
}
|
|
1174
|
+
async clickOnCancel(t) {
|
|
1175
|
+
const e = n(
|
|
1176
|
+
t,
|
|
1177
|
+
C.ACTION_CANCEL
|
|
1178
|
+
);
|
|
1179
|
+
await (await this.page.getByTestId(e)).click();
|
|
1180
|
+
}
|
|
1181
|
+
async getDateRangeLabel(t) {
|
|
1182
|
+
const e = n(t, C.TRIGGER);
|
|
1183
|
+
return (await this.page.getByTestId(e)).textContent();
|
|
1184
|
+
}
|
|
1185
|
+
calculateDaysBetweenDates(t) {
|
|
1186
|
+
const [e, o] = t.split(" - ");
|
|
1187
|
+
function s(X) {
|
|
1188
|
+
const [Y, K] = X.split(", "), [H, J] = Y.split(" "), v = {
|
|
1189
|
+
Jan: 0,
|
|
1190
|
+
Feb: 1,
|
|
1191
|
+
Mar: 2,
|
|
1192
|
+
Apr: 3,
|
|
1193
|
+
May: 4,
|
|
1194
|
+
Jun: 5,
|
|
1195
|
+
Jul: 6,
|
|
1196
|
+
Aug: 7,
|
|
1197
|
+
Sep: 8,
|
|
1198
|
+
Oct: 9,
|
|
1199
|
+
Nov: 10,
|
|
1200
|
+
Dec: 11
|
|
1201
|
+
}[H];
|
|
1202
|
+
if (v === void 0)
|
|
1203
|
+
throw new Error(`Invalid month: ${H}`);
|
|
1204
|
+
return new Date(parseInt(K), v, parseInt(J));
|
|
1205
|
+
}
|
|
1206
|
+
const l = s(e), O = (s(o).getTime() - l.getTime()) / (1e3 * 60 * 60 * 24);
|
|
1207
|
+
return Math.floor(O + 1);
|
|
1128
1208
|
}
|
|
1129
1209
|
}
|
|
1130
1210
|
export {
|
|
1131
|
-
|
|
1132
|
-
|
|
1133
|
-
|
|
1134
|
-
|
|
1135
|
-
|
|
1136
|
-
|
|
1137
|
-
|
|
1138
|
-
|
|
1139
|
-
|
|
1140
|
-
|
|
1141
|
-
|
|
1142
|
-
|
|
1143
|
-
|
|
1144
|
-
|
|
1145
|
-
|
|
1146
|
-
|
|
1147
|
-
|
|
1148
|
-
|
|
1149
|
-
|
|
1150
|
-
|
|
1151
|
-
|
|
1152
|
-
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1211
|
+
mt as AlertComponent,
|
|
1212
|
+
It as AppHeaderComponent,
|
|
1213
|
+
it as BannerComponent,
|
|
1214
|
+
tt as ButtonComponent,
|
|
1215
|
+
ct as ComponentBasePage,
|
|
1216
|
+
Rt as DateRangeComponent,
|
|
1217
|
+
rt as DialogComponent,
|
|
1218
|
+
Z as DropdownComponent,
|
|
1219
|
+
lt as DropdownComponentV3,
|
|
1220
|
+
G as FieldHelpTextComponent,
|
|
1221
|
+
R as FieldLabelComponent,
|
|
1222
|
+
Et as FormCardComponent,
|
|
1223
|
+
wt as FormRowComponent,
|
|
1224
|
+
pt as IncludeExcludeComponent,
|
|
1225
|
+
et as InlineCopyComponent,
|
|
1226
|
+
gt as InputsComponent,
|
|
1227
|
+
yt as MultiBarComponent,
|
|
1228
|
+
Ct as SearchComponent,
|
|
1229
|
+
dt as SnackbarComponent,
|
|
1230
|
+
At as SortableListComponent,
|
|
1231
|
+
Lt as SwitchComponent,
|
|
1232
|
+
ut as TableComponent,
|
|
1233
|
+
Tt as TabsComponent,
|
|
1234
|
+
Bt as TextAreaComponent,
|
|
1235
|
+
ht as TooltipComponent,
|
|
1236
|
+
xt as TreeDropdownComponent
|
|
1156
1237
|
};
|