@ironsource/shared-ui-e2e 2.1.8-test.1 → 2.1.9-test.0
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 +324 -208
- package/shared-e2e-commands.umd.cjs +1 -1
- package/tests/components/dropdown/base-dropdown.d.ts +1 -1
- package/tests/components/dropdown/dropdown-v4/consts.d.ts +5 -0
- package/tests/components/dropdown/dropdown-v4/dropdown-component.d.ts +2 -2
- package/tests/components/dropdown/dropdown-v4/dropdown-page.d.ts +1 -1
- package/tests/components/dropdown/dropdown-v4/treedropdown-component.d.ts +61 -0
- package/tests/components/dropdown/dropdown-v4/treedropdown-page.d.ts +13 -0
- package/tests/components/dropdown/types.d.ts +4 -0
- package/tests/components/inputs/inputs-v4/text-area/consts.d.ts +1 -0
- package/tests/components/inputs/inputs-v4/text-area/text-area-page.d.ts +1 -0
- package/tests/components/sortablelist/consts.d.ts +4 -0
- package/tests/components/sortablelist/sortable-list-component.d.ts +12 -0
- package/tests/components/sortablelist/sortable-list-page.d.ts +11 -0
- package/tests/global/utils.d.ts +5 -0
- package/tests/index.d.ts +2 -0
- package/tests/testids/index.d.ts +5 -0
- package/tsconfig.tsbuildinfo +1 -1
package/shared-e2e-commands.js
CHANGED
|
@@ -1,44 +1,44 @@
|
|
|
1
|
-
var
|
|
2
|
-
var
|
|
3
|
-
var
|
|
4
|
-
var
|
|
5
|
-
const
|
|
1
|
+
var W = Object.defineProperty;
|
|
2
|
+
var v = (a, t, e) => t in a ? W(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var r = (a, t, e) => (v(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 || {}), 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_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 || {}), m = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(m || {}), T = /* @__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))(T || {}), g = /* @__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))(g || {}), i = /* @__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))(i || {}), u = /* @__PURE__ */ ((a) => (a.WRAPPER = "ta-wrapper", a.LABEL = "ta-label", a.FIELD = "ta-field", a.TEXT = "ta-text", a))(u || {}), b = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(b || {}), 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 || {}), L = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(L || {}), E = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(E || {}), B = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(B || {}), d = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(d || {}), h = /* @__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))(h || {}), y = /* @__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))(y || {}), R = /* @__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))(R || {}), P = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))(P || {}), w = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(w || {}), _ = /* @__PURE__ */ ((a) => (a.CONTAINER = "sortable-list-container", a.DRAGGABLE_LIST = "sortable-list-draggable-list", a.LOCKED_LIST = "sortable-list-locked-list", a))(_ || {});
|
|
5
|
+
const G = (a, t) => {
|
|
6
6
|
const e = new URLSearchParams(a).toString();
|
|
7
7
|
return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
|
|
8
|
-
},
|
|
8
|
+
}, V = (a, t = {}) => {
|
|
9
9
|
const e = [];
|
|
10
|
-
Object.entries(t).forEach(([
|
|
11
|
-
e.push(`${
|
|
10
|
+
Object.entries(t).forEach(([I, O]) => {
|
|
11
|
+
e.push(`${I}:${O}`);
|
|
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 G(o, "iframe.html");
|
|
19
19
|
}, n = (a, t) => `${a}-${t}`;
|
|
20
|
-
class
|
|
20
|
+
class q {
|
|
21
21
|
constructor(t) {
|
|
22
|
-
|
|
22
|
+
r(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}-${m.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, m.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, m.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
|
+
r(this, "page");
|
|
39
|
+
r(this, "testId");
|
|
40
|
+
r(this, "componentId");
|
|
41
|
+
r(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,93 +47,96 @@ class K {
|
|
|
47
47
|
...t.additionalComponentParams
|
|
48
48
|
};
|
|
49
49
|
await this.page.goto(
|
|
50
|
-
|
|
50
|
+
V(
|
|
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 J {
|
|
58
58
|
constructor(t) {
|
|
59
|
-
|
|
59
|
+
r(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}-${g.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, g.HEADER)).textContent();
|
|
68
68
|
}
|
|
69
69
|
getDialogText({ testId: t }) {
|
|
70
|
-
return this.page.getByTestId(n(t,
|
|
70
|
+
return this.page.getByTestId(n(t, g.CONTENT)).textContent();
|
|
71
71
|
}
|
|
72
72
|
async closeDialog({ testId: t }) {
|
|
73
73
|
await (await this.page.getByTestId(
|
|
74
|
-
n(t,
|
|
74
|
+
n(t, g.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, g.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, g.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, g.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, g.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, g.WRAPPER)
|
|
98
98
|
)).isVisible();
|
|
99
99
|
}
|
|
100
100
|
async waitForDialogToClose(t) {
|
|
101
101
|
await this.page.waitForSelector(
|
|
102
|
-
n(t,
|
|
102
|
+
n(t, g.WRAPPER),
|
|
103
103
|
{ state: "hidden" }
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class D {
|
|
108
108
|
constructor(t) {
|
|
109
|
-
|
|
109
|
+
r(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
|
-
async selectDropdownOptionByIndex({
|
|
118
|
-
|
|
117
|
+
async selectDropdownOptionByIndex({
|
|
118
|
+
testId: t,
|
|
119
|
+
index: e
|
|
120
|
+
}) {
|
|
121
|
+
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li").nth(e).click();
|
|
119
122
|
}
|
|
120
123
|
getDropdownButtonContent(t) {
|
|
121
|
-
return this.page.getByTestId(n(t,
|
|
124
|
+
return this.page.getByTestId(n(t, s.BUTTON_CONTENT)).textContent();
|
|
122
125
|
}
|
|
123
126
|
async openDropdownComponent({ testId: t }) {
|
|
124
|
-
await this.page.getByTestId(n(t,
|
|
127
|
+
await this.page.getByTestId(n(t, s.TRIGGER)).click({ position: { x: 15, y: 15 } });
|
|
125
128
|
}
|
|
126
129
|
async selectDropdownOptionByName({
|
|
127
130
|
testId: t,
|
|
128
131
|
name: e,
|
|
129
132
|
shouldOpen: o = !0
|
|
130
133
|
}) {
|
|
131
|
-
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();
|
|
132
135
|
}
|
|
133
136
|
async selectMultipleItemsByIndex({ testId: t, itemsToSelect: e }) {
|
|
134
137
|
await this.openDropdownComponent({ testId: t });
|
|
135
138
|
for (const o of e)
|
|
136
|
-
await this.page.getByTestId(n(t,
|
|
139
|
+
await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li").nth(o).click();
|
|
137
140
|
}
|
|
138
141
|
async selectMultipleItemsByName({
|
|
139
142
|
testId: t,
|
|
@@ -141,21 +144,21 @@ class F {
|
|
|
141
144
|
}) {
|
|
142
145
|
await this.openDropdownComponent({ testId: t });
|
|
143
146
|
for (const o of e)
|
|
144
|
-
await this.page.getByTestId(n(t,
|
|
147
|
+
await this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span", { hasText: o }).first().click();
|
|
145
148
|
}
|
|
146
149
|
async clickOnApply({ testId: t }) {
|
|
147
|
-
await this.page.getByTestId(n(t,
|
|
150
|
+
await this.page.getByTestId(n(t, s.ACTION_APPLY)).click();
|
|
148
151
|
}
|
|
149
152
|
async clickOnCancel({ testId: t }) {
|
|
150
|
-
await this.page.getByTestId(n(t,
|
|
153
|
+
await this.page.getByTestId(n(t, s.ACTION_CANCEL)).click();
|
|
151
154
|
}
|
|
152
155
|
async isValidationAppear({ testId: t }) {
|
|
153
|
-
return (await this.page.getByTestId(n(t,
|
|
156
|
+
return (await this.page.getByTestId(n(t, s.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error");
|
|
154
157
|
}
|
|
155
158
|
}
|
|
156
|
-
class
|
|
159
|
+
class A {
|
|
157
160
|
constructor(t) {
|
|
158
|
-
|
|
161
|
+
r(this, "page");
|
|
159
162
|
this.page = t;
|
|
160
163
|
}
|
|
161
164
|
getLabelText({ testId: t }) {
|
|
@@ -171,27 +174,27 @@ class I {
|
|
|
171
174
|
return await e.hover(), e.getAttribute("text");
|
|
172
175
|
}
|
|
173
176
|
}
|
|
174
|
-
class
|
|
177
|
+
class k {
|
|
175
178
|
constructor(t) {
|
|
176
|
-
|
|
179
|
+
r(this, "page");
|
|
177
180
|
this.page = t;
|
|
178
181
|
}
|
|
179
182
|
hasExtraText({ testId: t }) {
|
|
180
|
-
return this.page.getByTestId(n(t,
|
|
183
|
+
return this.page.getByTestId(n(t, d.TEXT)).isVisible();
|
|
181
184
|
}
|
|
182
185
|
getExtraText({ testId: t }) {
|
|
183
|
-
return this.page.getByTestId(n(t,
|
|
186
|
+
return this.page.getByTestId(n(t, d.TEXT)).textContent();
|
|
184
187
|
}
|
|
185
188
|
async hasExtraTextIconType({ testId: t, type: e }) {
|
|
186
|
-
return await (await this.page.getByTestId(n(t,
|
|
189
|
+
return await (await this.page.getByTestId(n(t, d.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
|
|
187
190
|
}
|
|
188
191
|
}
|
|
189
|
-
class
|
|
192
|
+
class f extends D {
|
|
190
193
|
constructor(e) {
|
|
191
194
|
super(e);
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
this.fieldLabelComponent = new
|
|
195
|
+
r(this, "fieldLabelComponent");
|
|
196
|
+
r(this, "fieldHelpTextComponent");
|
|
197
|
+
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new k(e);
|
|
195
198
|
}
|
|
196
199
|
getDropdownTitle({ testId: e }) {
|
|
197
200
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -212,116 +215,116 @@ class z extends F {
|
|
|
212
215
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
|
|
213
216
|
}
|
|
214
217
|
getSelectedLabel({ testId: e }) {
|
|
215
|
-
return this.page.getByTestId(n(e,
|
|
218
|
+
return this.page.getByTestId(n(e, s.BUTTON_CONTENT)).textContent();
|
|
216
219
|
}
|
|
217
220
|
async searchForItem({ testId: e, searchTerm: o }) {
|
|
218
|
-
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, i.FIELD)).fill(o), this.page.getByTestId(n(e,
|
|
221
|
+
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, i.FIELD)).fill(o), this.page.getByTestId(n(e, s.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
219
222
|
}
|
|
220
223
|
async isErrorText({ testId: e }) {
|
|
221
|
-
return await this.page.getByTestId(n(e,
|
|
224
|
+
return await this.page.getByTestId(n(e, d.TEXT)).count() > 0;
|
|
222
225
|
}
|
|
223
226
|
async isDisabled({ testId: e }) {
|
|
224
|
-
return (await this.page.getByTestId(n(e,
|
|
227
|
+
return (await this.page.getByTestId(n(e, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
225
228
|
}
|
|
226
229
|
async clearAllOptions({ testId: e }) {
|
|
227
|
-
await this.page.getByTestId(n(e,
|
|
230
|
+
await this.page.getByTestId(n(e, s.ACTION_CLEAR_ALL)).click();
|
|
228
231
|
}
|
|
229
232
|
isSelectAllChecked({ testId: e }) {
|
|
230
|
-
return this.page.getByTestId(n(e,
|
|
233
|
+
return this.page.getByTestId(n(e, s.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
231
234
|
}
|
|
232
235
|
isSelectAllIndeterminate({ testId: e }) {
|
|
233
|
-
return this.page.getByTestId(n(e,
|
|
236
|
+
return this.page.getByTestId(n(e, s.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
234
237
|
}
|
|
235
238
|
async removeChipSelection({ testId: e }) {
|
|
236
|
-
await this.page.getByTestId(n(e,
|
|
239
|
+
await this.page.getByTestId(n(e, s.BUTTON_CLEAR)).click();
|
|
237
240
|
}
|
|
238
241
|
getDropdownOptions({ testId: e }) {
|
|
239
|
-
return this.page.getByTestId(n(e,
|
|
242
|
+
return this.page.getByTestId(n(e, s.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
240
243
|
}
|
|
241
244
|
}
|
|
242
|
-
class
|
|
245
|
+
class Q extends D {
|
|
243
246
|
constructor(t) {
|
|
244
247
|
super(t);
|
|
245
248
|
}
|
|
246
249
|
getDropdownTitle({ testId: t }) {
|
|
247
|
-
return this.page.getByTestId(n(t,
|
|
250
|
+
return this.page.getByTestId(n(t, s.WRAPPER)).locator("label > span").textContent();
|
|
248
251
|
}
|
|
249
252
|
getSelectedItem({ testId: t }) {
|
|
250
|
-
return this.page.getByTestId(n(t,
|
|
253
|
+
return this.page.getByTestId(n(t, s.TRIGGER)).locator("button > span").textContent();
|
|
251
254
|
}
|
|
252
255
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
253
|
-
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, b.FIELD)).fill(e), this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
254
257
|
}
|
|
255
258
|
}
|
|
256
|
-
class
|
|
259
|
+
class Z {
|
|
257
260
|
constructor(t) {
|
|
258
|
-
|
|
261
|
+
r(this, "page");
|
|
259
262
|
this.page = t;
|
|
260
263
|
}
|
|
261
264
|
async waitForComponent({ testId: t }) {
|
|
262
|
-
const e = `[data-testid='${t}-${
|
|
265
|
+
const e = `[data-testid='${t}-${p.TRIGGER}']`;
|
|
263
266
|
await this.page.waitForSelector(e);
|
|
264
267
|
}
|
|
265
268
|
async clickOnApply(t) {
|
|
266
269
|
await this.page.getByTestId(
|
|
267
|
-
n(t,
|
|
270
|
+
n(t, p.ACTION_APPLY)
|
|
268
271
|
).click();
|
|
269
272
|
}
|
|
270
273
|
async clickOnCancel(t) {
|
|
271
274
|
await this.page.getByTestId(
|
|
272
|
-
n(t,
|
|
275
|
+
n(t, p.ACTION_CANCEL)
|
|
273
276
|
).click();
|
|
274
277
|
}
|
|
275
278
|
async openIncludeExcludeComponent(t) {
|
|
276
|
-
await this.page.getByTestId(n(t,
|
|
279
|
+
await this.page.getByTestId(n(t, p.TRIGGER)).click();
|
|
277
280
|
}
|
|
278
281
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
279
|
-
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
282
|
+
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.SEARCH)).locator("input.transparent").fill(e), this.page.getByTestId(n(t, p.LIST)).locator("ul > li .v-popper span").first().textContent();
|
|
280
283
|
}
|
|
281
284
|
async selectItemByName({ testId: t, entityName: e }) {
|
|
282
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
285
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.LIST)).locator("ul > li .v-popper span", { hasText: e }).first().click(), await this.clickOnApply(t);
|
|
283
286
|
}
|
|
284
287
|
async selectItemByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
285
|
-
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
288
|
+
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.LIST)).locator(".include-exclude-list ul > li").nth(e).click(), await this.page.waitForSelector("include-exclude-list-header-loading", {
|
|
286
289
|
state: "hidden"
|
|
287
290
|
}), o && await this.clickOnApply(t);
|
|
288
291
|
}
|
|
289
292
|
async selectMultipleItems({ testId: t, itemsToSelect: e }) {
|
|
290
293
|
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t);
|
|
291
294
|
for (const o of e)
|
|
292
|
-
await this.page.getByTestId(n(t,
|
|
295
|
+
await this.page.getByTestId(n(t, p.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
|
|
293
296
|
}
|
|
294
297
|
async unselectItemByName({ testId: t, entityName: e }) {
|
|
295
298
|
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(
|
|
296
|
-
n(t,
|
|
299
|
+
n(t, p.LIST_SELECTED)
|
|
297
300
|
).locator("ul > li", { hasText: e }).locator(".clear-button").click(), await this.clickOnApply(t);
|
|
298
301
|
}
|
|
299
302
|
async unselectByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
300
303
|
await this.page.getByTestId(
|
|
301
|
-
n(t,
|
|
304
|
+
n(t, p.LIST_SELECTED)
|
|
302
305
|
).locator("ul li button").nth(e).click(), o && await this.clickOnApply(t);
|
|
303
306
|
}
|
|
304
307
|
async getSelectedCounter(t) {
|
|
305
308
|
return await this.page.getByTestId(
|
|
306
|
-
n(t,
|
|
309
|
+
n(t, p.LIST_SELECTED)
|
|
307
310
|
).locator(".include-exclude-selected-header-left span").textContent();
|
|
308
311
|
}
|
|
309
312
|
async clearAll({ testId: t }) {
|
|
310
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
313
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.CLEAR_ALL)).click(), await this.clickOnApply(t);
|
|
311
314
|
}
|
|
312
315
|
getTriggerText({ testId: t }) {
|
|
313
|
-
return this.page.getByTestId(n(t,
|
|
316
|
+
return this.page.getByTestId(n(t, p.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
|
|
314
317
|
}
|
|
315
318
|
getTriggerDescription({ testId: t }) {
|
|
316
|
-
return this.page.getByTestId(n(t,
|
|
319
|
+
return this.page.getByTestId(n(t, p.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
|
|
317
320
|
}
|
|
318
321
|
async selectAll({ testId: t }) {
|
|
319
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
322
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
320
323
|
}
|
|
321
324
|
}
|
|
322
|
-
class
|
|
325
|
+
class H {
|
|
323
326
|
constructor(t) {
|
|
324
|
-
|
|
327
|
+
r(this, "page");
|
|
325
328
|
this.page = t;
|
|
326
329
|
}
|
|
327
330
|
getInputsFieldText({ testId: t }) {
|
|
@@ -343,12 +346,12 @@ class k {
|
|
|
343
346
|
return this.page.getByTestId(n(t, i.FIELD)).isDisabled();
|
|
344
347
|
}
|
|
345
348
|
}
|
|
346
|
-
class
|
|
349
|
+
class M extends H {
|
|
347
350
|
constructor(e) {
|
|
348
351
|
super(e);
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
this.fieldLabelComponent = new
|
|
352
|
+
r(this, "fieldLabelComponent");
|
|
353
|
+
r(this, "fieldHelpTextComponent");
|
|
354
|
+
this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new k(e);
|
|
352
355
|
}
|
|
353
356
|
getInputsLabelText({ testId: e }) {
|
|
354
357
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -413,7 +416,7 @@ class Z extends k {
|
|
|
413
416
|
return (await this.getFontCaptionText({ testId: e }))[0];
|
|
414
417
|
}
|
|
415
418
|
async getFontCaptionText({ testId: e }) {
|
|
416
|
-
return (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".font-caption").textContent()).split("/").map((
|
|
419
|
+
return (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".font-caption").textContent()).split("/").map((c) => parseInt(c.trim(), 10));
|
|
417
420
|
}
|
|
418
421
|
getHelpIconText({ testId: e }) {
|
|
419
422
|
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
@@ -422,9 +425,9 @@ class Z extends k {
|
|
|
422
425
|
return (await this.page.getByTestId(n(e, i.WRAPPER)).getAttribute("class")).includes("variant-error");
|
|
423
426
|
}
|
|
424
427
|
}
|
|
425
|
-
class
|
|
428
|
+
class tt {
|
|
426
429
|
constructor(t) {
|
|
427
|
-
|
|
430
|
+
r(this, "page");
|
|
428
431
|
this.page = t;
|
|
429
432
|
}
|
|
430
433
|
async waitForComponent({ testId: t }) {
|
|
@@ -448,46 +451,46 @@ class M {
|
|
|
448
451
|
return this.page.getByTestId(n(t, `${E.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
|
|
449
452
|
}
|
|
450
453
|
}
|
|
451
|
-
class
|
|
454
|
+
class et {
|
|
452
455
|
constructor(t) {
|
|
453
|
-
|
|
456
|
+
r(this, "page");
|
|
454
457
|
this.page = t;
|
|
455
458
|
}
|
|
456
459
|
async waitForComponent({ testId: t }) {
|
|
457
|
-
const e = `[data-testid='${t}-${
|
|
460
|
+
const e = `[data-testid='${t}-${L.TRIGGER}']`;
|
|
458
461
|
await this.page.waitForSelector(e);
|
|
459
462
|
}
|
|
460
463
|
getTooltipText({ testId: t }) {
|
|
461
|
-
return this.page.getByTestId(`${t}-${
|
|
464
|
+
return this.page.getByTestId(`${t}-${L.TRIGGER}`).getAttribute("text");
|
|
462
465
|
}
|
|
463
466
|
getTooltipHeaderText({ testId: t }) {
|
|
464
|
-
return this.page.getByTestId(`${t}-${
|
|
467
|
+
return this.page.getByTestId(`${t}-${L.TRIGGER}`).getAttribute("header");
|
|
465
468
|
}
|
|
466
469
|
}
|
|
467
|
-
const C = ".table-row",
|
|
468
|
-
class
|
|
470
|
+
const C = ".table-row", N = ".icon-wrapper", F = ".states", S = ".table-head-container", $ = ".table-row.loading", U = 1e3;
|
|
471
|
+
class at {
|
|
469
472
|
constructor(t) {
|
|
470
|
-
|
|
473
|
+
r(this, "page");
|
|
471
474
|
this.page = t;
|
|
472
475
|
}
|
|
473
476
|
async waitForComponent({ testId: t }) {
|
|
474
|
-
const e = `[data-testid='${t}-${
|
|
477
|
+
const e = `[data-testid='${t}-${l.CONTAINER}']`;
|
|
475
478
|
await this.page.waitForSelector(e);
|
|
476
479
|
}
|
|
477
480
|
getTableRowCount({ testId: t }) {
|
|
478
|
-
return this.page.getByTestId(n(t,
|
|
481
|
+
return this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(C).count();
|
|
479
482
|
}
|
|
480
483
|
async getColumnHeaders({ testId: t }) {
|
|
481
|
-
return this.page.getByTestId(n(t,
|
|
484
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(S).allTextContents();
|
|
482
485
|
}
|
|
483
486
|
getTableLabel({ testId: t }) {
|
|
484
|
-
return this.page.getByTestId(n(t,
|
|
487
|
+
return this.page.getByTestId(n(t, l.HEADER)).innerText();
|
|
485
488
|
}
|
|
486
489
|
getTableFooter({ testId: t }) {
|
|
487
|
-
return this.page.getByTestId(n(t,
|
|
490
|
+
return this.page.getByTestId(n(t, l.CONTAINER)).locator(".table-footer").innerText();
|
|
488
491
|
}
|
|
489
492
|
async clickOnHeaderByName(t) {
|
|
490
|
-
await this.page.locator(
|
|
493
|
+
await this.page.locator(S, {
|
|
491
494
|
hasText: t
|
|
492
495
|
}).click();
|
|
493
496
|
}
|
|
@@ -498,70 +501,70 @@ class et {
|
|
|
498
501
|
await this.page.getByTestId(n(t, i.FIELD)).clear(), await this.waitForTableToLoad();
|
|
499
502
|
}
|
|
500
503
|
isArrowVisible({ testId: t, headerName: e }) {
|
|
501
|
-
return this.page.getByTestId(n(t,
|
|
504
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(S, { hasText: e }).locator(".table-sort-icon").isVisible();
|
|
502
505
|
}
|
|
503
506
|
async scrollDownTableRows({ testId: t }) {
|
|
504
507
|
const e = `[data-testid=${n(
|
|
505
508
|
t,
|
|
506
|
-
|
|
509
|
+
l.TABLE
|
|
507
510
|
)}]`;
|
|
508
511
|
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
509
|
-
const
|
|
510
|
-
|
|
511
|
-
}, e), await this.page.waitForTimeout(
|
|
512
|
+
const c = document.querySelector(o);
|
|
513
|
+
c && (c.scrollTop = c.scrollHeight);
|
|
514
|
+
}, e), await this.page.waitForTimeout(U);
|
|
512
515
|
}
|
|
513
516
|
async waitForTableToLoad() {
|
|
514
|
-
await this.page.waitForSelector(
|
|
517
|
+
await this.page.waitForSelector($, {
|
|
515
518
|
state: "hidden"
|
|
516
519
|
});
|
|
517
520
|
}
|
|
518
521
|
async waitingForTableLoadingToAppear() {
|
|
519
|
-
await this.page.waitForSelector(
|
|
522
|
+
await this.page.waitForSelector($);
|
|
520
523
|
}
|
|
521
524
|
async expandRow({ testId: t, rowValue: e }) {
|
|
522
|
-
await this.page.getByTestId(n(t,
|
|
525
|
+
await this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(C, { hasText: e }).locator(N).click();
|
|
523
526
|
}
|
|
524
527
|
isRowExpanded({ testId: t, rowValue: e }) {
|
|
525
|
-
return this.page.getByTestId(n(t,
|
|
528
|
+
return this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(C, { hasText: e }).locator(N).isVisible();
|
|
526
529
|
}
|
|
527
530
|
async getExpandedRowContent({ testId: t, rowValue: e }) {
|
|
528
531
|
return await this.isRowExpanded({
|
|
529
532
|
testId: t,
|
|
530
533
|
rowValue: e
|
|
531
|
-
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t,
|
|
534
|
+
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, l.BODY_WRAPPER)).locator(C, { hasText: e }).locator(N).textContent();
|
|
532
535
|
}
|
|
533
536
|
isEmptyStateVisible({ testId: t }) {
|
|
534
|
-
return this.page.getByTestId(n(t,
|
|
537
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(".empty-state").isVisible();
|
|
535
538
|
}
|
|
536
539
|
getEmptyStateTitle({ testId: t }) {
|
|
537
|
-
return this.page.getByTestId(n(t,
|
|
540
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(".font-heading-4.title").textContent();
|
|
538
541
|
}
|
|
539
542
|
getEmptyStateSubtitle({ testId: t }) {
|
|
540
|
-
return this.page.getByTestId(n(t,
|
|
543
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
541
544
|
}
|
|
542
545
|
async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
|
|
543
|
-
await this.page.getByTestId(n(t,
|
|
546
|
+
await this.page.getByTestId(n(t, l.TABLE)).locator(C, {
|
|
544
547
|
hasText: e
|
|
545
|
-
}).locator(
|
|
548
|
+
}).locator(F).click();
|
|
546
549
|
}
|
|
547
550
|
getCheckedRowsNumber({ testId: t }) {
|
|
548
|
-
return this.page.getByTestId(n(t,
|
|
551
|
+
return this.page.getByTestId(n(t, l.TABLE)).locator(C).locator(".icon.checked").count();
|
|
549
552
|
}
|
|
550
553
|
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
551
|
-
await this.page.getByTestId(n(t,
|
|
554
|
+
await this.page.getByTestId(n(t, l.TABLE)).locator(F).nth(0).click();
|
|
552
555
|
}
|
|
553
556
|
getTableLocator({ testId: t }) {
|
|
554
557
|
return this.page.getByTestId(
|
|
555
|
-
n(t,
|
|
558
|
+
n(t, l.CONTAINER)
|
|
556
559
|
);
|
|
557
560
|
}
|
|
558
561
|
getColumnContentByHeaderName({ testId: t, headerName: e }) {
|
|
559
562
|
return this.getTableLocator({ testId: t }).locator(e).allTextContents();
|
|
560
563
|
}
|
|
561
564
|
}
|
|
562
|
-
class
|
|
565
|
+
class X {
|
|
563
566
|
constructor(t) {
|
|
564
|
-
|
|
567
|
+
r(this, "page");
|
|
565
568
|
this.page = t;
|
|
566
569
|
}
|
|
567
570
|
async waitForComponent({ testId: t }) {
|
|
@@ -581,45 +584,45 @@ class U {
|
|
|
581
584
|
return this.page.getByTestId(t).isDisabled();
|
|
582
585
|
}
|
|
583
586
|
}
|
|
584
|
-
class
|
|
587
|
+
class nt {
|
|
585
588
|
constructor(t) {
|
|
586
|
-
|
|
589
|
+
r(this, "page");
|
|
587
590
|
this.page = t;
|
|
588
591
|
}
|
|
589
592
|
async waitForComponent({ testId: t }) {
|
|
590
|
-
const e = `[data-testid='${t}-${
|
|
593
|
+
const e = `[data-testid='${t}-${h.CONTAINER}']`;
|
|
591
594
|
await this.page.waitForSelector(e);
|
|
592
595
|
}
|
|
593
596
|
getSnackbarTitle({ testId: t }) {
|
|
594
|
-
return this.page.getByTestId(n(t,
|
|
597
|
+
return this.page.getByTestId(n(t, h.TITLE)).textContent();
|
|
595
598
|
}
|
|
596
599
|
async closeSnackbar({ testId: t }) {
|
|
597
|
-
await this.page.getByTestId(n(t,
|
|
600
|
+
await this.page.getByTestId(n(t, h.CLOSE)).locator(".icon-name--x").click();
|
|
598
601
|
}
|
|
599
602
|
async waitForSnackbarToBeClosed({ testId: t }) {
|
|
600
|
-
const e = `[data-testid='${t}-${
|
|
603
|
+
const e = `[data-testid='${t}-${h.CONTAINER}']`;
|
|
601
604
|
await this.page.waitForSelector(e, { state: "detached" });
|
|
602
605
|
}
|
|
603
606
|
getSnackbarDescription({ testId: t }) {
|
|
604
|
-
return this.page.getByTestId(n(t,
|
|
607
|
+
return this.page.getByTestId(n(t, h.MESSAGE)).textContent();
|
|
605
608
|
}
|
|
606
609
|
async clickOnActionButton({ testId: t, buttonName: e }) {
|
|
607
610
|
const o = await this.getActionButtonIndex({
|
|
608
611
|
testId: t,
|
|
609
612
|
buttonName: e
|
|
610
|
-
}),
|
|
611
|
-
await this.page.click(
|
|
613
|
+
}), c = `[data-testid='${t}-${h.ACTION_BUTTON}-${o}']`;
|
|
614
|
+
await this.page.click(c);
|
|
612
615
|
}
|
|
613
616
|
async getActionButtonIndex({
|
|
614
617
|
testId: t,
|
|
615
618
|
buttonName: e
|
|
616
619
|
}) {
|
|
617
|
-
return (await this.page.getByTestId(n(t,
|
|
620
|
+
return (await this.page.getByTestId(n(t, h.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
|
|
618
621
|
}
|
|
619
622
|
}
|
|
620
|
-
class
|
|
623
|
+
class ot {
|
|
621
624
|
constructor(t) {
|
|
622
|
-
|
|
625
|
+
r(this, "page");
|
|
623
626
|
this.page = t;
|
|
624
627
|
}
|
|
625
628
|
async waitForComponent({ testId: t }) {
|
|
@@ -644,9 +647,9 @@ class nt {
|
|
|
644
647
|
).locator(".start-icon").click();
|
|
645
648
|
}
|
|
646
649
|
}
|
|
647
|
-
class
|
|
650
|
+
class it {
|
|
648
651
|
constructor(t) {
|
|
649
|
-
|
|
652
|
+
r(this, "page");
|
|
650
653
|
this.page = t;
|
|
651
654
|
}
|
|
652
655
|
async waitForComponent({ testId: t }) {
|
|
@@ -654,52 +657,52 @@ class ot {
|
|
|
654
657
|
await this.page.waitForSelector(e);
|
|
655
658
|
}
|
|
656
659
|
getFormRowTitle({ testId: t }) {
|
|
657
|
-
return new
|
|
660
|
+
return new A(this.page).getLabelText({ testId: t });
|
|
658
661
|
}
|
|
659
662
|
isFormRowMandatory({ testId: t }) {
|
|
660
|
-
return new
|
|
663
|
+
return new A(this.page).isMandatory({ testId: t });
|
|
661
664
|
}
|
|
662
665
|
getIconText({ testId: t }) {
|
|
663
|
-
return new
|
|
666
|
+
return new k(this.page).getExtraText({ testId: t });
|
|
664
667
|
}
|
|
665
668
|
}
|
|
666
|
-
class
|
|
669
|
+
class st {
|
|
667
670
|
constructor(t) {
|
|
668
|
-
|
|
671
|
+
r(this, "page");
|
|
669
672
|
this.page = t;
|
|
670
673
|
}
|
|
671
674
|
async waitForComponent({ testId: t }) {
|
|
672
|
-
const e = `[data-testid='${t}-${
|
|
675
|
+
const e = `[data-testid='${t}-${y.CONTENT}']`;
|
|
673
676
|
await this.page.waitForSelector(e);
|
|
674
677
|
}
|
|
675
678
|
getCardTitle({ testId: t }) {
|
|
676
|
-
return this.page.getByTestId(n(t,
|
|
679
|
+
return this.page.getByTestId(n(t, y.TITLE)).textContent();
|
|
677
680
|
}
|
|
678
681
|
getCardContentText({ testId: t }) {
|
|
679
|
-
return this.page.getByTestId(n(t,
|
|
682
|
+
return this.page.getByTestId(n(t, y.CONTENT)).textContent();
|
|
680
683
|
}
|
|
681
684
|
getCardLabelText({ testId: t }) {
|
|
682
|
-
return new
|
|
685
|
+
return new A(this.page).getLabelText({ testId: t });
|
|
683
686
|
}
|
|
684
687
|
async clickOnSaveButton({ testId: t }) {
|
|
685
|
-
await this.page.getByTestId(n(t,
|
|
688
|
+
await this.page.getByTestId(n(t, y.SAVE_BUTTON)).click();
|
|
686
689
|
}
|
|
687
690
|
async clickOnCancelButton({ testId: t }) {
|
|
688
|
-
await this.page.getByTestId(n(t,
|
|
691
|
+
await this.page.getByTestId(n(t, y.CANCEL_BUTTON)).click();
|
|
689
692
|
}
|
|
690
693
|
isSaveButtonLoading({ testId: t }) {
|
|
691
|
-
return new
|
|
694
|
+
return new X(this.page).isButtonLoading({ testId: t });
|
|
692
695
|
}
|
|
693
696
|
async clearForm({
|
|
694
697
|
testId: t,
|
|
695
698
|
inputType: e
|
|
696
699
|
}) {
|
|
697
|
-
(await this.page.getByTestId(n(t,
|
|
700
|
+
(await this.page.getByTestId(n(t, y.CONTENT)).locator(
|
|
698
701
|
`[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`
|
|
699
|
-
).all()).forEach((
|
|
702
|
+
).all()).forEach((c) => c.clear());
|
|
700
703
|
}
|
|
701
704
|
}
|
|
702
|
-
class
|
|
705
|
+
class x extends H {
|
|
703
706
|
constructor(t) {
|
|
704
707
|
super(t);
|
|
705
708
|
}
|
|
@@ -739,37 +742,37 @@ class A extends k {
|
|
|
739
742
|
await (await this.page.getByTestId(n(t, i.WRAPPER)).locator(".password-visibility")).click();
|
|
740
743
|
}
|
|
741
744
|
}
|
|
742
|
-
class
|
|
745
|
+
class rt {
|
|
743
746
|
constructor(t) {
|
|
744
|
-
|
|
747
|
+
r(this, "page");
|
|
745
748
|
this.page = t;
|
|
746
749
|
}
|
|
747
750
|
async waitForComponent({ testId: t }) {
|
|
748
|
-
const e = `[data-testid='${t}-${
|
|
751
|
+
const e = `[data-testid='${t}-${b.CONTAINER}']`;
|
|
749
752
|
await this.page.waitForSelector(e);
|
|
750
753
|
}
|
|
751
754
|
async searchInput({ testId: t, searchTerm: e }) {
|
|
752
|
-
await new
|
|
755
|
+
await new x(this.page).addInput({ testId: t, text: e });
|
|
753
756
|
}
|
|
754
757
|
async clearInput({ testId: t }) {
|
|
755
|
-
await new
|
|
758
|
+
await new x(this.page).clearInput({ testId: t });
|
|
756
759
|
}
|
|
757
760
|
async clickOnXButton({ testId: t }) {
|
|
758
|
-
await this.page.getByTestId(n(t,
|
|
761
|
+
await this.page.getByTestId(n(t, b.CLEAR)).locator(".icon-name--x-circle").click();
|
|
759
762
|
}
|
|
760
763
|
isDisabled({ testId: t }) {
|
|
761
|
-
return new
|
|
764
|
+
return new x(this.page).isDisabled({ testId: t });
|
|
762
765
|
}
|
|
763
766
|
getSearchPlaceholder({ testId: t }) {
|
|
764
|
-
return new
|
|
767
|
+
return new x(this.page).getPlaceholderText({ testId: t });
|
|
765
768
|
}
|
|
766
769
|
getSearchInputValue({ testId: t }) {
|
|
767
|
-
return new
|
|
770
|
+
return new x(this.page).getInputsFieldText({ testId: t });
|
|
768
771
|
}
|
|
769
772
|
}
|
|
770
|
-
class
|
|
773
|
+
class Y {
|
|
771
774
|
constructor(t) {
|
|
772
|
-
|
|
775
|
+
r(this, "page");
|
|
773
776
|
this.page = t;
|
|
774
777
|
}
|
|
775
778
|
async waitForComponent({ testId: t }) {
|
|
@@ -782,18 +785,18 @@ class X {
|
|
|
782
785
|
}
|
|
783
786
|
class ct {
|
|
784
787
|
constructor(t) {
|
|
785
|
-
|
|
788
|
+
r(this, "page");
|
|
786
789
|
this.page = t;
|
|
787
790
|
}
|
|
788
791
|
async waitForComponent({ testId: t }) {
|
|
789
|
-
const e = `[data-testid='${t}-${
|
|
792
|
+
const e = `[data-testid='${t}-${R.TITLE}']`;
|
|
790
793
|
await this.page.waitForSelector(e);
|
|
791
794
|
}
|
|
792
795
|
getHeaderTitle({ testId: t }) {
|
|
793
|
-
return this.page.getByTestId(`${t}-${
|
|
796
|
+
return this.page.getByTestId(`${t}-${R.TITLE}`).textContent();
|
|
794
797
|
}
|
|
795
798
|
getInlineCopyText({ testId: t }) {
|
|
796
|
-
return new
|
|
799
|
+
return new Y(this.page).getInlineCopyText({
|
|
797
800
|
testId: t
|
|
798
801
|
});
|
|
799
802
|
}
|
|
@@ -801,12 +804,12 @@ class ct {
|
|
|
801
804
|
testId: t,
|
|
802
805
|
iconName: e
|
|
803
806
|
}) {
|
|
804
|
-
return await this.page.getByTestId(`${t}-${
|
|
807
|
+
return await this.page.getByTestId(`${t}-${R.APP_PLATFORM}`).getAttribute("data-platform") === e;
|
|
805
808
|
}
|
|
806
809
|
}
|
|
807
|
-
class
|
|
810
|
+
class lt {
|
|
808
811
|
constructor(t) {
|
|
809
|
-
|
|
812
|
+
r(this, "page");
|
|
810
813
|
this.page = t;
|
|
811
814
|
}
|
|
812
815
|
async waitForComponent({ testId: t }) {
|
|
@@ -837,63 +840,176 @@ class rt {
|
|
|
837
840
|
return this.page.getByTestId(n(t, T.WRAPPER)).getAttribute("class");
|
|
838
841
|
}
|
|
839
842
|
}
|
|
840
|
-
class
|
|
843
|
+
class K {
|
|
841
844
|
constructor(t) {
|
|
842
|
-
|
|
845
|
+
r(this, "page");
|
|
843
846
|
this.page = t;
|
|
844
847
|
}
|
|
845
848
|
async waitForComponent({ testId: t }) {
|
|
846
|
-
const e = `[data-testid='${t}-${
|
|
849
|
+
const e = `[data-testid='${t}-${u.FIELD}']`;
|
|
847
850
|
await this.page.waitForSelector(e);
|
|
848
851
|
}
|
|
849
852
|
async addInput({ testId: t, text: e }) {
|
|
850
|
-
await this.page.getByTestId(n(t,
|
|
853
|
+
await this.page.getByTestId(n(t, u.FIELD)).type(e);
|
|
851
854
|
}
|
|
852
855
|
async clearInput({ testId: t }) {
|
|
853
|
-
await this.page.getByTestId(n(t,
|
|
856
|
+
await this.page.getByTestId(n(t, u.FIELD)).clear();
|
|
854
857
|
}
|
|
855
858
|
getInput({ testId: t }) {
|
|
856
|
-
return this.page.getByTestId(n(t,
|
|
859
|
+
return this.page.getByTestId(n(t, u.FIELD)).inputValue();
|
|
857
860
|
}
|
|
858
861
|
getPlaceholderText({ testId: t }) {
|
|
859
|
-
return this.page.getByTestId(n(t,
|
|
862
|
+
return this.page.getByTestId(n(t, u.FIELD)).getAttribute("placeholder");
|
|
860
863
|
}
|
|
861
864
|
isDisabled({ testId: t }) {
|
|
862
|
-
return this.page.getByTestId(n(t,
|
|
865
|
+
return this.page.getByTestId(n(t, u.FIELD)).isDisabled();
|
|
863
866
|
}
|
|
864
867
|
}
|
|
865
|
-
class
|
|
868
|
+
class pt extends K {
|
|
866
869
|
getLabelText({ testId: t }) {
|
|
867
870
|
return this.page.getByTestId(n(t, B.TEXT)).textContent();
|
|
868
871
|
}
|
|
869
872
|
hasFieldHelpText({ testId: t }) {
|
|
870
|
-
return this.page.getByTestId(n(t,
|
|
873
|
+
return this.page.getByTestId(n(t, d.CONTAINER)).isVisible();
|
|
871
874
|
}
|
|
872
875
|
getFieldHelpText({ testId: t }) {
|
|
873
|
-
return this.page.getByTestId(n(t,
|
|
876
|
+
return this.page.getByTestId(n(t, d.CONTAINER)).textContent();
|
|
877
|
+
}
|
|
878
|
+
}
|
|
879
|
+
class gt extends f {
|
|
880
|
+
constructor(t) {
|
|
881
|
+
super(t);
|
|
882
|
+
}
|
|
883
|
+
getDropdownTitle({ testId: t }) {
|
|
884
|
+
return this.fieldLabelComponent.getLabelText({ testId: t });
|
|
885
|
+
}
|
|
886
|
+
isMandatory({ testId: t }) {
|
|
887
|
+
return this.fieldLabelComponent.isMandatory({ testId: t });
|
|
888
|
+
}
|
|
889
|
+
getHelpIconText({ testId: t }) {
|
|
890
|
+
return this.fieldLabelComponent.getHelpIconText({ testId: t });
|
|
891
|
+
}
|
|
892
|
+
hasExtraText({ testId: t }) {
|
|
893
|
+
return this.fieldHelpTextComponent.hasExtraText({ testId: t });
|
|
894
|
+
}
|
|
895
|
+
getExtraText({ testId: t }) {
|
|
896
|
+
return this.fieldHelpTextComponent.getExtraText({ testId: t });
|
|
897
|
+
}
|
|
898
|
+
hasExtraTextIconType({ testId: t, type: e }) {
|
|
899
|
+
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: t, type: e });
|
|
900
|
+
}
|
|
901
|
+
getSelectedLabel({ testId: t }) {
|
|
902
|
+
return this.page.getByTestId(n(t, s.BUTTON_CONTENT)).textContent();
|
|
903
|
+
}
|
|
904
|
+
async searchForItem({ testId: t, searchTerm: e }) {
|
|
905
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, i.FIELD)).fill(e), this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
906
|
+
}
|
|
907
|
+
async isErrorText({ testId: t }) {
|
|
908
|
+
return await this.page.getByTestId(n(t, d.TEXT)).count() > 0;
|
|
909
|
+
}
|
|
910
|
+
async isDisabled({ testId: t }) {
|
|
911
|
+
return (await this.page.getByTestId(n(t, s.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
912
|
+
}
|
|
913
|
+
async clearAllOptions({ testId: t }) {
|
|
914
|
+
await this.page.getByTestId(n(t, s.ACTION_CLEAR_ALL)).click();
|
|
915
|
+
}
|
|
916
|
+
isSelectAllChecked({ testId: t }) {
|
|
917
|
+
return this.page.getByTestId(n(t, s.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
918
|
+
}
|
|
919
|
+
isSelectAllIndeterminate({ testId: t }) {
|
|
920
|
+
return this.page.getByTestId(n(t, s.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
921
|
+
}
|
|
922
|
+
async removeChipSelection({ testId: t }) {
|
|
923
|
+
await this.page.getByTestId(n(t, s.BUTTON_CLEAR)).click();
|
|
924
|
+
}
|
|
925
|
+
getDropdownOptions({ testId: t }) {
|
|
926
|
+
return this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
927
|
+
}
|
|
928
|
+
async expandTreeNode({
|
|
929
|
+
testId: t,
|
|
930
|
+
nodeName: e
|
|
931
|
+
}) {
|
|
932
|
+
const o = this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(`text=${e}`);
|
|
933
|
+
if (await o.isVisible())
|
|
934
|
+
await o.click();
|
|
935
|
+
else
|
|
936
|
+
throw new Error(`Node with text "${e}" not found.`);
|
|
937
|
+
}
|
|
938
|
+
async selectTreeDropdownOptionByName({
|
|
939
|
+
testId: t,
|
|
940
|
+
name: e,
|
|
941
|
+
shouldExpand: o = !1
|
|
942
|
+
}) {
|
|
943
|
+
await this.openDropdownComponent({ testId: t }), o && await this.expandTreeNode({ testId: t, nodeName: e });
|
|
944
|
+
const c = this.page.getByTestId(n(t, s.LIST_CONTAINER)).locator(`text=${e}`);
|
|
945
|
+
if (await c.isVisible())
|
|
946
|
+
await c.click();
|
|
947
|
+
else
|
|
948
|
+
throw new Error(`Option with text "${e}" not found in the dropdown.`);
|
|
949
|
+
}
|
|
950
|
+
async selectMultipleTreeItemsByName({
|
|
951
|
+
testId: t,
|
|
952
|
+
itemsToSelect: e
|
|
953
|
+
}) {
|
|
954
|
+
await this.openDropdownComponent({ testId: t });
|
|
955
|
+
for (const o of e)
|
|
956
|
+
await this.selectTreeDropdownOptionByName({
|
|
957
|
+
testId: t,
|
|
958
|
+
name: o,
|
|
959
|
+
shouldExpand: !0
|
|
960
|
+
});
|
|
961
|
+
await this.clickOnApply({ testId: t });
|
|
962
|
+
}
|
|
963
|
+
}
|
|
964
|
+
class Tt {
|
|
965
|
+
constructor(t) {
|
|
966
|
+
r(this, "page");
|
|
967
|
+
this.page = t;
|
|
968
|
+
}
|
|
969
|
+
async waitForComponent({ testId: t }) {
|
|
970
|
+
const e = `[data-testid='${t}-${_.CONTAINER}']`;
|
|
971
|
+
await this.page.waitForSelector(e);
|
|
972
|
+
}
|
|
973
|
+
async isComponentLoaded(t) {
|
|
974
|
+
const e = `[data-testid='${t}-${_.CONTAINER}']`;
|
|
975
|
+
return this.page.isVisible(e);
|
|
976
|
+
}
|
|
977
|
+
async getItems(t) {
|
|
978
|
+
return this.page.getByTestId(n(t, "sortable-list-item")).allTextContents();
|
|
979
|
+
}
|
|
980
|
+
async sortItem(t, e, o) {
|
|
981
|
+
const c = await this.page.getByTestId(
|
|
982
|
+
n(t, "sortable-list-item")
|
|
983
|
+
), I = c.nth(e), O = c.nth(o);
|
|
984
|
+
await I.dragTo(O);
|
|
985
|
+
}
|
|
986
|
+
async verifyOrder(t, e) {
|
|
987
|
+
return (await this.getItems(t)).every((c, I) => c === e[I]);
|
|
874
988
|
}
|
|
875
989
|
}
|
|
876
990
|
export {
|
|
877
|
-
|
|
991
|
+
lt as AlertComponent,
|
|
878
992
|
ct as AppHeaderComponent,
|
|
879
|
-
|
|
880
|
-
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
993
|
+
q as BannerComponent,
|
|
994
|
+
X as ButtonComponent,
|
|
995
|
+
z as ComponentBasePage,
|
|
996
|
+
J as DialogComponent,
|
|
997
|
+
f as DropdownComponent,
|
|
998
|
+
Q as DropdownComponentV3,
|
|
999
|
+
k as FieldHelpTextComponent,
|
|
1000
|
+
A as FieldLabelComponent,
|
|
1001
|
+
st as FormCardComponent,
|
|
1002
|
+
it as FormRowComponent,
|
|
1003
|
+
Z as IncludeExcludeComponent,
|
|
1004
|
+
Y as InlineCopyComponent,
|
|
1005
|
+
M as InputsComponent,
|
|
1006
|
+
ot as MultiBarComponent,
|
|
1007
|
+
rt as SearchComponent,
|
|
1008
|
+
nt as SnackbarComponent,
|
|
1009
|
+
Tt as SortableListComponent,
|
|
1010
|
+
at as TableComponent,
|
|
1011
|
+
tt as TabsComponent,
|
|
1012
|
+
pt as TextAreaComponent,
|
|
1013
|
+
et as TooltipComponent,
|
|
1014
|
+
gt as TreeDropdownComponent
|
|
899
1015
|
};
|