@ironsource/shared-ui-e2e 2.1.11-test.27 → 2.1.11-test.41
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 +350 -247
- 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 +14 -0
- package/tests/components/sortablelist/sortable-list-page.d.ts +14 -1
- package/tests/components/sortablelist/types.d.ts +28 -0
- package/tests/index.d.ts +9 -9
- package/tsconfig.tsbuildinfo +1 -1
package/shared-e2e-commands.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
1
|
var W = Object.defineProperty;
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var p = /* @__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))(p || {}),
|
|
5
|
-
const
|
|
2
|
+
var f = (a, t, e) => t in a ? W(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var c = (a, t, e) => (f(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
var p = /* @__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))(p || {}), r = /* @__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_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))(r || {}), R = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(R || {}), d = /* @__PURE__ */ ((a) => (a.WRAPPER = "alert-wrapper", a.TITLE = "alert-title", a.MESSAGE = "alert-message", a.ACTION_BUTTON = "alert-action-button", a.CLOSE_BUTTON = "alert-close-button", a))(d || {}), h = /* @__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))(h || {}), s = /* @__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))(s || {}), 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 || {}), l = /* @__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))(l || {}), b = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(b || {}), B = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(B || {}), L = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(L || {}), 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 || {}), O = /* @__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))(O || {}), _ = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))(_ || {}), m = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(m || {}), T = /* @__PURE__ */ ((a) => (a.CONTAINER = "sortable-list-container", a.DRAGGABLE_LIST = "sortable-list-draggable-list", a.LOCKED_LIST = "sortable-list-locked-list", a))(T || {});
|
|
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(([g, u]) => {
|
|
11
|
+
e.push(`${g}:${u}`);
|
|
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,96 +47,96 @@ 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}-${h.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, h.HEADER)).textContent();
|
|
68
68
|
}
|
|
69
69
|
getDialogText({ testId: t }) {
|
|
70
|
-
return this.page.getByTestId(n(t,
|
|
70
|
+
return this.page.getByTestId(n(t, h.CONTENT)).textContent();
|
|
71
71
|
}
|
|
72
72
|
async closeDialog({ testId: t }) {
|
|
73
73
|
await (await this.page.getByTestId(
|
|
74
|
-
n(t,
|
|
74
|
+
n(t, h.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, h.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, h.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, h.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, h.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, h.WRAPPER)
|
|
98
98
|
)).isVisible();
|
|
99
99
|
}
|
|
100
100
|
async waitForDialogToClose(t) {
|
|
101
101
|
await this.page.waitForSelector(
|
|
102
|
-
n(t,
|
|
102
|
+
n(t, h.WRAPPER),
|
|
103
103
|
{ state: "hidden" }
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class H {
|
|
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, r.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, r.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, r.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, r.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, r.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, r.LIST_CONTAINER)).locator("ul > li").nth(o).click();
|
|
140
140
|
}
|
|
141
141
|
async selectMultipleItemsByName({
|
|
142
142
|
testId: t,
|
|
@@ -144,56 +144,56 @@ class D {
|
|
|
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, r.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, r.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, r.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, r.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error");
|
|
157
157
|
}
|
|
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, L.TEXT)).textContent();
|
|
166
166
|
}
|
|
167
167
|
isMandatory({ testId: t }) {
|
|
168
|
-
return this.page.getByTestId(n(t,
|
|
168
|
+
return this.page.getByTestId(n(t, L.MANDATORY)).isVisible();
|
|
169
169
|
}
|
|
170
170
|
async getHelpIconText({ testId: t }) {
|
|
171
171
|
const e = await this.page.getByTestId(
|
|
172
|
-
n(t,
|
|
172
|
+
n(t, L.TOOLTIP)
|
|
173
173
|
);
|
|
174
174
|
return await e.hover(), e.getAttribute("text");
|
|
175
175
|
}
|
|
176
176
|
}
|
|
177
177
|
class k {
|
|
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 H {
|
|
193
193
|
constructor(e) {
|
|
194
194
|
super(e);
|
|
195
|
-
|
|
196
|
-
|
|
195
|
+
c(this, "fieldLabelComponent");
|
|
196
|
+
c(this, "fieldHelpTextComponent");
|
|
197
197
|
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new k(e);
|
|
198
198
|
}
|
|
199
199
|
getDropdownTitle({ testId: e }) {
|
|
@@ -215,50 +215,50 @@ class f extends D {
|
|
|
215
215
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
|
|
216
216
|
}
|
|
217
217
|
getSelectedLabel({ testId: e }) {
|
|
218
|
-
return this.page.getByTestId(n(e,
|
|
218
|
+
return this.page.getByTestId(n(e, r.BUTTON_CONTENT)).textContent();
|
|
219
219
|
}
|
|
220
220
|
async searchForItem({ testId: e, searchTerm: o }) {
|
|
221
|
-
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e,
|
|
221
|
+
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, s.FIELD)).fill(o), this.page.getByTestId(n(e, r.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
222
222
|
}
|
|
223
223
|
async isErrorText({ testId: e }) {
|
|
224
|
-
return await this.page.getByTestId(n(e,
|
|
224
|
+
return await this.page.getByTestId(n(e, w.TEXT)).count() > 0;
|
|
225
225
|
}
|
|
226
226
|
async isDisabled({ testId: e }) {
|
|
227
|
-
return (await this.page.getByTestId(n(e,
|
|
227
|
+
return (await this.page.getByTestId(n(e, r.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
228
228
|
}
|
|
229
229
|
async clearAllOptions({ testId: e }) {
|
|
230
|
-
await this.page.getByTestId(n(e,
|
|
230
|
+
await this.page.getByTestId(n(e, r.ACTION_CLEAR_ALL)).click();
|
|
231
231
|
}
|
|
232
232
|
isSelectAllChecked({ testId: e }) {
|
|
233
|
-
return this.page.getByTestId(n(e,
|
|
233
|
+
return this.page.getByTestId(n(e, r.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
234
234
|
}
|
|
235
235
|
isSelectAllIndeterminate({ testId: e }) {
|
|
236
|
-
return this.page.getByTestId(n(e,
|
|
236
|
+
return this.page.getByTestId(n(e, r.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
237
237
|
}
|
|
238
238
|
async removeChipSelection({ testId: e }) {
|
|
239
|
-
await this.page.getByTestId(n(e,
|
|
239
|
+
await this.page.getByTestId(n(e, r.BUTTON_CLEAR)).click();
|
|
240
240
|
}
|
|
241
241
|
getDropdownOptions({ testId: e }) {
|
|
242
|
-
return this.page.getByTestId(n(e,
|
|
242
|
+
return this.page.getByTestId(n(e, r.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
|
-
class
|
|
245
|
+
class tt extends H {
|
|
246
246
|
constructor(t) {
|
|
247
247
|
super(t);
|
|
248
248
|
}
|
|
249
249
|
getDropdownTitle({ testId: t }) {
|
|
250
|
-
return this.page.getByTestId(n(t,
|
|
250
|
+
return this.page.getByTestId(n(t, r.WRAPPER)).locator("label > span").textContent();
|
|
251
251
|
}
|
|
252
252
|
getSelectedItem({ testId: t }) {
|
|
253
|
-
return this.page.getByTestId(n(t,
|
|
253
|
+
return this.page.getByTestId(n(t, r.TRIGGER)).locator("button > span").textContent();
|
|
254
254
|
}
|
|
255
255
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
256
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
256
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, S.FIELD)).fill(e), this.page.getByTestId(n(t, r.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
257
257
|
}
|
|
258
258
|
}
|
|
259
|
-
class
|
|
259
|
+
class et {
|
|
260
260
|
constructor(t) {
|
|
261
|
-
|
|
261
|
+
c(this, "page");
|
|
262
262
|
this.page = t;
|
|
263
263
|
}
|
|
264
264
|
async waitForComponent({ testId: t }) {
|
|
@@ -322,42 +322,42 @@ class Z {
|
|
|
322
322
|
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
323
323
|
}
|
|
324
324
|
}
|
|
325
|
-
class
|
|
325
|
+
class v {
|
|
326
326
|
constructor(t) {
|
|
327
|
-
|
|
327
|
+
c(this, "page");
|
|
328
328
|
this.page = t;
|
|
329
329
|
}
|
|
330
330
|
getInputsFieldText({ testId: t }) {
|
|
331
|
-
return this.page.getByTestId(n(t,
|
|
331
|
+
return this.page.getByTestId(n(t, s.FIELD)).inputValue();
|
|
332
332
|
}
|
|
333
333
|
getPlaceholderText({ testId: t }) {
|
|
334
|
-
return this.page.getByTestId(n(t,
|
|
334
|
+
return this.page.getByTestId(n(t, s.FIELD)).getAttribute("placeholder");
|
|
335
335
|
}
|
|
336
336
|
getInputsType({ testId: t }) {
|
|
337
|
-
return this.page.getByTestId(n(t,
|
|
337
|
+
return this.page.getByTestId(n(t, s.FIELD)).getAttribute("type");
|
|
338
338
|
}
|
|
339
339
|
async addInput({ testId: t, text: e }) {
|
|
340
|
-
await this.page.getByTestId(n(t,
|
|
340
|
+
await this.page.getByTestId(n(t, s.FIELD)).type(e);
|
|
341
341
|
}
|
|
342
342
|
async clearInput({ testId: t }) {
|
|
343
|
-
await this.page.getByTestId(n(t,
|
|
343
|
+
await this.page.getByTestId(n(t, s.FIELD)).clear();
|
|
344
344
|
}
|
|
345
345
|
isDisabled({ testId: t }) {
|
|
346
|
-
return this.page.getByTestId(n(t,
|
|
346
|
+
return this.page.getByTestId(n(t, s.FIELD)).isDisabled();
|
|
347
347
|
}
|
|
348
348
|
}
|
|
349
|
-
class
|
|
349
|
+
class at extends v {
|
|
350
350
|
constructor(e) {
|
|
351
351
|
super(e);
|
|
352
|
-
|
|
353
|
-
|
|
352
|
+
c(this, "fieldLabelComponent");
|
|
353
|
+
c(this, "fieldHelpTextComponent");
|
|
354
354
|
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new k(e);
|
|
355
355
|
}
|
|
356
356
|
getInputsLabelText({ testId: e }) {
|
|
357
357
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
358
358
|
}
|
|
359
359
|
async waitForComponent({ testId: e }) {
|
|
360
|
-
const o = `[data-testid='${e}-${
|
|
360
|
+
const o = `[data-testid='${e}-${s.WRAPPER}']`;
|
|
361
361
|
await this.page.waitForSelector(o);
|
|
362
362
|
}
|
|
363
363
|
isInputMandatory({ testId: e }) {
|
|
@@ -370,14 +370,14 @@ class M extends H {
|
|
|
370
370
|
return this.fieldHelpTextComponent.getExtraText({ testId: e });
|
|
371
371
|
}
|
|
372
372
|
async clickOnApplyButton({ testId: e }) {
|
|
373
|
-
await (await this.page.getByTestId(n(e,
|
|
373
|
+
await (await this.page.getByTestId(n(e, s.WRAPPER)).locator(".icon.icon-name--check")).click();
|
|
374
374
|
}
|
|
375
375
|
hasInlineErrorText({ testId: e }) {
|
|
376
|
-
return this.page.getByTestId(n(e,
|
|
376
|
+
return this.page.getByTestId(n(e, s.TOOLTIP)).isVisible();
|
|
377
377
|
}
|
|
378
378
|
async getInlineErrorText({ testId: e }) {
|
|
379
379
|
const o = await this.page.getByTestId(
|
|
380
|
-
n(e,
|
|
380
|
+
n(e, s.TOOLTIP)
|
|
381
381
|
);
|
|
382
382
|
return await o.hover(), o.getAttribute("text");
|
|
383
383
|
}
|
|
@@ -385,17 +385,17 @@ class M extends H {
|
|
|
385
385
|
await this.isPasswordHidden({ testId: e }) && await this.clickOnPasswordIcon({ testId: e });
|
|
386
386
|
}
|
|
387
387
|
async clickOnPasswordIcon({ testId: e }) {
|
|
388
|
-
await this.page.getByTestId(n(e,
|
|
388
|
+
await this.page.getByTestId(n(e, s.TOGGLE_PASSWORD)).click();
|
|
389
389
|
}
|
|
390
390
|
async clickOnHidePassword({ testId: e }) {
|
|
391
391
|
await this.isPasswordHidden({ testId: e }) || await this.clickOnPasswordIcon({ testId: e });
|
|
392
392
|
}
|
|
393
393
|
isPasswordHidden({ testId: e }) {
|
|
394
|
-
return this.page.getByTestId(n(e,
|
|
394
|
+
return this.page.getByTestId(n(e, s.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
|
|
395
395
|
}
|
|
396
396
|
async clearInput({ testId: e }) {
|
|
397
397
|
await (await this.page.getByTestId(
|
|
398
|
-
n(e,
|
|
398
|
+
n(e, s.FIELD)
|
|
399
399
|
)).clear();
|
|
400
400
|
}
|
|
401
401
|
hasExtraTextIconType({ testId: e, type: o }) {
|
|
@@ -403,11 +403,11 @@ class M extends H {
|
|
|
403
403
|
}
|
|
404
404
|
async isDisabled({ testId: e }) {
|
|
405
405
|
return (await this.page.getByTestId(
|
|
406
|
-
n(e,
|
|
406
|
+
n(e, s.FIELD)
|
|
407
407
|
)).isDisabled();
|
|
408
408
|
}
|
|
409
409
|
hasApplyButton({ testId: e }) {
|
|
410
|
-
return this.page.getByTestId(n(e,
|
|
410
|
+
return this.page.getByTestId(n(e, s.WRAPPER)).locator(".icon.icon-name--check").isVisible();
|
|
411
411
|
}
|
|
412
412
|
async getMaxLengthNumber({ testId: e }) {
|
|
413
413
|
return (await this.getFontCaptionText({ testId: e }))[1];
|
|
@@ -416,61 +416,61 @@ class M extends H {
|
|
|
416
416
|
return (await this.getFontCaptionText({ testId: e }))[0];
|
|
417
417
|
}
|
|
418
418
|
async getFontCaptionText({ testId: e }) {
|
|
419
|
-
return (await this.page.getByTestId(n(e,
|
|
419
|
+
return (await this.page.getByTestId(n(e, s.WRAPPER)).locator(".font-caption").textContent()).split("/").map((i) => parseInt(i.trim(), 10));
|
|
420
420
|
}
|
|
421
421
|
getHelpIconText({ testId: e }) {
|
|
422
422
|
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
423
423
|
}
|
|
424
424
|
async isValidationAppear({ testId: e }) {
|
|
425
|
-
return (await this.page.getByTestId(n(e,
|
|
425
|
+
return (await this.page.getByTestId(n(e, s.WRAPPER)).getAttribute("class")).includes("variant-error");
|
|
426
426
|
}
|
|
427
427
|
}
|
|
428
|
-
class
|
|
428
|
+
class nt {
|
|
429
429
|
constructor(t) {
|
|
430
|
-
|
|
430
|
+
c(this, "page");
|
|
431
431
|
this.page = t;
|
|
432
432
|
}
|
|
433
433
|
async waitForComponent({ testId: t }) {
|
|
434
|
-
const e = `[data-testid='${t}-${
|
|
434
|
+
const e = `[data-testid='${t}-${B.WRAPPER}']`;
|
|
435
435
|
await this.page.waitForSelector(e);
|
|
436
436
|
}
|
|
437
437
|
getSelectedTabText({ testId: t }) {
|
|
438
|
-
return this.page.getByTestId(n(t,
|
|
438
|
+
return this.page.getByTestId(n(t, B.WRAPPER)).locator(".tab-item--active").textContent();
|
|
439
439
|
}
|
|
440
440
|
async selectTab({ testId: t, tabName: e }) {
|
|
441
441
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
442
442
|
await this.page.getByTestId(
|
|
443
|
-
n(t, `${
|
|
443
|
+
n(t, `${B.TAB}-${o + 1}`)
|
|
444
444
|
).click();
|
|
445
445
|
}
|
|
446
446
|
async getTabIndex({ testId: t, tabName: e }) {
|
|
447
|
-
return (await this.page.getByTestId(n(t,
|
|
447
|
+
return (await this.page.getByTestId(n(t, B.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
|
|
448
448
|
}
|
|
449
449
|
async isTabDisabled({ testId: t, tabName: e }) {
|
|
450
450
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
451
|
-
return this.page.getByTestId(n(t, `${
|
|
451
|
+
return this.page.getByTestId(n(t, `${B.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
|
|
452
452
|
}
|
|
453
453
|
}
|
|
454
|
-
class
|
|
454
|
+
class ot {
|
|
455
455
|
constructor(t) {
|
|
456
|
-
|
|
456
|
+
c(this, "page");
|
|
457
457
|
this.page = t;
|
|
458
458
|
}
|
|
459
459
|
async waitForComponent({ testId: t }) {
|
|
460
|
-
const e = `[data-testid='${t}-${
|
|
460
|
+
const e = `[data-testid='${t}-${b.TRIGGER}']`;
|
|
461
461
|
await this.page.waitForSelector(e);
|
|
462
462
|
}
|
|
463
463
|
getTooltipText({ testId: t }) {
|
|
464
|
-
return this.page.getByTestId(`${t}-${
|
|
464
|
+
return this.page.getByTestId(`${t}-${b.TRIGGER}`).getAttribute("text");
|
|
465
465
|
}
|
|
466
466
|
getTooltipHeaderText({ testId: t }) {
|
|
467
|
-
return this.page.getByTestId(`${t}-${
|
|
467
|
+
return this.page.getByTestId(`${t}-${b.TRIGGER}`).getAttribute("header");
|
|
468
468
|
}
|
|
469
469
|
}
|
|
470
|
-
const
|
|
471
|
-
class
|
|
470
|
+
const I = ".table-row", N = ".icon-wrapper", $ = ".states", P = ".table-head-container", G = ".table-row.loading", Y = 1e3;
|
|
471
|
+
class it {
|
|
472
472
|
constructor(t) {
|
|
473
|
-
|
|
473
|
+
c(this, "page");
|
|
474
474
|
this.page = t;
|
|
475
475
|
}
|
|
476
476
|
async waitForComponent({ testId: t }) {
|
|
@@ -478,10 +478,10 @@ class at {
|
|
|
478
478
|
await this.page.waitForSelector(e);
|
|
479
479
|
}
|
|
480
480
|
getTableRowCount({ testId: t }) {
|
|
481
|
-
return this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(
|
|
481
|
+
return this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(I).count();
|
|
482
482
|
}
|
|
483
483
|
async getColumnHeaders({ testId: t }) {
|
|
484
|
-
return this.page.getByTestId(n(t, l.TABLE)).locator(
|
|
484
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(P).allTextContents();
|
|
485
485
|
}
|
|
486
486
|
getTableLabel({ testId: t }) {
|
|
487
487
|
return this.page.getByTestId(n(t, l.HEADER)).innerText();
|
|
@@ -490,18 +490,18 @@ class at {
|
|
|
490
490
|
return this.page.getByTestId(n(t, l.CONTAINER)).locator(".table-footer").innerText();
|
|
491
491
|
}
|
|
492
492
|
async clickOnHeaderByName(t) {
|
|
493
|
-
await this.page.locator(
|
|
493
|
+
await this.page.locator(P, {
|
|
494
494
|
hasText: t
|
|
495
495
|
}).click();
|
|
496
496
|
}
|
|
497
497
|
async searchForItems({ testId: t, searchTerm: e }) {
|
|
498
|
-
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t,
|
|
498
|
+
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, s.FIELD)).fill(e);
|
|
499
499
|
}
|
|
500
500
|
async clearSearchText({ testId: t }) {
|
|
501
|
-
await this.page.getByTestId(n(t,
|
|
501
|
+
await this.page.getByTestId(n(t, s.FIELD)).clear(), await this.waitForTableToLoad();
|
|
502
502
|
}
|
|
503
503
|
isArrowVisible({ testId: t, headerName: e }) {
|
|
504
|
-
return this.page.getByTestId(n(t, l.TABLE)).locator(
|
|
504
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(P, { hasText: e }).locator(".table-sort-icon").isVisible();
|
|
505
505
|
}
|
|
506
506
|
async scrollDownTableRows({ testId: t }) {
|
|
507
507
|
const e = `[data-testid=${n(
|
|
@@ -509,29 +509,29 @@ class at {
|
|
|
509
509
|
l.TABLE
|
|
510
510
|
)}]`;
|
|
511
511
|
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
}, e), await this.page.waitForTimeout(
|
|
512
|
+
const i = document.querySelector(o);
|
|
513
|
+
i && (i.scrollTop = i.scrollHeight);
|
|
514
|
+
}, e), await this.page.waitForTimeout(Y);
|
|
515
515
|
}
|
|
516
516
|
async waitForTableToLoad() {
|
|
517
|
-
await this.page.waitForSelector(
|
|
517
|
+
await this.page.waitForSelector(G, {
|
|
518
518
|
state: "hidden"
|
|
519
519
|
});
|
|
520
520
|
}
|
|
521
521
|
async waitingForTableLoadingToAppear() {
|
|
522
|
-
await this.page.waitForSelector(
|
|
522
|
+
await this.page.waitForSelector(G);
|
|
523
523
|
}
|
|
524
524
|
async expandRow({ testId: t, rowValue: e }) {
|
|
525
|
-
await this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(
|
|
525
|
+
await this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(I, { hasText: e }).locator(N).click();
|
|
526
526
|
}
|
|
527
527
|
isRowExpanded({ testId: t, rowValue: e }) {
|
|
528
|
-
return this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(
|
|
528
|
+
return this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(I, { hasText: e }).locator(N).isVisible();
|
|
529
529
|
}
|
|
530
530
|
async getExpandedRowContent({ testId: t, rowValue: e }) {
|
|
531
531
|
return await this.isRowExpanded({
|
|
532
532
|
testId: t,
|
|
533
533
|
rowValue: e
|
|
534
|
-
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(
|
|
534
|
+
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(I, { hasText: e }).locator(N).textContent();
|
|
535
535
|
}
|
|
536
536
|
isEmptyStateVisible({ testId: t }) {
|
|
537
537
|
return this.page.getByTestId(n(t, l.TABLE)).locator(".empty-state").isVisible();
|
|
@@ -543,15 +543,15 @@ class at {
|
|
|
543
543
|
return this.page.getByTestId(n(t, l.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
544
544
|
}
|
|
545
545
|
async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
|
|
546
|
-
await this.page.getByTestId(n(t, l.TABLE)).locator(
|
|
546
|
+
await this.page.getByTestId(n(t, l.TABLE)).locator(I, {
|
|
547
547
|
hasText: e
|
|
548
|
-
}).locator(
|
|
548
|
+
}).locator($).click();
|
|
549
549
|
}
|
|
550
550
|
getCheckedRowsNumber({ testId: t }) {
|
|
551
|
-
return this.page.getByTestId(n(t, l.TABLE)).locator(
|
|
551
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(I).locator(".icon.checked").count();
|
|
552
552
|
}
|
|
553
553
|
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
554
|
-
await this.page.getByTestId(n(t, l.TABLE)).locator(
|
|
554
|
+
await this.page.getByTestId(n(t, l.TABLE)).locator($).nth(0).click();
|
|
555
555
|
}
|
|
556
556
|
getTableLocator({ testId: t }) {
|
|
557
557
|
return this.page.getByTestId(
|
|
@@ -562,9 +562,9 @@ class at {
|
|
|
562
562
|
return this.getTableLocator({ testId: t }).locator(e).allTextContents();
|
|
563
563
|
}
|
|
564
564
|
}
|
|
565
|
-
class
|
|
565
|
+
class K {
|
|
566
566
|
constructor(t) {
|
|
567
|
-
|
|
567
|
+
c(this, "page");
|
|
568
568
|
this.page = t;
|
|
569
569
|
}
|
|
570
570
|
async waitForComponent({ testId: t }) {
|
|
@@ -584,76 +584,76 @@ class X {
|
|
|
584
584
|
return this.page.getByTestId(t).isDisabled();
|
|
585
585
|
}
|
|
586
586
|
}
|
|
587
|
-
class
|
|
587
|
+
class st {
|
|
588
588
|
constructor(t) {
|
|
589
|
-
|
|
589
|
+
c(this, "page");
|
|
590
590
|
this.page = t;
|
|
591
591
|
}
|
|
592
592
|
async waitForComponent({ testId: t }) {
|
|
593
|
-
const e = `[data-testid='${t}-${
|
|
593
|
+
const e = `[data-testid='${t}-${y.CONTAINER}']`;
|
|
594
594
|
await this.page.waitForSelector(e);
|
|
595
595
|
}
|
|
596
596
|
getSnackbarTitle({ testId: t }) {
|
|
597
|
-
return this.page.getByTestId(n(t,
|
|
597
|
+
return this.page.getByTestId(n(t, y.TITLE)).textContent();
|
|
598
598
|
}
|
|
599
599
|
async closeSnackbar({ testId: t }) {
|
|
600
|
-
await this.page.getByTestId(n(t,
|
|
600
|
+
await this.page.getByTestId(n(t, y.CLOSE)).locator(".icon-name--x").click();
|
|
601
601
|
}
|
|
602
602
|
async waitForSnackbarToBeClosed({ testId: t }) {
|
|
603
|
-
const e = `[data-testid='${t}-${
|
|
603
|
+
const e = `[data-testid='${t}-${y.CONTAINER}']`;
|
|
604
604
|
await this.page.waitForSelector(e, { state: "detached" });
|
|
605
605
|
}
|
|
606
606
|
getSnackbarDescription({ testId: t }) {
|
|
607
|
-
return this.page.getByTestId(n(t,
|
|
607
|
+
return this.page.getByTestId(n(t, y.MESSAGE)).textContent();
|
|
608
608
|
}
|
|
609
609
|
async clickOnActionButton({ testId: t, buttonName: e }) {
|
|
610
610
|
const o = await this.getActionButtonIndex({
|
|
611
611
|
testId: t,
|
|
612
612
|
buttonName: e
|
|
613
|
-
}),
|
|
614
|
-
await this.page.click(
|
|
613
|
+
}), i = `[data-testid='${t}-${y.ACTION_BUTTON}-${o}']`;
|
|
614
|
+
await this.page.click(i);
|
|
615
615
|
}
|
|
616
616
|
async getActionButtonIndex({
|
|
617
617
|
testId: t,
|
|
618
618
|
buttonName: e
|
|
619
619
|
}) {
|
|
620
|
-
return (await this.page.getByTestId(n(t,
|
|
620
|
+
return (await this.page.getByTestId(n(t, y.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
|
|
621
621
|
}
|
|
622
622
|
}
|
|
623
|
-
class
|
|
623
|
+
class rt {
|
|
624
624
|
constructor(t) {
|
|
625
|
-
|
|
625
|
+
c(this, "page");
|
|
626
626
|
this.page = t;
|
|
627
627
|
}
|
|
628
628
|
async waitForComponent({ testId: t }) {
|
|
629
|
-
const e = `[data-testid='${t}-${
|
|
629
|
+
const e = `[data-testid='${t}-${m.WRAPPER}']`;
|
|
630
630
|
await this.page.waitForSelector(e);
|
|
631
631
|
}
|
|
632
632
|
async closeMultiBar({ testId: t }) {
|
|
633
|
-
await this.page.getByTestId(n(t,
|
|
633
|
+
await this.page.getByTestId(n(t, m.CLOSE_BTN)).locator(".icon-wrapper").click();
|
|
634
634
|
}
|
|
635
635
|
getMultiBarCountText({ testId: t }) {
|
|
636
|
-
return this.page.getByTestId(n(t,
|
|
636
|
+
return this.page.getByTestId(n(t, m.WRAPPER)).locator(".count-text").textContent();
|
|
637
637
|
}
|
|
638
638
|
async isMultiBarVisible({ testId: t }) {
|
|
639
|
-
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t,
|
|
639
|
+
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, m.WRAPPER)).locator(".multi-bar-panel").isVisible();
|
|
640
640
|
}
|
|
641
641
|
async clickOnActionButton({ testId: t, actionButtonId: e }) {
|
|
642
642
|
await this.page.getByTestId(
|
|
643
643
|
n(
|
|
644
644
|
t,
|
|
645
|
-
`${
|
|
645
|
+
`${m.ACTION}-${e}`
|
|
646
646
|
)
|
|
647
647
|
).locator(".start-icon").click();
|
|
648
648
|
}
|
|
649
649
|
}
|
|
650
|
-
class
|
|
650
|
+
class ct {
|
|
651
651
|
constructor(t) {
|
|
652
|
-
|
|
652
|
+
c(this, "page");
|
|
653
653
|
this.page = t;
|
|
654
654
|
}
|
|
655
655
|
async waitForComponent({ testId: t }) {
|
|
656
|
-
const e = `[data-testid='${t}-${
|
|
656
|
+
const e = `[data-testid='${t}-${L.TEXT}']`;
|
|
657
657
|
await this.page.waitForSelector(e);
|
|
658
658
|
}
|
|
659
659
|
getFormRowTitle({ testId: t }) {
|
|
@@ -666,89 +666,89 @@ class it {
|
|
|
666
666
|
return new k(this.page).getExtraText({ testId: t });
|
|
667
667
|
}
|
|
668
668
|
}
|
|
669
|
-
class
|
|
669
|
+
class lt {
|
|
670
670
|
constructor(t) {
|
|
671
|
-
|
|
671
|
+
c(this, "page");
|
|
672
672
|
this.page = t;
|
|
673
673
|
}
|
|
674
674
|
async waitForComponent({ testId: t }) {
|
|
675
|
-
const e = `[data-testid='${t}-${
|
|
675
|
+
const e = `[data-testid='${t}-${E.CONTENT}']`;
|
|
676
676
|
await this.page.waitForSelector(e);
|
|
677
677
|
}
|
|
678
678
|
getCardTitle({ testId: t }) {
|
|
679
|
-
return this.page.getByTestId(n(t,
|
|
679
|
+
return this.page.getByTestId(n(t, E.TITLE)).textContent();
|
|
680
680
|
}
|
|
681
681
|
getCardContentText({ testId: t }) {
|
|
682
|
-
return this.page.getByTestId(n(t,
|
|
682
|
+
return this.page.getByTestId(n(t, E.CONTENT)).textContent();
|
|
683
683
|
}
|
|
684
684
|
getCardLabelText({ testId: t }) {
|
|
685
685
|
return new A(this.page).getLabelText({ testId: t });
|
|
686
686
|
}
|
|
687
687
|
async clickOnSaveButton({ testId: t }) {
|
|
688
|
-
await this.page.getByTestId(n(t,
|
|
688
|
+
await this.page.getByTestId(n(t, E.SAVE_BUTTON)).click();
|
|
689
689
|
}
|
|
690
690
|
async clickOnCancelButton({ testId: t }) {
|
|
691
|
-
await this.page.getByTestId(n(t,
|
|
691
|
+
await this.page.getByTestId(n(t, E.CANCEL_BUTTON)).click();
|
|
692
692
|
}
|
|
693
693
|
isSaveButtonLoading({ testId: t }) {
|
|
694
|
-
return new
|
|
694
|
+
return new K(this.page).isButtonLoading({ testId: t });
|
|
695
695
|
}
|
|
696
696
|
async clearForm({
|
|
697
697
|
testId: t,
|
|
698
698
|
inputType: e
|
|
699
699
|
}) {
|
|
700
|
-
(await this.page.getByTestId(n(t,
|
|
700
|
+
(await this.page.getByTestId(n(t, E.CONTENT)).locator(
|
|
701
701
|
`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`
|
|
702
|
-
).all()).forEach((
|
|
702
|
+
).all()).forEach((i) => i.clear());
|
|
703
703
|
}
|
|
704
704
|
}
|
|
705
|
-
class x extends
|
|
705
|
+
class x extends v {
|
|
706
706
|
constructor(t) {
|
|
707
707
|
super(t);
|
|
708
708
|
}
|
|
709
709
|
async waitForComponent({ testId: t }) {
|
|
710
|
-
const e = `[data-testid='${t}-${
|
|
710
|
+
const e = `[data-testid='${t}-${s.WRAPPER}']`;
|
|
711
711
|
await this.page.waitForSelector(e);
|
|
712
712
|
}
|
|
713
713
|
async isViewOnly({ testId: t }) {
|
|
714
|
-
return await this.page.getByTestId(n(t,
|
|
714
|
+
return await this.page.getByTestId(n(t, s.WRAPPER)).locator(".view-only.input-type").count() > 0;
|
|
715
715
|
}
|
|
716
716
|
getLabel({ testId: t }) {
|
|
717
|
-
return this.page.getByTestId(n(t,
|
|
717
|
+
return this.page.getByTestId(n(t, s.LABEL_TEXT)).textContent();
|
|
718
718
|
}
|
|
719
719
|
isInputMandatory({ testId: t }) {
|
|
720
|
-
return this.page.getByTestId(n(t,
|
|
720
|
+
return this.page.getByTestId(n(t, s.MANDATORY)).isVisible();
|
|
721
721
|
}
|
|
722
722
|
hasInputExtraHelpText({ testId: t }) {
|
|
723
|
-
return this.page.getByTestId(n(t,
|
|
723
|
+
return this.page.getByTestId(n(t, s.EXTRA_TEXT)).isVisible();
|
|
724
724
|
}
|
|
725
725
|
async getHelpIconText({ testId: t }) {
|
|
726
|
-
const e = await this.page.getByTestId(n(t,
|
|
726
|
+
const e = await this.page.getByTestId(n(t, s.LABEL_CONTAINER)).locator(".v-popper.v-popper--theme-default");
|
|
727
727
|
return await e.hover(), e.getAttribute("text");
|
|
728
728
|
}
|
|
729
729
|
getInputExtraText({ testId: t }) {
|
|
730
|
-
return this.page.getByTestId(n(t,
|
|
730
|
+
return this.page.getByTestId(n(t, s.EXTRA_TEXT)).textContent();
|
|
731
731
|
}
|
|
732
732
|
getErrorExtraText({ testId: t }) {
|
|
733
|
-
return this.page.getByTestId(n(t,
|
|
733
|
+
return this.page.getByTestId(n(t, s.EXTRA_TEXT)).locator(".error").textContent();
|
|
734
734
|
}
|
|
735
735
|
async showPassword({ testId: t }) {
|
|
736
736
|
await this.isPasswordHidden({ testId: t }) && await this.clickOnPasswordButton({ testId: t });
|
|
737
737
|
}
|
|
738
738
|
async isPasswordHidden({ testId: t }) {
|
|
739
|
-
return await this.page.getByTestId(n(t,
|
|
739
|
+
return await this.page.getByTestId(n(t, s.WRAPPER)).getAttribute("type") === "password";
|
|
740
740
|
}
|
|
741
741
|
async clickOnPasswordButton({ testId: t }) {
|
|
742
|
-
await (await this.page.getByTestId(n(t,
|
|
742
|
+
await (await this.page.getByTestId(n(t, s.WRAPPER)).locator(".password-visibility")).click();
|
|
743
743
|
}
|
|
744
744
|
}
|
|
745
|
-
class
|
|
745
|
+
class pt {
|
|
746
746
|
constructor(t) {
|
|
747
|
-
|
|
747
|
+
c(this, "page");
|
|
748
748
|
this.page = t;
|
|
749
749
|
}
|
|
750
750
|
async waitForComponent({ testId: t }) {
|
|
751
|
-
const e = `[data-testid='${t}-${
|
|
751
|
+
const e = `[data-testid='${t}-${S.CONTAINER}']`;
|
|
752
752
|
await this.page.waitForSelector(e);
|
|
753
753
|
}
|
|
754
754
|
async searchInput({ testId: t, searchTerm: e }) {
|
|
@@ -758,7 +758,7 @@ class rt {
|
|
|
758
758
|
await new x(this.page).clearInput({ testId: t });
|
|
759
759
|
}
|
|
760
760
|
async clickOnXButton({ testId: t }) {
|
|
761
|
-
await this.page.getByTestId(n(t,
|
|
761
|
+
await this.page.getByTestId(n(t, S.CLEAR)).locator(".icon-name--x-circle").click();
|
|
762
762
|
}
|
|
763
763
|
isDisabled({ testId: t }) {
|
|
764
764
|
return new x(this.page).isDisabled({ testId: t });
|
|
@@ -770,33 +770,33 @@ class rt {
|
|
|
770
770
|
return new x(this.page).getInputsFieldText({ testId: t });
|
|
771
771
|
}
|
|
772
772
|
}
|
|
773
|
-
class
|
|
773
|
+
class j {
|
|
774
774
|
constructor(t) {
|
|
775
|
-
|
|
775
|
+
c(this, "page");
|
|
776
776
|
this.page = t;
|
|
777
777
|
}
|
|
778
778
|
async waitForComponent({ testId: t }) {
|
|
779
|
-
const e = `[data-testid='${t}-${
|
|
779
|
+
const e = `[data-testid='${t}-${_.TEXT}']`;
|
|
780
780
|
await this.page.waitForSelector(e);
|
|
781
781
|
}
|
|
782
782
|
getInlineCopyText({ testId: t }) {
|
|
783
|
-
return this.page.getByTestId(`${t}-${
|
|
783
|
+
return this.page.getByTestId(`${t}-${_.TEXT}`).textContent();
|
|
784
784
|
}
|
|
785
785
|
}
|
|
786
|
-
class
|
|
786
|
+
class gt {
|
|
787
787
|
constructor(t) {
|
|
788
|
-
|
|
788
|
+
c(this, "page");
|
|
789
789
|
this.page = t;
|
|
790
790
|
}
|
|
791
791
|
async waitForComponent({ testId: t }) {
|
|
792
|
-
const e = `[data-testid='${t}-${
|
|
792
|
+
const e = `[data-testid='${t}-${O.TITLE}']`;
|
|
793
793
|
await this.page.waitForSelector(e);
|
|
794
794
|
}
|
|
795
795
|
getHeaderTitle({ testId: t }) {
|
|
796
|
-
return this.page.getByTestId(`${t}-${
|
|
796
|
+
return this.page.getByTestId(`${t}-${O.TITLE}`).textContent();
|
|
797
797
|
}
|
|
798
798
|
getInlineCopyText({ testId: t }) {
|
|
799
|
-
return new
|
|
799
|
+
return new j(this.page).getInlineCopyText({
|
|
800
800
|
testId: t
|
|
801
801
|
});
|
|
802
802
|
}
|
|
@@ -804,79 +804,79 @@ class ct {
|
|
|
804
804
|
testId: t,
|
|
805
805
|
iconName: e
|
|
806
806
|
}) {
|
|
807
|
-
return await this.page.getByTestId(`${t}-${
|
|
807
|
+
return await this.page.getByTestId(`${t}-${O.APP_PLATFORM}`).getAttribute("data-platform") === e;
|
|
808
808
|
}
|
|
809
809
|
}
|
|
810
|
-
class
|
|
810
|
+
class Tt {
|
|
811
811
|
constructor(t) {
|
|
812
|
-
|
|
812
|
+
c(this, "page");
|
|
813
813
|
this.page = t;
|
|
814
814
|
}
|
|
815
815
|
async waitForComponent({ testId: t }) {
|
|
816
|
-
const e = `[data-testid='${t}-${
|
|
816
|
+
const e = `[data-testid='${t}-${d.WRAPPER}']`;
|
|
817
817
|
await this.page.waitForSelector(e);
|
|
818
818
|
}
|
|
819
819
|
getAlertText({ testId: t }) {
|
|
820
|
-
return this.page.getByTestId(n(t,
|
|
820
|
+
return this.page.getByTestId(n(t, d.MESSAGE)).textContent();
|
|
821
821
|
}
|
|
822
822
|
getAlertTitle({ testId: t }) {
|
|
823
|
-
return this.page.getByTestId(n(t,
|
|
823
|
+
return this.page.getByTestId(n(t, d.TITLE)).textContent();
|
|
824
824
|
}
|
|
825
825
|
async clickOnActionButton({ testId: t }) {
|
|
826
826
|
await this.page.click(
|
|
827
|
-
n(t,
|
|
827
|
+
n(t, d.ACTION_BUTTON)
|
|
828
828
|
);
|
|
829
829
|
}
|
|
830
830
|
getActionButtonText({ testId: t }) {
|
|
831
|
-
return this.page.getByTestId(n(t,
|
|
831
|
+
return this.page.getByTestId(n(t, d.ACTION_BUTTON)).textContent();
|
|
832
832
|
}
|
|
833
833
|
async closeAlert({ testId: t }) {
|
|
834
|
-
await this.page.getByTestId(n(t,
|
|
834
|
+
await this.page.getByTestId(n(t, d.CLOSE_BUTTON)).click();
|
|
835
835
|
}
|
|
836
836
|
async isAlertVisible({ testId: t }) {
|
|
837
|
-
return await this.page.getByTestId(n(t,
|
|
837
|
+
return await this.page.getByTestId(n(t, d.WRAPPER)).count() > 0;
|
|
838
838
|
}
|
|
839
839
|
getAlertIconType({ testId: t }) {
|
|
840
|
-
return this.page.getByTestId(n(t,
|
|
840
|
+
return this.page.getByTestId(n(t, d.WRAPPER)).getAttribute("class");
|
|
841
841
|
}
|
|
842
842
|
}
|
|
843
|
-
class
|
|
843
|
+
class q {
|
|
844
844
|
constructor(t) {
|
|
845
|
-
|
|
845
|
+
c(this, "page");
|
|
846
846
|
this.page = t;
|
|
847
847
|
}
|
|
848
848
|
async waitForComponent({ testId: t }) {
|
|
849
|
-
const e = `[data-testid='${t}-${
|
|
849
|
+
const e = `[data-testid='${t}-${C.FIELD}']`;
|
|
850
850
|
await this.page.waitForSelector(e);
|
|
851
851
|
}
|
|
852
852
|
async addInput({ testId: t, text: e }) {
|
|
853
|
-
await this.page.getByTestId(n(t,
|
|
853
|
+
await this.page.getByTestId(n(t, C.FIELD)).type(e);
|
|
854
854
|
}
|
|
855
855
|
async clearInput({ testId: t }) {
|
|
856
|
-
await this.page.getByTestId(n(t,
|
|
856
|
+
await this.page.getByTestId(n(t, C.FIELD)).clear();
|
|
857
857
|
}
|
|
858
858
|
getInput({ testId: t }) {
|
|
859
|
-
return this.page.getByTestId(n(t,
|
|
859
|
+
return this.page.getByTestId(n(t, C.FIELD)).inputValue();
|
|
860
860
|
}
|
|
861
861
|
getPlaceholderText({ testId: t }) {
|
|
862
|
-
return this.page.getByTestId(n(t,
|
|
862
|
+
return this.page.getByTestId(n(t, C.FIELD)).getAttribute("placeholder");
|
|
863
863
|
}
|
|
864
864
|
isDisabled({ testId: t }) {
|
|
865
|
-
return this.page.getByTestId(n(t,
|
|
865
|
+
return this.page.getByTestId(n(t, C.FIELD)).isDisabled();
|
|
866
866
|
}
|
|
867
867
|
}
|
|
868
|
-
class
|
|
868
|
+
class ht extends q {
|
|
869
869
|
getLabelText({ testId: t }) {
|
|
870
|
-
return this.page.getByTestId(n(t,
|
|
870
|
+
return this.page.getByTestId(n(t, L.TEXT)).textContent();
|
|
871
871
|
}
|
|
872
872
|
hasFieldHelpText({ testId: t }) {
|
|
873
|
-
return this.page.getByTestId(n(t,
|
|
873
|
+
return this.page.getByTestId(n(t, w.CONTAINER)).isVisible();
|
|
874
874
|
}
|
|
875
875
|
getFieldHelpText({ testId: t }) {
|
|
876
|
-
return this.page.getByTestId(n(t,
|
|
876
|
+
return this.page.getByTestId(n(t, w.CONTAINER)).textContent();
|
|
877
877
|
}
|
|
878
878
|
}
|
|
879
|
-
class
|
|
879
|
+
class dt extends X {
|
|
880
880
|
constructor(t) {
|
|
881
881
|
super(t);
|
|
882
882
|
}
|
|
@@ -899,37 +899,37 @@ class gt extends f {
|
|
|
899
899
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: t, type: e });
|
|
900
900
|
}
|
|
901
901
|
getSelectedLabel({ testId: t }) {
|
|
902
|
-
return this.page.getByTestId(n(t,
|
|
902
|
+
return this.page.getByTestId(n(t, r.BUTTON_CONTENT)).textContent();
|
|
903
903
|
}
|
|
904
904
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
905
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
905
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, s.FIELD)).fill(e), this.page.getByTestId(n(t, r.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
906
906
|
}
|
|
907
907
|
async isErrorText({ testId: t }) {
|
|
908
|
-
return await this.page.getByTestId(n(t,
|
|
908
|
+
return await this.page.getByTestId(n(t, w.TEXT)).count() > 0;
|
|
909
909
|
}
|
|
910
910
|
async isDisabled({ testId: t }) {
|
|
911
|
-
return (await this.page.getByTestId(n(t,
|
|
911
|
+
return (await this.page.getByTestId(n(t, r.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
912
912
|
}
|
|
913
913
|
async clearAllOptions({ testId: t }) {
|
|
914
|
-
await this.page.getByTestId(n(t,
|
|
914
|
+
await this.page.getByTestId(n(t, r.ACTION_CLEAR_ALL)).click();
|
|
915
915
|
}
|
|
916
916
|
isSelectAllChecked({ testId: t }) {
|
|
917
|
-
return this.page.getByTestId(n(t,
|
|
917
|
+
return this.page.getByTestId(n(t, r.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
918
918
|
}
|
|
919
919
|
isSelectAllIndeterminate({ testId: t }) {
|
|
920
|
-
return this.page.getByTestId(n(t,
|
|
920
|
+
return this.page.getByTestId(n(t, r.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
921
921
|
}
|
|
922
922
|
async removeChipSelection({ testId: t }) {
|
|
923
|
-
await this.page.getByTestId(n(t,
|
|
923
|
+
await this.page.getByTestId(n(t, r.BUTTON_CLEAR)).click();
|
|
924
924
|
}
|
|
925
925
|
getDropdownOptions({ testId: t }) {
|
|
926
|
-
return this.page.getByTestId(n(t,
|
|
926
|
+
return this.page.getByTestId(n(t, r.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
927
927
|
}
|
|
928
928
|
async expandTreeNode({
|
|
929
929
|
testId: t,
|
|
930
930
|
nodeName: e
|
|
931
931
|
}) {
|
|
932
|
-
const o = this.page.getByTestId(n(t,
|
|
932
|
+
const o = this.page.getByTestId(n(t, r.LIST_CONTAINER)).locator(`text=${e}`);
|
|
933
933
|
if (await o.isVisible())
|
|
934
934
|
await o.click();
|
|
935
935
|
else
|
|
@@ -941,9 +941,9 @@ class gt extends f {
|
|
|
941
941
|
shouldExpand: o = !1
|
|
942
942
|
}) {
|
|
943
943
|
await this.openDropdownComponent({ testId: t }), o && await this.expandTreeNode({ testId: t, nodeName: e });
|
|
944
|
-
const
|
|
945
|
-
if (await
|
|
946
|
-
await
|
|
944
|
+
const i = this.page.getByTestId(n(t, r.LIST_CONTAINER)).locator(`text=${e}`);
|
|
945
|
+
if (await i.isVisible())
|
|
946
|
+
await i.click();
|
|
947
947
|
else
|
|
948
948
|
throw new Error(`Option with text "${e}" not found in the dropdown.`);
|
|
949
949
|
}
|
|
@@ -961,55 +961,158 @@ class gt extends f {
|
|
|
961
961
|
await this.clickOnApply({ testId: t });
|
|
962
962
|
}
|
|
963
963
|
}
|
|
964
|
-
|
|
964
|
+
const z = ".sortable-item";
|
|
965
|
+
class ut {
|
|
965
966
|
constructor(t) {
|
|
966
|
-
|
|
967
|
+
c(this, "page");
|
|
967
968
|
this.page = t;
|
|
968
969
|
}
|
|
969
970
|
async waitForComponent({ testId: t }) {
|
|
970
|
-
const e = `[data-testid='${t}-${
|
|
971
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
971
972
|
await this.page.waitForSelector(e);
|
|
972
973
|
}
|
|
973
974
|
async isComponentLoaded(t) {
|
|
974
|
-
const e = `[data-testid='${t}-${
|
|
975
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
975
976
|
return this.page.isVisible(e);
|
|
976
977
|
}
|
|
977
978
|
async getItems(t) {
|
|
978
979
|
return this.page.getByTestId(n(t, "sortable-list-item")).allTextContents();
|
|
979
980
|
}
|
|
980
981
|
async sortItem(t, e, o) {
|
|
981
|
-
const
|
|
982
|
+
const i = await this.page.getByTestId(
|
|
982
983
|
n(t, "sortable-list-item")
|
|
983
|
-
),
|
|
984
|
-
await
|
|
984
|
+
), g = i.nth(e), u = i.nth(o);
|
|
985
|
+
await g.dragTo(u);
|
|
985
986
|
}
|
|
986
987
|
async verifyOrder(t, e) {
|
|
987
|
-
return (await this.getItems(t)).every((
|
|
988
|
+
return (await this.getItems(t)).every((i, g) => i === e[g]);
|
|
989
|
+
}
|
|
990
|
+
async getListItemLocator({ testId: t, item: e, modifier: o }) {
|
|
991
|
+
return this.page.getByTestId(n(t, o)).locator(z, {
|
|
992
|
+
hasText: e
|
|
993
|
+
});
|
|
988
994
|
}
|
|
995
|
+
async selectItem({ testId: t, item: e, isLockedItem: o }) {
|
|
996
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
997
|
+
await (await this.getListItemLocator({
|
|
998
|
+
testId: t,
|
|
999
|
+
item: e,
|
|
1000
|
+
modifier: i
|
|
1001
|
+
})).click();
|
|
1002
|
+
}
|
|
1003
|
+
async isItemSelected(t) {
|
|
1004
|
+
return await this.page.locator(".sortable-item--selected", { hasText: t }).count() > 0;
|
|
1005
|
+
}
|
|
1006
|
+
async expandItem({ testId: t, item: e, isLockedItem: o }) {
|
|
1007
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1008
|
+
await (await this.getListItemLocator({
|
|
1009
|
+
testId: t,
|
|
1010
|
+
item: e,
|
|
1011
|
+
modifier: i
|
|
1012
|
+
})).locator(".expand-icon").click();
|
|
1013
|
+
}
|
|
1014
|
+
async selectChildItem({
|
|
1015
|
+
testId: t,
|
|
1016
|
+
item: e,
|
|
1017
|
+
childItem: o,
|
|
1018
|
+
isLockedItem: i
|
|
1019
|
+
}) {
|
|
1020
|
+
await this.expandItem({
|
|
1021
|
+
testId: t,
|
|
1022
|
+
item: e,
|
|
1023
|
+
isLockedItem: i
|
|
1024
|
+
}), await this.page.locator("ul li span", {
|
|
1025
|
+
hasText: o
|
|
1026
|
+
}).click();
|
|
1027
|
+
}
|
|
1028
|
+
async isListOpened({ testId: t, item: e, isLockedItem: o }) {
|
|
1029
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1030
|
+
return await (await this.getListItemLocator({
|
|
1031
|
+
testId: t,
|
|
1032
|
+
item: e,
|
|
1033
|
+
modifier: i
|
|
1034
|
+
})).locator(".child-list ul").count() > 0;
|
|
1035
|
+
}
|
|
1036
|
+
async isChildItemSelected(t) {
|
|
1037
|
+
return await this.page.locator("ul li span", { hasText: t }).count() > 0;
|
|
1038
|
+
}
|
|
1039
|
+
async openItemMenu({ testId: t, item: e, isLockedItem: o }) {
|
|
1040
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST;
|
|
1041
|
+
await (await this.getListItemLocator({
|
|
1042
|
+
testId: t,
|
|
1043
|
+
item: e,
|
|
1044
|
+
modifier: i
|
|
1045
|
+
})).locator(".item__menu button").click();
|
|
1046
|
+
}
|
|
1047
|
+
async selectMenuItem({
|
|
1048
|
+
testId: t,
|
|
1049
|
+
item: e,
|
|
1050
|
+
isLockedItem: o,
|
|
1051
|
+
menuItem: i
|
|
1052
|
+
}) {
|
|
1053
|
+
await this.openItemMenu({
|
|
1054
|
+
testId: t,
|
|
1055
|
+
item: e,
|
|
1056
|
+
isLockedItem: o
|
|
1057
|
+
});
|
|
1058
|
+
const g = this.page.locator(".dropdown-list-wrapper");
|
|
1059
|
+
await g.locator("ul.list li", { hasText: i }).click(), await g.waitFor({ state: "detached" });
|
|
1060
|
+
}
|
|
1061
|
+
async isMenuOpened() {
|
|
1062
|
+
return await this.page.locator(".dropdown-list-wrapper").count() > 0;
|
|
1063
|
+
}
|
|
1064
|
+
async dragAndDrop({ testId: t, item: e, isLockedItem: o }) {
|
|
1065
|
+
const i = o ? T.LOCKED_LIST : T.DRAGGABLE_LIST, u = await (await this.getListItemLocator({
|
|
1066
|
+
testId: t,
|
|
1067
|
+
item: e,
|
|
1068
|
+
modifier: i
|
|
1069
|
+
})).locator(".item.drag-allowed").first().boundingBox();
|
|
1070
|
+
if (u) {
|
|
1071
|
+
const F = u.x, D = u.y;
|
|
1072
|
+
await this.page.mouse.move(F, D), await this.page.mouse.down(), await this.page.mouse.move(F + 20, D - 20), await this.page.mouse.up();
|
|
1073
|
+
}
|
|
1074
|
+
}
|
|
1075
|
+
async getListOrder() {
|
|
1076
|
+
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o, i) => (e[i + 1] = o, e), {});
|
|
1077
|
+
}
|
|
1078
|
+
async searchForItem({ testId: t, searchTerm: e }) {
|
|
1079
|
+
return await this.page.getByTestId(n(t, s.FIELD)).fill(e), this.page.getByTestId(n(t, T.CONTAINER)).locator("ul > li span").first().textContent();
|
|
1080
|
+
}
|
|
1081
|
+
// async verifySearchResultDisplayed({ testId, item }: SortableListItem) {
|
|
1082
|
+
// const sortableListItems = await this.page
|
|
1083
|
+
// .getByTestId(getTestId(testId, SortableListTestIdModifiers.CONTAINER))
|
|
1084
|
+
// .all();
|
|
1085
|
+
// for (const listItem of sortableListItems) {
|
|
1086
|
+
// const isExists = await listItem
|
|
1087
|
+
// .locator('.child-list span', { hasText: item })
|
|
1088
|
+
// .count();
|
|
1089
|
+
// // expect(isExists > 0).toBeTruthy();
|
|
1090
|
+
// }
|
|
1091
|
+
// }
|
|
989
1092
|
}
|
|
990
1093
|
export {
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
|
|
996
|
-
|
|
997
|
-
|
|
998
|
-
|
|
1094
|
+
Tt as AlertComponent,
|
|
1095
|
+
gt as AppHeaderComponent,
|
|
1096
|
+
Q as BannerComponent,
|
|
1097
|
+
K as ButtonComponent,
|
|
1098
|
+
Z as ComponentBasePage,
|
|
1099
|
+
M as DialogComponent,
|
|
1100
|
+
X as DropdownComponent,
|
|
1101
|
+
tt as DropdownComponentV3,
|
|
999
1102
|
k as FieldHelpTextComponent,
|
|
1000
1103
|
A as FieldLabelComponent,
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1104
|
+
lt as FormCardComponent,
|
|
1105
|
+
ct as FormRowComponent,
|
|
1106
|
+
et as IncludeExcludeComponent,
|
|
1107
|
+
j as InlineCopyComponent,
|
|
1108
|
+
at as InputsComponent,
|
|
1109
|
+
rt as MultiBarComponent,
|
|
1110
|
+
pt as SearchComponent,
|
|
1111
|
+
st as SnackbarComponent,
|
|
1112
|
+
ut as SortableListComponent,
|
|
1113
|
+
it as TableComponent,
|
|
1114
|
+
nt as TabsComponent,
|
|
1115
|
+
ht as TextAreaComponent,
|
|
1116
|
+
ot as TooltipComponent,
|
|
1117
|
+
dt as TreeDropdownComponent
|
|
1015
1118
|
};
|