@ironsource/shared-ui-e2e 2.1.11-test.27 → 2.1.11-test.44
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 +364 -255
- package/shared-e2e-commands.umd.cjs +1 -1
- package/tests/components/sortablelist/consts.d.ts +5 -0
- package/tests/components/sortablelist/sortable-list-component.d.ts +15 -0
- package/tests/components/sortablelist/sortable-list-page.d.ts +14 -0
- package/tests/components/sortablelist/types.d.ts +28 -0
- package/tests/testids/index.d.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/shared-e2e-commands.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
const
|
|
1
|
+
var v = Object.defineProperty;
|
|
2
|
+
var W = (a, t, e) => t in a ? v(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var c = (a, t, e) => (W(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 || {}), 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 || {}), u = /* @__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))(u || {}), d = /* @__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))(d || {}), r = /* @__PURE__ */ ((a) => (a.WRAPPER = "input-wrapper", a.TOOLTIP = "input-tooltip", a.MANDATORY = "input-mandatory", a.LABEL_CONTAINER = "input-label-container", a.LABEL_TEXT = "input-label-text", a.FIELD = "input-field", a.EXTRA_TEXT = "input-extra-text", a.TOGGLE_PASSWORD = "input-toggle-password-icon", a))(r || {}), C = /* @__PURE__ */ ((a) => (a.WRAPPER = "ta-wrapper", a.LABEL = "ta-label", a.FIELD = "ta-field", a.TEXT = "ta-text", a))(C || {}), S = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(S || {}), 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))(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 || {}), m = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(m || {}), 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))(_ || {}), 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 V = (a, t) => {
|
|
6
6
|
const e = new URLSearchParams(a).toString();
|
|
7
7
|
return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
|
|
8
|
-
},
|
|
8
|
+
}, U = (a, t = {}) => {
|
|
9
9
|
const e = [];
|
|
10
|
-
Object.entries(t).forEach(([
|
|
11
|
-
e.push(`${
|
|
10
|
+
Object.entries(t).forEach(([l, h]) => {
|
|
11
|
+
e.push(`${l}:${h}`);
|
|
12
12
|
});
|
|
13
13
|
const o = {
|
|
14
14
|
id: a,
|
|
15
15
|
viewMode: "story",
|
|
16
16
|
args: e.join(";")
|
|
17
17
|
};
|
|
18
|
-
return
|
|
18
|
+
return V(o, "iframe.html");
|
|
19
19
|
}, n = (a, t) => `${a}-${t}`;
|
|
20
|
-
class
|
|
20
|
+
class Q {
|
|
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}-${R.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, R.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, R.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
class
|
|
36
|
+
class Z {
|
|
37
37
|
constructor(t) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
c(this, "page");
|
|
39
|
+
c(this, "testId");
|
|
40
|
+
c(this, "componentId");
|
|
41
|
+
c(this, "loadedPageSelector");
|
|
42
42
|
this.page = t.page, this.testId = t.testId, this.componentId = t.componentId, this.loadedPageSelector = t.loadedPageSelector;
|
|
43
43
|
}
|
|
44
44
|
async goto(t = {}) {
|
|
@@ -47,66 +47,66 @@ class z {
|
|
|
47
47
|
...t.additionalComponentParams
|
|
48
48
|
};
|
|
49
49
|
await this.page.goto(
|
|
50
|
-
|
|
50
|
+
U(
|
|
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 M {
|
|
58
58
|
constructor(t) {
|
|
59
|
-
|
|
59
|
+
c(this, "page");
|
|
60
60
|
this.page = t;
|
|
61
61
|
}
|
|
62
62
|
async waitForComponent({ testId: t }) {
|
|
63
|
-
const e = `[data-testid='${t}-${
|
|
63
|
+
const e = `[data-testid='${t}-${d.WRAPPER}']`;
|
|
64
64
|
await this.page.waitForSelector(e);
|
|
65
65
|
}
|
|
66
66
|
getDialogTitle({ testId: t }) {
|
|
67
|
-
return this.page.getByTestId(n(t,
|
|
67
|
+
return this.page.getByTestId(n(t, d.HEADER)).textContent();
|
|
68
68
|
}
|
|
69
69
|
getDialogText({ testId: t }) {
|
|
70
|
-
return this.page.getByTestId(n(t,
|
|
70
|
+
return this.page.getByTestId(n(t, d.CONTENT)).textContent();
|
|
71
71
|
}
|
|
72
72
|
async closeDialog({ testId: t }) {
|
|
73
73
|
await (await this.page.getByTestId(
|
|
74
|
-
n(t,
|
|
74
|
+
n(t, d.ACTION_CLOSE)
|
|
75
75
|
)).click();
|
|
76
76
|
}
|
|
77
77
|
async clickOnPrimaryButton({ testId: t }) {
|
|
78
78
|
await this.page.getByTestId(
|
|
79
|
-
n(t,
|
|
79
|
+
n(t, d.SAVE_BUTTON)
|
|
80
80
|
).click();
|
|
81
81
|
}
|
|
82
82
|
async clickOnDefaultButton({ testId: t }) {
|
|
83
83
|
await this.page.getByTestId(
|
|
84
|
-
n(t,
|
|
84
|
+
n(t, d.CANCEL_BUTTON)
|
|
85
85
|
).click();
|
|
86
86
|
}
|
|
87
87
|
async clickOnDeleteButton({ testId: t }) {
|
|
88
88
|
await (await this.page.getByTestId(
|
|
89
|
-
n(t,
|
|
89
|
+
n(t, d.ACTION_BUTTONS_WRAPPER)
|
|
90
90
|
).locator(".danger")).click();
|
|
91
91
|
}
|
|
92
92
|
getDialogSubtitle({ testId: t }) {
|
|
93
|
-
return this.page.getByTestId(n(t,
|
|
93
|
+
return this.page.getByTestId(n(t, d.HEADER_SECONDARY)).locator(".subtitle").textContent();
|
|
94
94
|
}
|
|
95
95
|
async isDialogVisible({ testId: t }) {
|
|
96
96
|
return await this.page.waitForTimeout(1e3), (await this.page.getByTestId(
|
|
97
|
-
n(t,
|
|
97
|
+
n(t, d.WRAPPER)
|
|
98
98
|
)).isVisible();
|
|
99
99
|
}
|
|
100
100
|
async waitForDialogToClose(t) {
|
|
101
101
|
await this.page.waitForSelector(
|
|
102
|
-
n(t,
|
|
102
|
+
n(t, d.WRAPPER),
|
|
103
103
|
{ state: "hidden" }
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class G {
|
|
108
108
|
constructor(t) {
|
|
109
|
-
|
|
109
|
+
c(this, "page");
|
|
110
110
|
this.page = t;
|
|
111
111
|
}
|
|
112
112
|
async waitForComponent({ testId: t }) {
|
|
@@ -158,43 +158,43 @@ class D {
|
|
|
158
158
|
}
|
|
159
159
|
class A {
|
|
160
160
|
constructor(t) {
|
|
161
|
-
|
|
161
|
+
c(this, "page");
|
|
162
162
|
this.page = t;
|
|
163
163
|
}
|
|
164
164
|
getLabelText({ testId: t }) {
|
|
165
|
-
return this.page.getByTestId(n(t,
|
|
165
|
+
return this.page.getByTestId(n(t, m.TEXT)).textContent();
|
|
166
166
|
}
|
|
167
167
|
isMandatory({ testId: t }) {
|
|
168
|
-
return this.page.getByTestId(n(t,
|
|
168
|
+
return this.page.getByTestId(n(t, m.MANDATORY)).isVisible();
|
|
169
169
|
}
|
|
170
170
|
async getHelpIconText({ testId: t }) {
|
|
171
171
|
const e = await this.page.getByTestId(
|
|
172
|
-
n(t,
|
|
172
|
+
n(t, m.TOOLTIP)
|
|
173
173
|
);
|
|
174
174
|
return await e.hover(), e.getAttribute("text");
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
|
-
class
|
|
177
|
+
class F {
|
|
178
178
|
constructor(t) {
|
|
179
|
-
|
|
179
|
+
c(this, "page");
|
|
180
180
|
this.page = t;
|
|
181
181
|
}
|
|
182
182
|
hasExtraText({ testId: t }) {
|
|
183
|
-
return this.page.getByTestId(n(t,
|
|
183
|
+
return this.page.getByTestId(n(t, w.TEXT)).isVisible();
|
|
184
184
|
}
|
|
185
185
|
getExtraText({ testId: t }) {
|
|
186
|
-
return this.page.getByTestId(n(t,
|
|
186
|
+
return this.page.getByTestId(n(t, w.TEXT)).textContent();
|
|
187
187
|
}
|
|
188
188
|
async hasExtraTextIconType({ testId: t, type: e }) {
|
|
189
|
-
return await (await this.page.getByTestId(n(t,
|
|
189
|
+
return await (await this.page.getByTestId(n(t, w.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
class
|
|
192
|
+
class X extends G {
|
|
193
193
|
constructor(e) {
|
|
194
194
|
super(e);
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new
|
|
195
|
+
c(this, "fieldLabelComponent");
|
|
196
|
+
c(this, "fieldHelpTextComponent");
|
|
197
|
+
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new F(e);
|
|
198
198
|
}
|
|
199
199
|
getDropdownTitle({ testId: e }) {
|
|
200
200
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -214,14 +214,23 @@ class f extends D {
|
|
|
214
214
|
hasExtraTextIconType({ testId: e, type: o }) {
|
|
215
215
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
|
|
216
216
|
}
|
|
217
|
-
getSelectedLabel({ testId: e }) {
|
|
218
|
-
|
|
217
|
+
async getSelectedLabel({ testId: e }) {
|
|
218
|
+
let i = await this.page.getByTestId(n(e, s.BUTTON_CONTENT)).textContent();
|
|
219
|
+
if (await this.page.getByTestId(
|
|
220
|
+
n(e, s.BUTTON_CONTENT_SUFFIX)
|
|
221
|
+
).isVisible({ timeout: 1e3 })) {
|
|
222
|
+
const h = await this.page.getByTestId(
|
|
223
|
+
n(e, s.BUTTON_CONTENT_SUFFIX)
|
|
224
|
+
).textContent();
|
|
225
|
+
i = `${i}${h}`;
|
|
226
|
+
}
|
|
227
|
+
return i;
|
|
219
228
|
}
|
|
220
229
|
async searchForItem({ testId: e, searchTerm: o }) {
|
|
221
|
-
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e,
|
|
230
|
+
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();
|
|
222
231
|
}
|
|
223
232
|
async isErrorText({ testId: e }) {
|
|
224
|
-
return await this.page.getByTestId(n(e,
|
|
233
|
+
return await this.page.getByTestId(n(e, w.TEXT)).count() > 0;
|
|
225
234
|
}
|
|
226
235
|
async isDisabled({ testId: e }) {
|
|
227
236
|
return (await this.page.getByTestId(n(e, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
@@ -242,7 +251,7 @@ class f extends D {
|
|
|
242
251
|
return this.page.getByTestId(n(e, s.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
243
252
|
}
|
|
244
253
|
}
|
|
245
|
-
class
|
|
254
|
+
class tt extends G {
|
|
246
255
|
constructor(t) {
|
|
247
256
|
super(t);
|
|
248
257
|
}
|
|
@@ -253,111 +262,111 @@ class Q extends D {
|
|
|
253
262
|
return this.page.getByTestId(n(t, s.TRIGGER)).locator("button > span").textContent();
|
|
254
263
|
}
|
|
255
264
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
256
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
265
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, S.FIELD)).fill(e), this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
257
266
|
}
|
|
258
267
|
}
|
|
259
|
-
class
|
|
268
|
+
class et {
|
|
260
269
|
constructor(t) {
|
|
261
|
-
|
|
270
|
+
c(this, "page");
|
|
262
271
|
this.page = t;
|
|
263
272
|
}
|
|
264
273
|
async waitForComponent({ testId: t }) {
|
|
265
|
-
const e = `[data-testid='${t}-${
|
|
274
|
+
const e = `[data-testid='${t}-${g.TRIGGER}']`;
|
|
266
275
|
await this.page.waitForSelector(e);
|
|
267
276
|
}
|
|
268
277
|
async clickOnApply(t) {
|
|
269
278
|
await this.page.getByTestId(
|
|
270
|
-
n(t,
|
|
279
|
+
n(t, g.ACTION_APPLY)
|
|
271
280
|
).click();
|
|
272
281
|
}
|
|
273
282
|
async clickOnCancel(t) {
|
|
274
283
|
await this.page.getByTestId(
|
|
275
|
-
n(t,
|
|
284
|
+
n(t, g.ACTION_CANCEL)
|
|
276
285
|
).click();
|
|
277
286
|
}
|
|
278
287
|
async openIncludeExcludeComponent(t) {
|
|
279
|
-
await this.page.getByTestId(n(t,
|
|
288
|
+
await this.page.getByTestId(n(t, g.TRIGGER)).click();
|
|
280
289
|
}
|
|
281
290
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
282
|
-
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
291
|
+
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();
|
|
283
292
|
}
|
|
284
293
|
async selectItemByName({ testId: t, entityName: e }) {
|
|
285
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
294
|
+
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);
|
|
286
295
|
}
|
|
287
296
|
async selectItemByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
288
|
-
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
297
|
+
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", {
|
|
289
298
|
state: "hidden"
|
|
290
299
|
}), o && await this.clickOnApply(t);
|
|
291
300
|
}
|
|
292
301
|
async selectMultipleItems({ testId: t, itemsToSelect: e }) {
|
|
293
302
|
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t);
|
|
294
303
|
for (const o of e)
|
|
295
|
-
await this.page.getByTestId(n(t,
|
|
304
|
+
await this.page.getByTestId(n(t, g.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
|
|
296
305
|
}
|
|
297
306
|
async unselectItemByName({ testId: t, entityName: e }) {
|
|
298
307
|
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(
|
|
299
|
-
n(t,
|
|
308
|
+
n(t, g.LIST_SELECTED)
|
|
300
309
|
).locator("ul > li", { hasText: e }).locator(".clear-button").click(), await this.clickOnApply(t);
|
|
301
310
|
}
|
|
302
311
|
async unselectByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
303
312
|
await this.page.getByTestId(
|
|
304
|
-
n(t,
|
|
313
|
+
n(t, g.LIST_SELECTED)
|
|
305
314
|
).locator("ul li button").nth(e).click(), o && await this.clickOnApply(t);
|
|
306
315
|
}
|
|
307
316
|
async getSelectedCounter(t) {
|
|
308
317
|
return await this.page.getByTestId(
|
|
309
|
-
n(t,
|
|
318
|
+
n(t, g.LIST_SELECTED)
|
|
310
319
|
).locator(".include-exclude-selected-header-left span").textContent();
|
|
311
320
|
}
|
|
312
321
|
async clearAll({ testId: t }) {
|
|
313
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
322
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, g.CLEAR_ALL)).click(), await this.clickOnApply(t);
|
|
314
323
|
}
|
|
315
324
|
getTriggerText({ testId: t }) {
|
|
316
|
-
return this.page.getByTestId(n(t,
|
|
325
|
+
return this.page.getByTestId(n(t, g.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
|
|
317
326
|
}
|
|
318
327
|
getTriggerDescription({ testId: t }) {
|
|
319
|
-
return this.page.getByTestId(n(t,
|
|
328
|
+
return this.page.getByTestId(n(t, g.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
|
|
320
329
|
}
|
|
321
330
|
async selectAll({ testId: t }) {
|
|
322
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
331
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, g.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
323
332
|
}
|
|
324
333
|
}
|
|
325
334
|
class H {
|
|
326
335
|
constructor(t) {
|
|
327
|
-
|
|
336
|
+
c(this, "page");
|
|
328
337
|
this.page = t;
|
|
329
338
|
}
|
|
330
339
|
getInputsFieldText({ testId: t }) {
|
|
331
|
-
return this.page.getByTestId(n(t,
|
|
340
|
+
return this.page.getByTestId(n(t, r.FIELD)).inputValue();
|
|
332
341
|
}
|
|
333
342
|
getPlaceholderText({ testId: t }) {
|
|
334
|
-
return this.page.getByTestId(n(t,
|
|
343
|
+
return this.page.getByTestId(n(t, r.FIELD)).getAttribute("placeholder");
|
|
335
344
|
}
|
|
336
345
|
getInputsType({ testId: t }) {
|
|
337
|
-
return this.page.getByTestId(n(t,
|
|
346
|
+
return this.page.getByTestId(n(t, r.FIELD)).getAttribute("type");
|
|
338
347
|
}
|
|
339
348
|
async addInput({ testId: t, text: e }) {
|
|
340
|
-
await this.page.getByTestId(n(t,
|
|
349
|
+
await this.page.getByTestId(n(t, r.FIELD)).type(e);
|
|
341
350
|
}
|
|
342
351
|
async clearInput({ testId: t }) {
|
|
343
|
-
await this.page.getByTestId(n(t,
|
|
352
|
+
await this.page.getByTestId(n(t, r.FIELD)).clear();
|
|
344
353
|
}
|
|
345
354
|
isDisabled({ testId: t }) {
|
|
346
|
-
return this.page.getByTestId(n(t,
|
|
355
|
+
return this.page.getByTestId(n(t, r.FIELD)).isDisabled();
|
|
347
356
|
}
|
|
348
357
|
}
|
|
349
|
-
class
|
|
358
|
+
class at extends H {
|
|
350
359
|
constructor(e) {
|
|
351
360
|
super(e);
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new
|
|
361
|
+
c(this, "fieldLabelComponent");
|
|
362
|
+
c(this, "fieldHelpTextComponent");
|
|
363
|
+
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new F(e);
|
|
355
364
|
}
|
|
356
365
|
getInputsLabelText({ testId: e }) {
|
|
357
366
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
358
367
|
}
|
|
359
368
|
async waitForComponent({ testId: e }) {
|
|
360
|
-
const o = `[data-testid='${e}-${
|
|
369
|
+
const o = `[data-testid='${e}-${r.WRAPPER}']`;
|
|
361
370
|
await this.page.waitForSelector(o);
|
|
362
371
|
}
|
|
363
372
|
isInputMandatory({ testId: e }) {
|
|
@@ -370,14 +379,14 @@ class M extends H {
|
|
|
370
379
|
return this.fieldHelpTextComponent.getExtraText({ testId: e });
|
|
371
380
|
}
|
|
372
381
|
async clickOnApplyButton({ testId: e }) {
|
|
373
|
-
await (await this.page.getByTestId(n(e,
|
|
382
|
+
await (await this.page.getByTestId(n(e, r.WRAPPER)).locator(".icon.icon-name--check")).click();
|
|
374
383
|
}
|
|
375
384
|
hasInlineErrorText({ testId: e }) {
|
|
376
|
-
return this.page.getByTestId(n(e,
|
|
385
|
+
return this.page.getByTestId(n(e, r.TOOLTIP)).isVisible();
|
|
377
386
|
}
|
|
378
387
|
async getInlineErrorText({ testId: e }) {
|
|
379
388
|
const o = await this.page.getByTestId(
|
|
380
|
-
n(e,
|
|
389
|
+
n(e, r.TOOLTIP)
|
|
381
390
|
);
|
|
382
391
|
return await o.hover(), o.getAttribute("text");
|
|
383
392
|
}
|
|
@@ -385,17 +394,17 @@ class M extends H {
|
|
|
385
394
|
await this.isPasswordHidden({ testId: e }) && await this.clickOnPasswordIcon({ testId: e });
|
|
386
395
|
}
|
|
387
396
|
async clickOnPasswordIcon({ testId: e }) {
|
|
388
|
-
await this.page.getByTestId(n(e,
|
|
397
|
+
await this.page.getByTestId(n(e, r.TOGGLE_PASSWORD)).click();
|
|
389
398
|
}
|
|
390
399
|
async clickOnHidePassword({ testId: e }) {
|
|
391
400
|
await this.isPasswordHidden({ testId: e }) || await this.clickOnPasswordIcon({ testId: e });
|
|
392
401
|
}
|
|
393
402
|
isPasswordHidden({ testId: e }) {
|
|
394
|
-
return this.page.getByTestId(n(e,
|
|
403
|
+
return this.page.getByTestId(n(e, r.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
|
|
395
404
|
}
|
|
396
405
|
async clearInput({ testId: e }) {
|
|
397
406
|
await (await this.page.getByTestId(
|
|
398
|
-
n(e,
|
|
407
|
+
n(e, r.FIELD)
|
|
399
408
|
)).clear();
|
|
400
409
|
}
|
|
401
410
|
hasExtraTextIconType({ testId: e, type: o }) {
|
|
@@ -403,11 +412,11 @@ class M extends H {
|
|
|
403
412
|
}
|
|
404
413
|
async isDisabled({ testId: e }) {
|
|
405
414
|
return (await this.page.getByTestId(
|
|
406
|
-
n(e,
|
|
415
|
+
n(e, r.FIELD)
|
|
407
416
|
)).isDisabled();
|
|
408
417
|
}
|
|
409
418
|
hasApplyButton({ testId: e }) {
|
|
410
|
-
return this.page.getByTestId(n(e,
|
|
419
|
+
return this.page.getByTestId(n(e, r.WRAPPER)).locator(".icon.icon-name--check").isVisible();
|
|
411
420
|
}
|
|
412
421
|
async getMaxLengthNumber({ testId: e }) {
|
|
413
422
|
return (await this.getFontCaptionText({ testId: e }))[1];
|
|
@@ -416,155 +425,155 @@ class M extends H {
|
|
|
416
425
|
return (await this.getFontCaptionText({ testId: e }))[0];
|
|
417
426
|
}
|
|
418
427
|
async getFontCaptionText({ testId: e }) {
|
|
419
|
-
return (await this.page.getByTestId(n(e,
|
|
428
|
+
return (await this.page.getByTestId(n(e, r.WRAPPER)).locator(".font-caption").textContent()).split("/").map((i) => parseInt(i.trim(), 10));
|
|
420
429
|
}
|
|
421
430
|
getHelpIconText({ testId: e }) {
|
|
422
431
|
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
423
432
|
}
|
|
424
433
|
async isValidationAppear({ testId: e }) {
|
|
425
|
-
return (await this.page.getByTestId(n(e,
|
|
434
|
+
return (await this.page.getByTestId(n(e, r.WRAPPER)).getAttribute("class")).includes("variant-error");
|
|
426
435
|
}
|
|
427
436
|
}
|
|
428
|
-
class
|
|
437
|
+
class nt {
|
|
429
438
|
constructor(t) {
|
|
430
|
-
|
|
439
|
+
c(this, "page");
|
|
431
440
|
this.page = t;
|
|
432
441
|
}
|
|
433
442
|
async waitForComponent({ testId: t }) {
|
|
434
|
-
const e = `[data-testid='${t}-${
|
|
443
|
+
const e = `[data-testid='${t}-${B.WRAPPER}']`;
|
|
435
444
|
await this.page.waitForSelector(e);
|
|
436
445
|
}
|
|
437
446
|
getSelectedTabText({ testId: t }) {
|
|
438
|
-
return this.page.getByTestId(n(t,
|
|
447
|
+
return this.page.getByTestId(n(t, B.WRAPPER)).locator(".tab-item--active").textContent();
|
|
439
448
|
}
|
|
440
449
|
async selectTab({ testId: t, tabName: e }) {
|
|
441
450
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
442
451
|
await this.page.getByTestId(
|
|
443
|
-
n(t, `${
|
|
452
|
+
n(t, `${B.TAB}-${o + 1}`)
|
|
444
453
|
).click();
|
|
445
454
|
}
|
|
446
455
|
async getTabIndex({ testId: t, tabName: e }) {
|
|
447
|
-
return (await this.page.getByTestId(n(t,
|
|
456
|
+
return (await this.page.getByTestId(n(t, B.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
|
|
448
457
|
}
|
|
449
458
|
async isTabDisabled({ testId: t, tabName: e }) {
|
|
450
459
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
451
|
-
return this.page.getByTestId(n(t, `${
|
|
460
|
+
return this.page.getByTestId(n(t, `${B.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
|
|
452
461
|
}
|
|
453
462
|
}
|
|
454
|
-
class
|
|
463
|
+
class ot {
|
|
455
464
|
constructor(t) {
|
|
456
|
-
|
|
465
|
+
c(this, "page");
|
|
457
466
|
this.page = t;
|
|
458
467
|
}
|
|
459
468
|
async waitForComponent({ testId: t }) {
|
|
460
|
-
const e = `[data-testid='${t}-${
|
|
469
|
+
const e = `[data-testid='${t}-${O.TRIGGER}']`;
|
|
461
470
|
await this.page.waitForSelector(e);
|
|
462
471
|
}
|
|
463
472
|
getTooltipText({ testId: t }) {
|
|
464
|
-
return this.page.getByTestId(`${t}-${
|
|
473
|
+
return this.page.getByTestId(`${t}-${O.TRIGGER}`).getAttribute("text");
|
|
465
474
|
}
|
|
466
475
|
getTooltipHeaderText({ testId: t }) {
|
|
467
|
-
return this.page.getByTestId(`${t}-${
|
|
476
|
+
return this.page.getByTestId(`${t}-${O.TRIGGER}`).getAttribute("header");
|
|
468
477
|
}
|
|
469
478
|
}
|
|
470
|
-
const
|
|
471
|
-
class
|
|
479
|
+
const I = ".table-row", N = ".icon-wrapper", $ = ".states", P = ".table-head-container", f = ".table-row.loading", Y = 1e3;
|
|
480
|
+
class it {
|
|
472
481
|
constructor(t) {
|
|
473
|
-
|
|
482
|
+
c(this, "page");
|
|
474
483
|
this.page = t;
|
|
475
484
|
}
|
|
476
485
|
async waitForComponent({ testId: t }) {
|
|
477
|
-
const e = `[data-testid='${t}-${
|
|
486
|
+
const e = `[data-testid='${t}-${p.CONTAINER}']`;
|
|
478
487
|
await this.page.waitForSelector(e);
|
|
479
488
|
}
|
|
480
489
|
getTableRowCount({ testId: t }) {
|
|
481
|
-
return this.page.getByTestId(n(t,
|
|
490
|
+
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I).count();
|
|
482
491
|
}
|
|
483
492
|
async getColumnHeaders({ testId: t }) {
|
|
484
|
-
return this.page.getByTestId(n(t,
|
|
493
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(P).allTextContents();
|
|
485
494
|
}
|
|
486
495
|
getTableLabel({ testId: t }) {
|
|
487
|
-
return this.page.getByTestId(n(t,
|
|
496
|
+
return this.page.getByTestId(n(t, p.HEADER)).innerText();
|
|
488
497
|
}
|
|
489
498
|
getTableFooter({ testId: t }) {
|
|
490
|
-
return this.page.getByTestId(n(t,
|
|
499
|
+
return this.page.getByTestId(n(t, p.CONTAINER)).locator(".table-footer").innerText();
|
|
491
500
|
}
|
|
492
501
|
async clickOnHeaderByName(t) {
|
|
493
|
-
await this.page.locator(
|
|
502
|
+
await this.page.locator(P, {
|
|
494
503
|
hasText: t
|
|
495
504
|
}).click();
|
|
496
505
|
}
|
|
497
506
|
async searchForItems({ testId: t, searchTerm: e }) {
|
|
498
|
-
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t,
|
|
507
|
+
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, r.FIELD)).fill(e);
|
|
499
508
|
}
|
|
500
509
|
async clearSearchText({ testId: t }) {
|
|
501
|
-
await this.page.getByTestId(n(t,
|
|
510
|
+
await this.page.getByTestId(n(t, r.FIELD)).clear(), await this.waitForTableToLoad();
|
|
502
511
|
}
|
|
503
512
|
isArrowVisible({ testId: t, headerName: e }) {
|
|
504
|
-
return this.page.getByTestId(n(t,
|
|
513
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(P, { hasText: e }).locator(".table-sort-icon").isVisible();
|
|
505
514
|
}
|
|
506
515
|
async scrollDownTableRows({ testId: t }) {
|
|
507
516
|
const e = `[data-testid=${n(
|
|
508
517
|
t,
|
|
509
|
-
|
|
518
|
+
p.TABLE
|
|
510
519
|
)}]`;
|
|
511
520
|
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
}, e), await this.page.waitForTimeout(
|
|
521
|
+
const i = document.querySelector(o);
|
|
522
|
+
i && (i.scrollTop = i.scrollHeight);
|
|
523
|
+
}, e), await this.page.waitForTimeout(Y);
|
|
515
524
|
}
|
|
516
525
|
async waitForTableToLoad() {
|
|
517
|
-
await this.page.waitForSelector(
|
|
526
|
+
await this.page.waitForSelector(f, {
|
|
518
527
|
state: "hidden"
|
|
519
528
|
});
|
|
520
529
|
}
|
|
521
530
|
async waitingForTableLoadingToAppear() {
|
|
522
|
-
await this.page.waitForSelector(
|
|
531
|
+
await this.page.waitForSelector(f);
|
|
523
532
|
}
|
|
524
533
|
async expandRow({ testId: t, rowValue: e }) {
|
|
525
|
-
await this.page.getByTestId(n(t,
|
|
534
|
+
await this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I, { hasText: e }).locator(N).click();
|
|
526
535
|
}
|
|
527
536
|
isRowExpanded({ testId: t, rowValue: e }) {
|
|
528
|
-
return this.page.getByTestId(n(t,
|
|
537
|
+
return this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I, { hasText: e }).locator(N).isVisible();
|
|
529
538
|
}
|
|
530
539
|
async getExpandedRowContent({ testId: t, rowValue: e }) {
|
|
531
540
|
return await this.isRowExpanded({
|
|
532
541
|
testId: t,
|
|
533
542
|
rowValue: e
|
|
534
|
-
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t,
|
|
543
|
+
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, p.BODY_WRAPPER)).locator(I, { hasText: e }).locator(N).textContent();
|
|
535
544
|
}
|
|
536
545
|
isEmptyStateVisible({ testId: t }) {
|
|
537
|
-
return this.page.getByTestId(n(t,
|
|
546
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(".empty-state").isVisible();
|
|
538
547
|
}
|
|
539
548
|
getEmptyStateTitle({ testId: t }) {
|
|
540
|
-
return this.page.getByTestId(n(t,
|
|
549
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(".font-heading-4.title").textContent();
|
|
541
550
|
}
|
|
542
551
|
getEmptyStateSubtitle({ testId: t }) {
|
|
543
|
-
return this.page.getByTestId(n(t,
|
|
552
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
544
553
|
}
|
|
545
554
|
async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
|
|
546
|
-
await this.page.getByTestId(n(t,
|
|
555
|
+
await this.page.getByTestId(n(t, p.TABLE)).locator(I, {
|
|
547
556
|
hasText: e
|
|
548
|
-
}).locator(
|
|
557
|
+
}).locator($).click();
|
|
549
558
|
}
|
|
550
559
|
getCheckedRowsNumber({ testId: t }) {
|
|
551
|
-
return this.page.getByTestId(n(t,
|
|
560
|
+
return this.page.getByTestId(n(t, p.TABLE)).locator(I).locator(".icon.checked").count();
|
|
552
561
|
}
|
|
553
562
|
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
554
|
-
await this.page.getByTestId(n(t,
|
|
563
|
+
await this.page.getByTestId(n(t, p.TABLE)).locator($).nth(0).click();
|
|
555
564
|
}
|
|
556
565
|
getTableLocator({ testId: t }) {
|
|
557
566
|
return this.page.getByTestId(
|
|
558
|
-
n(t,
|
|
567
|
+
n(t, p.CONTAINER)
|
|
559
568
|
);
|
|
560
569
|
}
|
|
561
570
|
getColumnContentByHeaderName({ testId: t, headerName: e }) {
|
|
562
571
|
return this.getTableLocator({ testId: t }).locator(e).allTextContents();
|
|
563
572
|
}
|
|
564
573
|
}
|
|
565
|
-
class
|
|
574
|
+
class K {
|
|
566
575
|
constructor(t) {
|
|
567
|
-
|
|
576
|
+
c(this, "page");
|
|
568
577
|
this.page = t;
|
|
569
578
|
}
|
|
570
579
|
async waitForComponent({ testId: t }) {
|
|
@@ -584,76 +593,76 @@ class X {
|
|
|
584
593
|
return this.page.getByTestId(t).isDisabled();
|
|
585
594
|
}
|
|
586
595
|
}
|
|
587
|
-
class
|
|
596
|
+
class st {
|
|
588
597
|
constructor(t) {
|
|
589
|
-
|
|
598
|
+
c(this, "page");
|
|
590
599
|
this.page = t;
|
|
591
600
|
}
|
|
592
601
|
async waitForComponent({ testId: t }) {
|
|
593
|
-
const e = `[data-testid='${t}-${
|
|
602
|
+
const e = `[data-testid='${t}-${y.CONTAINER}']`;
|
|
594
603
|
await this.page.waitForSelector(e);
|
|
595
604
|
}
|
|
596
605
|
getSnackbarTitle({ testId: t }) {
|
|
597
|
-
return this.page.getByTestId(n(t,
|
|
606
|
+
return this.page.getByTestId(n(t, y.TITLE)).textContent();
|
|
598
607
|
}
|
|
599
608
|
async closeSnackbar({ testId: t }) {
|
|
600
|
-
await this.page.getByTestId(n(t,
|
|
609
|
+
await this.page.getByTestId(n(t, y.CLOSE)).locator(".icon-name--x").click();
|
|
601
610
|
}
|
|
602
611
|
async waitForSnackbarToBeClosed({ testId: t }) {
|
|
603
|
-
const e = `[data-testid='${t}-${
|
|
612
|
+
const e = `[data-testid='${t}-${y.CONTAINER}']`;
|
|
604
613
|
await this.page.waitForSelector(e, { state: "detached" });
|
|
605
614
|
}
|
|
606
615
|
getSnackbarDescription({ testId: t }) {
|
|
607
|
-
return this.page.getByTestId(n(t,
|
|
616
|
+
return this.page.getByTestId(n(t, y.MESSAGE)).textContent();
|
|
608
617
|
}
|
|
609
618
|
async clickOnActionButton({ testId: t, buttonName: e }) {
|
|
610
619
|
const o = await this.getActionButtonIndex({
|
|
611
620
|
testId: t,
|
|
612
621
|
buttonName: e
|
|
613
|
-
}),
|
|
614
|
-
await this.page.click(
|
|
622
|
+
}), i = `[data-testid='${t}-${y.ACTION_BUTTON}-${o}']`;
|
|
623
|
+
await this.page.click(i);
|
|
615
624
|
}
|
|
616
625
|
async getActionButtonIndex({
|
|
617
626
|
testId: t,
|
|
618
627
|
buttonName: e
|
|
619
628
|
}) {
|
|
620
|
-
return (await this.page.getByTestId(n(t,
|
|
629
|
+
return (await this.page.getByTestId(n(t, y.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
|
|
621
630
|
}
|
|
622
631
|
}
|
|
623
|
-
class
|
|
632
|
+
class rt {
|
|
624
633
|
constructor(t) {
|
|
625
|
-
|
|
634
|
+
c(this, "page");
|
|
626
635
|
this.page = t;
|
|
627
636
|
}
|
|
628
637
|
async waitForComponent({ testId: t }) {
|
|
629
|
-
const e = `[data-testid='${t}-${
|
|
638
|
+
const e = `[data-testid='${t}-${x.WRAPPER}']`;
|
|
630
639
|
await this.page.waitForSelector(e);
|
|
631
640
|
}
|
|
632
641
|
async closeMultiBar({ testId: t }) {
|
|
633
|
-
await this.page.getByTestId(n(t,
|
|
642
|
+
await this.page.getByTestId(n(t, x.CLOSE_BTN)).locator(".icon-wrapper").click();
|
|
634
643
|
}
|
|
635
644
|
getMultiBarCountText({ testId: t }) {
|
|
636
|
-
return this.page.getByTestId(n(t,
|
|
645
|
+
return this.page.getByTestId(n(t, x.WRAPPER)).locator(".count-text").textContent();
|
|
637
646
|
}
|
|
638
647
|
async isMultiBarVisible({ testId: t }) {
|
|
639
|
-
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t,
|
|
648
|
+
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, x.WRAPPER)).locator(".multi-bar-panel").isVisible();
|
|
640
649
|
}
|
|
641
650
|
async clickOnActionButton({ testId: t, actionButtonId: e }) {
|
|
642
651
|
await this.page.getByTestId(
|
|
643
652
|
n(
|
|
644
653
|
t,
|
|
645
|
-
`${
|
|
654
|
+
`${x.ACTION}-${e}`
|
|
646
655
|
)
|
|
647
656
|
).locator(".start-icon").click();
|
|
648
657
|
}
|
|
649
658
|
}
|
|
650
|
-
class
|
|
659
|
+
class ct {
|
|
651
660
|
constructor(t) {
|
|
652
|
-
|
|
661
|
+
c(this, "page");
|
|
653
662
|
this.page = t;
|
|
654
663
|
}
|
|
655
664
|
async waitForComponent({ testId: t }) {
|
|
656
|
-
const e = `[data-testid='${t}-${
|
|
665
|
+
const e = `[data-testid='${t}-${m.TEXT}']`;
|
|
657
666
|
await this.page.waitForSelector(e);
|
|
658
667
|
}
|
|
659
668
|
getFormRowTitle({ testId: t }) {
|
|
@@ -663,140 +672,140 @@ class it {
|
|
|
663
672
|
return new A(this.page).isMandatory({ testId: t });
|
|
664
673
|
}
|
|
665
674
|
getIconText({ testId: t }) {
|
|
666
|
-
return new
|
|
675
|
+
return new F(this.page).getExtraText({ testId: t });
|
|
667
676
|
}
|
|
668
677
|
}
|
|
669
|
-
class
|
|
678
|
+
class lt {
|
|
670
679
|
constructor(t) {
|
|
671
|
-
|
|
680
|
+
c(this, "page");
|
|
672
681
|
this.page = t;
|
|
673
682
|
}
|
|
674
683
|
async waitForComponent({ testId: t }) {
|
|
675
|
-
const e = `[data-testid='${t}-${
|
|
684
|
+
const e = `[data-testid='${t}-${E.CONTENT}']`;
|
|
676
685
|
await this.page.waitForSelector(e);
|
|
677
686
|
}
|
|
678
687
|
getCardTitle({ testId: t }) {
|
|
679
|
-
return this.page.getByTestId(n(t,
|
|
688
|
+
return this.page.getByTestId(n(t, E.TITLE)).textContent();
|
|
680
689
|
}
|
|
681
690
|
getCardContentText({ testId: t }) {
|
|
682
|
-
return this.page.getByTestId(n(t,
|
|
691
|
+
return this.page.getByTestId(n(t, E.CONTENT)).textContent();
|
|
683
692
|
}
|
|
684
693
|
getCardLabelText({ testId: t }) {
|
|
685
694
|
return new A(this.page).getLabelText({ testId: t });
|
|
686
695
|
}
|
|
687
696
|
async clickOnSaveButton({ testId: t }) {
|
|
688
|
-
await this.page.getByTestId(n(t,
|
|
697
|
+
await this.page.getByTestId(n(t, E.SAVE_BUTTON)).click();
|
|
689
698
|
}
|
|
690
699
|
async clickOnCancelButton({ testId: t }) {
|
|
691
|
-
await this.page.getByTestId(n(t,
|
|
700
|
+
await this.page.getByTestId(n(t, E.CANCEL_BUTTON)).click();
|
|
692
701
|
}
|
|
693
702
|
isSaveButtonLoading({ testId: t }) {
|
|
694
|
-
return new
|
|
703
|
+
return new K(this.page).isButtonLoading({ testId: t });
|
|
695
704
|
}
|
|
696
705
|
async clearForm({
|
|
697
706
|
testId: t,
|
|
698
707
|
inputType: e
|
|
699
708
|
}) {
|
|
700
|
-
(await this.page.getByTestId(n(t,
|
|
709
|
+
(await this.page.getByTestId(n(t, E.CONTENT)).locator(
|
|
701
710
|
`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`
|
|
702
|
-
).all()).forEach((
|
|
711
|
+
).all()).forEach((i) => i.clear());
|
|
703
712
|
}
|
|
704
713
|
}
|
|
705
|
-
class
|
|
714
|
+
class L extends H {
|
|
706
715
|
constructor(t) {
|
|
707
716
|
super(t);
|
|
708
717
|
}
|
|
709
718
|
async waitForComponent({ testId: t }) {
|
|
710
|
-
const e = `[data-testid='${t}-${
|
|
719
|
+
const e = `[data-testid='${t}-${r.WRAPPER}']`;
|
|
711
720
|
await this.page.waitForSelector(e);
|
|
712
721
|
}
|
|
713
722
|
async isViewOnly({ testId: t }) {
|
|
714
|
-
return await this.page.getByTestId(n(t,
|
|
723
|
+
return await this.page.getByTestId(n(t, r.WRAPPER)).locator(".view-only.input-type").count() > 0;
|
|
715
724
|
}
|
|
716
725
|
getLabel({ testId: t }) {
|
|
717
|
-
return this.page.getByTestId(n(t,
|
|
726
|
+
return this.page.getByTestId(n(t, r.LABEL_TEXT)).textContent();
|
|
718
727
|
}
|
|
719
728
|
isInputMandatory({ testId: t }) {
|
|
720
|
-
return this.page.getByTestId(n(t,
|
|
729
|
+
return this.page.getByTestId(n(t, r.MANDATORY)).isVisible();
|
|
721
730
|
}
|
|
722
731
|
hasInputExtraHelpText({ testId: t }) {
|
|
723
|
-
return this.page.getByTestId(n(t,
|
|
732
|
+
return this.page.getByTestId(n(t, r.EXTRA_TEXT)).isVisible();
|
|
724
733
|
}
|
|
725
734
|
async getHelpIconText({ testId: t }) {
|
|
726
|
-
const e = await this.page.getByTestId(n(t,
|
|
735
|
+
const e = await this.page.getByTestId(n(t, r.LABEL_CONTAINER)).locator(".v-popper.v-popper--theme-default");
|
|
727
736
|
return await e.hover(), e.getAttribute("text");
|
|
728
737
|
}
|
|
729
738
|
getInputExtraText({ testId: t }) {
|
|
730
|
-
return this.page.getByTestId(n(t,
|
|
739
|
+
return this.page.getByTestId(n(t, r.EXTRA_TEXT)).textContent();
|
|
731
740
|
}
|
|
732
741
|
getErrorExtraText({ testId: t }) {
|
|
733
|
-
return this.page.getByTestId(n(t,
|
|
742
|
+
return this.page.getByTestId(n(t, r.EXTRA_TEXT)).locator(".error").textContent();
|
|
734
743
|
}
|
|
735
744
|
async showPassword({ testId: t }) {
|
|
736
745
|
await this.isPasswordHidden({ testId: t }) && await this.clickOnPasswordButton({ testId: t });
|
|
737
746
|
}
|
|
738
747
|
async isPasswordHidden({ testId: t }) {
|
|
739
|
-
return await this.page.getByTestId(n(t,
|
|
748
|
+
return await this.page.getByTestId(n(t, r.WRAPPER)).getAttribute("type") === "password";
|
|
740
749
|
}
|
|
741
750
|
async clickOnPasswordButton({ testId: t }) {
|
|
742
|
-
await (await this.page.getByTestId(n(t,
|
|
751
|
+
await (await this.page.getByTestId(n(t, r.WRAPPER)).locator(".password-visibility")).click();
|
|
743
752
|
}
|
|
744
753
|
}
|
|
745
|
-
class
|
|
754
|
+
class pt {
|
|
746
755
|
constructor(t) {
|
|
747
|
-
|
|
756
|
+
c(this, "page");
|
|
748
757
|
this.page = t;
|
|
749
758
|
}
|
|
750
759
|
async waitForComponent({ testId: t }) {
|
|
751
|
-
const e = `[data-testid='${t}-${
|
|
760
|
+
const e = `[data-testid='${t}-${S.CONTAINER}']`;
|
|
752
761
|
await this.page.waitForSelector(e);
|
|
753
762
|
}
|
|
754
763
|
async searchInput({ testId: t, searchTerm: e }) {
|
|
755
|
-
await new
|
|
764
|
+
await new L(this.page).addInput({ testId: t, text: e });
|
|
756
765
|
}
|
|
757
766
|
async clearInput({ testId: t }) {
|
|
758
|
-
await new
|
|
767
|
+
await new L(this.page).clearInput({ testId: t });
|
|
759
768
|
}
|
|
760
769
|
async clickOnXButton({ testId: t }) {
|
|
761
|
-
await this.page.getByTestId(n(t,
|
|
770
|
+
await this.page.getByTestId(n(t, S.CLEAR)).locator(".icon-name--x-circle").click();
|
|
762
771
|
}
|
|
763
772
|
isDisabled({ testId: t }) {
|
|
764
|
-
return new
|
|
773
|
+
return new L(this.page).isDisabled({ testId: t });
|
|
765
774
|
}
|
|
766
775
|
getSearchPlaceholder({ testId: t }) {
|
|
767
|
-
return new
|
|
776
|
+
return new L(this.page).getPlaceholderText({ testId: t });
|
|
768
777
|
}
|
|
769
778
|
getSearchInputValue({ testId: t }) {
|
|
770
|
-
return new
|
|
779
|
+
return new L(this.page).getInputsFieldText({ testId: t });
|
|
771
780
|
}
|
|
772
781
|
}
|
|
773
|
-
class
|
|
782
|
+
class j {
|
|
774
783
|
constructor(t) {
|
|
775
|
-
|
|
784
|
+
c(this, "page");
|
|
776
785
|
this.page = t;
|
|
777
786
|
}
|
|
778
787
|
async waitForComponent({ testId: t }) {
|
|
779
|
-
const e = `[data-testid='${t}-${
|
|
788
|
+
const e = `[data-testid='${t}-${_.TEXT}']`;
|
|
780
789
|
await this.page.waitForSelector(e);
|
|
781
790
|
}
|
|
782
791
|
getInlineCopyText({ testId: t }) {
|
|
783
|
-
return this.page.getByTestId(`${t}-${
|
|
792
|
+
return this.page.getByTestId(`${t}-${_.TEXT}`).textContent();
|
|
784
793
|
}
|
|
785
794
|
}
|
|
786
|
-
class
|
|
795
|
+
class gt {
|
|
787
796
|
constructor(t) {
|
|
788
|
-
|
|
797
|
+
c(this, "page");
|
|
789
798
|
this.page = t;
|
|
790
799
|
}
|
|
791
800
|
async waitForComponent({ testId: t }) {
|
|
792
|
-
const e = `[data-testid='${t}-${
|
|
801
|
+
const e = `[data-testid='${t}-${b.TITLE}']`;
|
|
793
802
|
await this.page.waitForSelector(e);
|
|
794
803
|
}
|
|
795
804
|
getHeaderTitle({ testId: t }) {
|
|
796
|
-
return this.page.getByTestId(`${t}-${
|
|
805
|
+
return this.page.getByTestId(`${t}-${b.TITLE}`).textContent();
|
|
797
806
|
}
|
|
798
807
|
getInlineCopyText({ testId: t }) {
|
|
799
|
-
return new
|
|
808
|
+
return new j(this.page).getInlineCopyText({
|
|
800
809
|
testId: t
|
|
801
810
|
});
|
|
802
811
|
}
|
|
@@ -804,79 +813,79 @@ class ct {
|
|
|
804
813
|
testId: t,
|
|
805
814
|
iconName: e
|
|
806
815
|
}) {
|
|
807
|
-
return await this.page.getByTestId(`${t}-${
|
|
816
|
+
return await this.page.getByTestId(`${t}-${b.APP_PLATFORM}`).getAttribute("data-platform") === e;
|
|
808
817
|
}
|
|
809
818
|
}
|
|
810
|
-
class
|
|
819
|
+
class Tt {
|
|
811
820
|
constructor(t) {
|
|
812
|
-
|
|
821
|
+
c(this, "page");
|
|
813
822
|
this.page = t;
|
|
814
823
|
}
|
|
815
824
|
async waitForComponent({ testId: t }) {
|
|
816
|
-
const e = `[data-testid='${t}-${
|
|
825
|
+
const e = `[data-testid='${t}-${u.WRAPPER}']`;
|
|
817
826
|
await this.page.waitForSelector(e);
|
|
818
827
|
}
|
|
819
828
|
getAlertText({ testId: t }) {
|
|
820
|
-
return this.page.getByTestId(n(t,
|
|
829
|
+
return this.page.getByTestId(n(t, u.MESSAGE)).textContent();
|
|
821
830
|
}
|
|
822
831
|
getAlertTitle({ testId: t }) {
|
|
823
|
-
return this.page.getByTestId(n(t,
|
|
832
|
+
return this.page.getByTestId(n(t, u.TITLE)).textContent();
|
|
824
833
|
}
|
|
825
834
|
async clickOnActionButton({ testId: t }) {
|
|
826
835
|
await this.page.click(
|
|
827
|
-
n(t,
|
|
836
|
+
n(t, u.ACTION_BUTTON)
|
|
828
837
|
);
|
|
829
838
|
}
|
|
830
839
|
getActionButtonText({ testId: t }) {
|
|
831
|
-
return this.page.getByTestId(n(t,
|
|
840
|
+
return this.page.getByTestId(n(t, u.ACTION_BUTTON)).textContent();
|
|
832
841
|
}
|
|
833
842
|
async closeAlert({ testId: t }) {
|
|
834
|
-
await this.page.getByTestId(n(t,
|
|
843
|
+
await this.page.getByTestId(n(t, u.CLOSE_BUTTON)).click();
|
|
835
844
|
}
|
|
836
845
|
async isAlertVisible({ testId: t }) {
|
|
837
|
-
return await this.page.getByTestId(n(t,
|
|
846
|
+
return await this.page.getByTestId(n(t, u.WRAPPER)).count() > 0;
|
|
838
847
|
}
|
|
839
848
|
getAlertIconType({ testId: t }) {
|
|
840
|
-
return this.page.getByTestId(n(t,
|
|
849
|
+
return this.page.getByTestId(n(t, u.WRAPPER)).getAttribute("class");
|
|
841
850
|
}
|
|
842
851
|
}
|
|
843
|
-
class
|
|
852
|
+
class q {
|
|
844
853
|
constructor(t) {
|
|
845
|
-
|
|
854
|
+
c(this, "page");
|
|
846
855
|
this.page = t;
|
|
847
856
|
}
|
|
848
857
|
async waitForComponent({ testId: t }) {
|
|
849
|
-
const e = `[data-testid='${t}-${
|
|
858
|
+
const e = `[data-testid='${t}-${C.FIELD}']`;
|
|
850
859
|
await this.page.waitForSelector(e);
|
|
851
860
|
}
|
|
852
861
|
async addInput({ testId: t, text: e }) {
|
|
853
|
-
await this.page.getByTestId(n(t,
|
|
862
|
+
await this.page.getByTestId(n(t, C.FIELD)).type(e);
|
|
854
863
|
}
|
|
855
864
|
async clearInput({ testId: t }) {
|
|
856
|
-
await this.page.getByTestId(n(t,
|
|
865
|
+
await this.page.getByTestId(n(t, C.FIELD)).clear();
|
|
857
866
|
}
|
|
858
867
|
getInput({ testId: t }) {
|
|
859
|
-
return this.page.getByTestId(n(t,
|
|
868
|
+
return this.page.getByTestId(n(t, C.FIELD)).inputValue();
|
|
860
869
|
}
|
|
861
870
|
getPlaceholderText({ testId: t }) {
|
|
862
|
-
return this.page.getByTestId(n(t,
|
|
871
|
+
return this.page.getByTestId(n(t, C.FIELD)).getAttribute("placeholder");
|
|
863
872
|
}
|
|
864
873
|
isDisabled({ testId: t }) {
|
|
865
|
-
return this.page.getByTestId(n(t,
|
|
874
|
+
return this.page.getByTestId(n(t, C.FIELD)).isDisabled();
|
|
866
875
|
}
|
|
867
876
|
}
|
|
868
|
-
class
|
|
877
|
+
class ht extends q {
|
|
869
878
|
getLabelText({ testId: t }) {
|
|
870
|
-
return this.page.getByTestId(n(t,
|
|
879
|
+
return this.page.getByTestId(n(t, m.TEXT)).textContent();
|
|
871
880
|
}
|
|
872
881
|
hasFieldHelpText({ testId: t }) {
|
|
873
|
-
return this.page.getByTestId(n(t,
|
|
882
|
+
return this.page.getByTestId(n(t, w.CONTAINER)).isVisible();
|
|
874
883
|
}
|
|
875
884
|
getFieldHelpText({ testId: t }) {
|
|
876
|
-
return this.page.getByTestId(n(t,
|
|
885
|
+
return this.page.getByTestId(n(t, w.CONTAINER)).textContent();
|
|
877
886
|
}
|
|
878
887
|
}
|
|
879
|
-
class
|
|
888
|
+
class dt extends X {
|
|
880
889
|
constructor(t) {
|
|
881
890
|
super(t);
|
|
882
891
|
}
|
|
@@ -902,10 +911,10 @@ class gt extends f {
|
|
|
902
911
|
return this.page.getByTestId(n(t, s.BUTTON_CONTENT)).textContent();
|
|
903
912
|
}
|
|
904
913
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
905
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
914
|
+
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();
|
|
906
915
|
}
|
|
907
916
|
async isErrorText({ testId: t }) {
|
|
908
|
-
return await this.page.getByTestId(n(t,
|
|
917
|
+
return await this.page.getByTestId(n(t, w.TEXT)).count() > 0;
|
|
909
918
|
}
|
|
910
919
|
async isDisabled({ testId: t }) {
|
|
911
920
|
return (await this.page.getByTestId(n(t, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
@@ -941,9 +950,9 @@ class gt extends f {
|
|
|
941
950
|
shouldExpand: o = !1
|
|
942
951
|
}) {
|
|
943
952
|
await this.openDropdownComponent({ testId: t }), o && await this.expandTreeNode({ testId: t, nodeName: e });
|
|
944
|
-
const
|
|
945
|
-
if (await
|
|
946
|
-
await
|
|
953
|
+
const i = this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(`text=${e}`);
|
|
954
|
+
if (await i.isVisible())
|
|
955
|
+
await i.click();
|
|
947
956
|
else
|
|
948
957
|
throw new Error(`Option with text "${e}" not found in the dropdown.`);
|
|
949
958
|
}
|
|
@@ -961,55 +970,155 @@ class gt extends f {
|
|
|
961
970
|
await this.clickOnApply({ testId: t });
|
|
962
971
|
}
|
|
963
972
|
}
|
|
964
|
-
|
|
973
|
+
const z = ".sortable-item";
|
|
974
|
+
class ut {
|
|
965
975
|
constructor(t) {
|
|
966
|
-
|
|
976
|
+
c(this, "page");
|
|
967
977
|
this.page = t;
|
|
968
978
|
}
|
|
969
979
|
async waitForComponent({ testId: t }) {
|
|
970
|
-
const e = `[data-testid='${t}-${
|
|
980
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
971
981
|
await this.page.waitForSelector(e);
|
|
972
982
|
}
|
|
973
983
|
async isComponentLoaded(t) {
|
|
974
|
-
const e = `[data-testid='${t}-${
|
|
984
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
975
985
|
return this.page.isVisible(e);
|
|
976
986
|
}
|
|
977
987
|
async getItems(t) {
|
|
978
988
|
return this.page.getByTestId(n(t, "sortable-list-item")).allTextContents();
|
|
979
989
|
}
|
|
980
990
|
async sortItem(t, e, o) {
|
|
981
|
-
const
|
|
991
|
+
const i = await this.page.getByTestId(
|
|
982
992
|
n(t, "sortable-list-item")
|
|
983
|
-
),
|
|
984
|
-
await
|
|
993
|
+
), l = i.nth(e), h = i.nth(o);
|
|
994
|
+
await l.dragTo(h);
|
|
985
995
|
}
|
|
986
996
|
async verifyOrder(t, e) {
|
|
987
|
-
return (await this.getItems(t)).every((
|
|
997
|
+
return (await this.getItems(t)).every((i, l) => i === e[l]);
|
|
998
|
+
}
|
|
999
|
+
async getListItemLocator({ testId: t, item: e, modifier: o }) {
|
|
1000
|
+
return this.page.getByTestId(n(t, o)).locator(z, {
|
|
1001
|
+
hasText: e
|
|
1002
|
+
});
|
|
1003
|
+
}
|
|
1004
|
+
async selectItem({ testId: t, item: e, isLockedItem: o }) {
|
|
1005
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1006
|
+
await (await this.getListItemLocator({
|
|
1007
|
+
testId: t,
|
|
1008
|
+
item: e,
|
|
1009
|
+
modifier: i
|
|
1010
|
+
})).click();
|
|
1011
|
+
}
|
|
1012
|
+
async isItemSelected(t) {
|
|
1013
|
+
return await this.page.locator(".sortable-item--selected", { hasText: t }).count() > 0;
|
|
1014
|
+
}
|
|
1015
|
+
async expandItem({ testId: t, item: e, isLockedItem: o }) {
|
|
1016
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1017
|
+
await (await this.getListItemLocator({
|
|
1018
|
+
testId: t,
|
|
1019
|
+
item: e,
|
|
1020
|
+
modifier: i
|
|
1021
|
+
})).locator(".expand-icon").click();
|
|
1022
|
+
}
|
|
1023
|
+
async selectChildItem({
|
|
1024
|
+
testId: t,
|
|
1025
|
+
item: e,
|
|
1026
|
+
childItem: o,
|
|
1027
|
+
isLockedItem: i
|
|
1028
|
+
}) {
|
|
1029
|
+
await this.expandItem({
|
|
1030
|
+
testId: t,
|
|
1031
|
+
item: e,
|
|
1032
|
+
isLockedItem: i
|
|
1033
|
+
}), await this.page.locator("ul li span", {
|
|
1034
|
+
hasText: o
|
|
1035
|
+
}).click();
|
|
1036
|
+
}
|
|
1037
|
+
async isListOpened({ testId: t, item: e, isLockedItem: o }) {
|
|
1038
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1039
|
+
return await (await this.getListItemLocator({
|
|
1040
|
+
testId: t,
|
|
1041
|
+
item: e,
|
|
1042
|
+
modifier: i
|
|
1043
|
+
})).locator(".child-list ul").count() > 0;
|
|
1044
|
+
}
|
|
1045
|
+
async isChildItemSelected(t) {
|
|
1046
|
+
return await this.page.locator("ul li span", { hasText: t }).count() > 0;
|
|
1047
|
+
}
|
|
1048
|
+
async openItemMenu({ testId: t, item: e, isLockedItem: o }) {
|
|
1049
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1050
|
+
await (await this.getListItemLocator({
|
|
1051
|
+
testId: t,
|
|
1052
|
+
item: e,
|
|
1053
|
+
modifier: i
|
|
1054
|
+
})).locator(".item__menu button").click();
|
|
1055
|
+
}
|
|
1056
|
+
async selectMenuItem({
|
|
1057
|
+
testId: t,
|
|
1058
|
+
item: e,
|
|
1059
|
+
isLockedItem: o,
|
|
1060
|
+
menuItem: i
|
|
1061
|
+
}) {
|
|
1062
|
+
await this.openItemMenu({
|
|
1063
|
+
testId: t,
|
|
1064
|
+
item: e,
|
|
1065
|
+
isLockedItem: o
|
|
1066
|
+
});
|
|
1067
|
+
const l = this.page.locator(".dropdown-list-wrapper");
|
|
1068
|
+
await l.locator("ul.list li", { hasText: i }).click(), await l.waitFor({ state: "detached" });
|
|
1069
|
+
}
|
|
1070
|
+
async isMenuOpened() {
|
|
1071
|
+
return await this.page.locator(".dropdown-list-wrapper").count() > 0;
|
|
1072
|
+
}
|
|
1073
|
+
async dragAndDrop({ testId: t, item: e, isLockedItem: o }) {
|
|
1074
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST, h = await (await this.getListItemLocator({
|
|
1075
|
+
testId: t,
|
|
1076
|
+
item: e,
|
|
1077
|
+
modifier: i
|
|
1078
|
+
})).locator(".item.drag-allowed").first().boundingBox();
|
|
1079
|
+
if (h) {
|
|
1080
|
+
const k = h.x, D = h.y;
|
|
1081
|
+
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();
|
|
1082
|
+
}
|
|
1083
|
+
}
|
|
1084
|
+
async getListOrder() {
|
|
1085
|
+
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o, i) => (e[i + 1] = o, e), {});
|
|
1086
|
+
}
|
|
1087
|
+
async searchForItem({ testId: t, searchTerm: e }) {
|
|
1088
|
+
return await this.page.getByTestId(n(t, r.FIELD)).fill(e), this.page.getByTestId(n(t, T.CONTAINER)).locator("ul > li span").first().textContent();
|
|
1089
|
+
}
|
|
1090
|
+
// returns array of booleans according to the search results in each group
|
|
1091
|
+
async verifySearchResultDisplayed({ testId: t, item: e }) {
|
|
1092
|
+
const o = [], i = await this.page.getByTestId(n(t, T.CONTAINER)).all();
|
|
1093
|
+
let l;
|
|
1094
|
+
for (const h of i)
|
|
1095
|
+
l = await h.locator(".child-list span", { hasText: e }).count(), o.push(l > 0);
|
|
1096
|
+
return o;
|
|
988
1097
|
}
|
|
989
1098
|
}
|
|
990
1099
|
export {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
999
|
-
|
|
1100
|
+
Tt as AlertComponent,
|
|
1101
|
+
gt as AppHeaderComponent,
|
|
1102
|
+
Q as BannerComponent,
|
|
1103
|
+
K as ButtonComponent,
|
|
1104
|
+
Z as ComponentBasePage,
|
|
1105
|
+
M as DialogComponent,
|
|
1106
|
+
X as DropdownComponent,
|
|
1107
|
+
tt as DropdownComponentV3,
|
|
1108
|
+
F as FieldHelpTextComponent,
|
|
1000
1109
|
A as FieldLabelComponent,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1110
|
+
lt as FormCardComponent,
|
|
1111
|
+
ct as FormRowComponent,
|
|
1112
|
+
et as IncludeExcludeComponent,
|
|
1113
|
+
j as InlineCopyComponent,
|
|
1114
|
+
at as InputsComponent,
|
|
1115
|
+
rt as MultiBarComponent,
|
|
1116
|
+
pt as SearchComponent,
|
|
1117
|
+
st as SnackbarComponent,
|
|
1118
|
+
ut as SortableListComponent,
|
|
1119
|
+
it as TableComponent,
|
|
1120
|
+
nt as TabsComponent,
|
|
1121
|
+
ht as TextAreaComponent,
|
|
1122
|
+
ot as TooltipComponent,
|
|
1123
|
+
dt as TreeDropdownComponent
|
|
1015
1124
|
};
|