@ironsource/shared-ui-e2e 2.1.11-rc.47 → 2.1.11-rc.48
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 +151 -142
- package/shared-e2e-commands.umd.cjs +1 -1
- package/tests/testids/index.d.ts +1 -0
- package/tsconfig.tsbuildinfo +1 -1
package/shared-e2e-commands.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
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 || {}),
|
|
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
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,
|
|
@@ -60,83 +60,83 @@ class M {
|
|
|
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 }) {
|
|
113
113
|
await this.page.getByTestId(
|
|
114
|
-
n(t,
|
|
114
|
+
n(t, s.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, s.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, s.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, s.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, s.LIST_CONTAINER)).locator("ul > li span", { hasText: e }).click();
|
|
135
135
|
}
|
|
136
136
|
async selectMultipleItemsByIndex({ testId: t, itemsToSelect: e }) {
|
|
137
137
|
await this.openDropdownComponent({ testId: t });
|
|
138
138
|
for (const o of e)
|
|
139
|
-
await this.page.getByTestId(n(t,
|
|
139
|
+
await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li").nth(o).click();
|
|
140
140
|
}
|
|
141
141
|
async selectMultipleItemsByName({
|
|
142
142
|
testId: t,
|
|
@@ -144,16 +144,16 @@ class H {
|
|
|
144
144
|
}) {
|
|
145
145
|
await this.openDropdownComponent({ testId: t });
|
|
146
146
|
for (const o of e)
|
|
147
|
-
await this.page.getByTestId(n(t,
|
|
147
|
+
await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span", { hasText: o }).first().click();
|
|
148
148
|
}
|
|
149
149
|
async clickOnApply({ testId: t }) {
|
|
150
|
-
await this.page.getByTestId(n(t,
|
|
150
|
+
await this.page.getByTestId(n(t, s.ACTION_APPLY)).click();
|
|
151
151
|
}
|
|
152
152
|
async clickOnCancel({ testId: t }) {
|
|
153
|
-
await this.page.getByTestId(n(t,
|
|
153
|
+
await this.page.getByTestId(n(t, s.ACTION_CANCEL)).click();
|
|
154
154
|
}
|
|
155
155
|
async isValidationAppear({ testId: t }) {
|
|
156
|
-
return (await this.page.getByTestId(n(t,
|
|
156
|
+
return (await this.page.getByTestId(n(t, s.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error");
|
|
157
157
|
}
|
|
158
158
|
}
|
|
159
159
|
class A {
|
|
@@ -162,19 +162,19 @@ class A {
|
|
|
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;
|
|
@@ -189,12 +189,12 @@ class k {
|
|
|
189
189
|
return await (await this.page.getByTestId(n(t, w.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
|
|
190
190
|
}
|
|
191
191
|
}
|
|
192
|
-
class X extends
|
|
192
|
+
class X extends G {
|
|
193
193
|
constructor(e) {
|
|
194
194
|
super(e);
|
|
195
195
|
c(this, "fieldLabelComponent");
|
|
196
196
|
c(this, "fieldHelpTextComponent");
|
|
197
|
-
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new
|
|
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,46 +214,55 @@ class X extends H {
|
|
|
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
233
|
return await this.page.getByTestId(n(e, w.TEXT)).count() > 0;
|
|
225
234
|
}
|
|
226
235
|
async isDisabled({ testId: e }) {
|
|
227
|
-
return (await this.page.getByTestId(n(e,
|
|
236
|
+
return (await this.page.getByTestId(n(e, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
228
237
|
}
|
|
229
238
|
async clearAllOptions({ testId: e }) {
|
|
230
|
-
await this.page.getByTestId(n(e,
|
|
239
|
+
await this.page.getByTestId(n(e, s.ACTION_CLEAR_ALL)).click();
|
|
231
240
|
}
|
|
232
241
|
isSelectAllChecked({ testId: e }) {
|
|
233
|
-
return this.page.getByTestId(n(e,
|
|
242
|
+
return this.page.getByTestId(n(e, s.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
234
243
|
}
|
|
235
244
|
isSelectAllIndeterminate({ testId: e }) {
|
|
236
|
-
return this.page.getByTestId(n(e,
|
|
245
|
+
return this.page.getByTestId(n(e, s.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
237
246
|
}
|
|
238
247
|
async removeChipSelection({ testId: e }) {
|
|
239
|
-
await this.page.getByTestId(n(e,
|
|
248
|
+
await this.page.getByTestId(n(e, s.BUTTON_CLEAR)).click();
|
|
240
249
|
}
|
|
241
250
|
getDropdownOptions({ testId: e }) {
|
|
242
|
-
return this.page.getByTestId(n(e,
|
|
251
|
+
return this.page.getByTestId(n(e, s.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
243
252
|
}
|
|
244
253
|
}
|
|
245
|
-
class tt extends
|
|
254
|
+
class tt extends G {
|
|
246
255
|
constructor(t) {
|
|
247
256
|
super(t);
|
|
248
257
|
}
|
|
249
258
|
getDropdownTitle({ testId: t }) {
|
|
250
|
-
return this.page.getByTestId(n(t,
|
|
259
|
+
return this.page.getByTestId(n(t, s.WRAPPER)).locator("label > span").textContent();
|
|
251
260
|
}
|
|
252
261
|
getSelectedItem({ testId: t }) {
|
|
253
|
-
return this.page.getByTestId(n(t,
|
|
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, S.FIELD)).fill(e), 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
268
|
class et {
|
|
@@ -322,42 +331,42 @@ class et {
|
|
|
322
331
|
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, g.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
323
332
|
}
|
|
324
333
|
}
|
|
325
|
-
class
|
|
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 at extends
|
|
358
|
+
class at extends H {
|
|
350
359
|
constructor(e) {
|
|
351
360
|
super(e);
|
|
352
361
|
c(this, "fieldLabelComponent");
|
|
353
362
|
c(this, "fieldHelpTextComponent");
|
|
354
|
-
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new
|
|
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 at extends v {
|
|
|
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 at extends v {
|
|
|
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 at extends v {
|
|
|
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,13 +425,13 @@ class at extends v {
|
|
|
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
437
|
class nt {
|
|
@@ -457,37 +466,37 @@ class ot {
|
|
|
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 I = ".table-row", N = ".icon-wrapper", $ = ".states", P = ".table-head-container",
|
|
479
|
+
const I = ".table-row", N = ".icon-wrapper", $ = ".states", P = ".table-head-container", f = ".table-row.loading", Y = 1e3;
|
|
471
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
502
|
await this.page.locator(P, {
|
|
@@ -495,18 +504,18 @@ class it {
|
|
|
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
521
|
const i = document.querySelector(o);
|
|
@@ -514,48 +523,48 @@ class it {
|
|
|
514
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
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 }) {
|
|
@@ -626,23 +635,23 @@ class rt {
|
|
|
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
|
}
|
|
@@ -653,7 +662,7 @@ class ct {
|
|
|
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,7 +672,7 @@ class ct {
|
|
|
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
678
|
class lt {
|
|
@@ -702,44 +711,44 @@ class lt {
|
|
|
702
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
754
|
class pt {
|
|
@@ -752,22 +761,22 @@ class pt {
|
|
|
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
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
782
|
class j {
|
|
@@ -789,11 +798,11 @@ class gt {
|
|
|
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
808
|
return new j(this.page).getInlineCopyText({
|
|
@@ -804,7 +813,7 @@ class gt {
|
|
|
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
819
|
class Tt {
|
|
@@ -867,7 +876,7 @@ class q {
|
|
|
867
876
|
}
|
|
868
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
882
|
return this.page.getByTestId(n(t, w.CONTAINER)).isVisible();
|
|
@@ -899,37 +908,37 @@ class dt extends X {
|
|
|
899
908
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: t, type: e });
|
|
900
909
|
}
|
|
901
910
|
getSelectedLabel({ testId: t }) {
|
|
902
|
-
return this.page.getByTestId(n(t,
|
|
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
917
|
return await this.page.getByTestId(n(t, w.TEXT)).count() > 0;
|
|
909
918
|
}
|
|
910
919
|
async isDisabled({ testId: t }) {
|
|
911
|
-
return (await this.page.getByTestId(n(t,
|
|
920
|
+
return (await this.page.getByTestId(n(t, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
912
921
|
}
|
|
913
922
|
async clearAllOptions({ testId: t }) {
|
|
914
|
-
await this.page.getByTestId(n(t,
|
|
923
|
+
await this.page.getByTestId(n(t, s.ACTION_CLEAR_ALL)).click();
|
|
915
924
|
}
|
|
916
925
|
isSelectAllChecked({ testId: t }) {
|
|
917
|
-
return this.page.getByTestId(n(t,
|
|
926
|
+
return this.page.getByTestId(n(t, s.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
918
927
|
}
|
|
919
928
|
isSelectAllIndeterminate({ testId: t }) {
|
|
920
|
-
return this.page.getByTestId(n(t,
|
|
929
|
+
return this.page.getByTestId(n(t, s.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
921
930
|
}
|
|
922
931
|
async removeChipSelection({ testId: t }) {
|
|
923
|
-
await this.page.getByTestId(n(t,
|
|
932
|
+
await this.page.getByTestId(n(t, s.BUTTON_CLEAR)).click();
|
|
924
933
|
}
|
|
925
934
|
getDropdownOptions({ testId: t }) {
|
|
926
|
-
return this.page.getByTestId(n(t,
|
|
935
|
+
return this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
927
936
|
}
|
|
928
937
|
async expandTreeNode({
|
|
929
938
|
testId: t,
|
|
930
939
|
nodeName: e
|
|
931
940
|
}) {
|
|
932
|
-
const o = this.page.getByTestId(n(t,
|
|
941
|
+
const o = this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(`text=${e}`);
|
|
933
942
|
if (await o.isVisible())
|
|
934
943
|
await o.click();
|
|
935
944
|
else
|
|
@@ -941,7 +950,7 @@ class dt extends X {
|
|
|
941
950
|
shouldExpand: o = !1
|
|
942
951
|
}) {
|
|
943
952
|
await this.openDropdownComponent({ testId: t }), o && await this.expandTreeNode({ testId: t, nodeName: e });
|
|
944
|
-
const i = this.page.getByTestId(n(t,
|
|
953
|
+
const i = this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(`text=${e}`);
|
|
945
954
|
if (await i.isVisible())
|
|
946
955
|
await i.click();
|
|
947
956
|
else
|
|
@@ -981,11 +990,11 @@ class ut {
|
|
|
981
990
|
async sortItem(t, e, o) {
|
|
982
991
|
const i = await this.page.getByTestId(
|
|
983
992
|
n(t, "sortable-list-item")
|
|
984
|
-
),
|
|
985
|
-
await
|
|
993
|
+
), l = i.nth(e), h = i.nth(o);
|
|
994
|
+
await l.dragTo(h);
|
|
986
995
|
}
|
|
987
996
|
async verifyOrder(t, e) {
|
|
988
|
-
return (await this.getItems(t)).every((i,
|
|
997
|
+
return (await this.getItems(t)).every((i, l) => i === e[l]);
|
|
989
998
|
}
|
|
990
999
|
async getListItemLocator({ testId: t, item: e, modifier: o }) {
|
|
991
1000
|
return this.page.getByTestId(n(t, o)).locator(z, {
|
|
@@ -1055,35 +1064,35 @@ class ut {
|
|
|
1055
1064
|
item: e,
|
|
1056
1065
|
isLockedItem: o
|
|
1057
1066
|
});
|
|
1058
|
-
const
|
|
1059
|
-
await
|
|
1067
|
+
const l = this.page.locator(".dropdown-list-wrapper");
|
|
1068
|
+
await l.locator("ul.list li", { hasText: i }).click(), await l.waitFor({ state: "detached" });
|
|
1060
1069
|
}
|
|
1061
1070
|
async isMenuOpened() {
|
|
1062
1071
|
return await this.page.locator(".dropdown-list-wrapper").count() > 0;
|
|
1063
1072
|
}
|
|
1064
1073
|
async dragAndDrop({ testId: t, item: e, isLockedItem: o }) {
|
|
1065
|
-
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST,
|
|
1074
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST, h = await (await this.getListItemLocator({
|
|
1066
1075
|
testId: t,
|
|
1067
1076
|
item: e,
|
|
1068
1077
|
modifier: i
|
|
1069
1078
|
})).locator(".item.drag-allowed").first().boundingBox();
|
|
1070
|
-
if (
|
|
1071
|
-
const
|
|
1072
|
-
await this.page.mouse.move(
|
|
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();
|
|
1073
1082
|
}
|
|
1074
1083
|
}
|
|
1075
1084
|
async getListOrder() {
|
|
1076
1085
|
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o, i) => (e[i + 1] = o, e), {});
|
|
1077
1086
|
}
|
|
1078
1087
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
1079
|
-
return await this.page.getByTestId(n(t,
|
|
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();
|
|
1080
1089
|
}
|
|
1081
1090
|
// returns array of booleans according to the search results in each group
|
|
1082
1091
|
async verifySearchResultDisplayed({ testId: t, item: e }) {
|
|
1083
1092
|
const o = [], i = await this.page.getByTestId(n(t, T.CONTAINER)).all();
|
|
1084
|
-
let
|
|
1085
|
-
for (const
|
|
1086
|
-
|
|
1093
|
+
let l;
|
|
1094
|
+
for (const h of i)
|
|
1095
|
+
l = await h.locator(".child-list span", { hasText: e }).count(), o.push(l > 0);
|
|
1087
1096
|
return o;
|
|
1088
1097
|
}
|
|
1089
1098
|
}
|
|
@@ -1096,7 +1105,7 @@ export {
|
|
|
1096
1105
|
M as DialogComponent,
|
|
1097
1106
|
X as DropdownComponent,
|
|
1098
1107
|
tt as DropdownComponentV3,
|
|
1099
|
-
|
|
1108
|
+
F as FieldHelpTextComponent,
|
|
1100
1109
|
A as FieldLabelComponent,
|
|
1101
1110
|
lt as FormCardComponent,
|
|
1102
1111
|
ct as FormRowComponent,
|