@ironsource/shared-ui-e2e 2.1.3-rc.11 → 2.1.3-rc.13
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 +233 -309
- package/shared-e2e-commands.umd.cjs +1 -2
- package/tests/components/dropdown/dropdown-v4/dropdown-component.d.ts +3 -0
- package/tests/components/dropdown/dropdown-v4/dropdown-page.d.ts +1 -0
- package/tests/components/search/search-component.d.ts +2 -5
- package/tests/components/table/table-component.d.ts +11 -21
- package/tests/components/table/table-page.d.ts +4 -16
- package/tests/components/table/types.d.ts +0 -5
- package/tests/global/types.d.ts +4 -0
- package/tests/index.d.ts +6 -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 $ = Object.defineProperty;
|
|
2
|
+
var D = (a, t, e) => t in a ? $(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var s = (a, t, e) => (D(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
var l = /* @__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))(l || {}), c = /* @__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))(c || {}), w = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(w || {}), p = /* @__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))(p || {}), 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 || {}), I = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(I || {}), r = /* @__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))(r || {}), B = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(B || {}), u = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(u || {}), E = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(E || {}), A = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(A || {}), T = /* @__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))(T || {}), d = /* @__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))(d || {}), x = /* @__PURE__ */ ((a) => (a.TITLE = "ah-title", a.APP_KEY = "ah-app-key", a.APP_PLATFORM = "ah-app-platform", a))(x || {}), b = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))(b || {}), y = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(y || {});
|
|
5
|
+
const H = (a, t) => {
|
|
6
6
|
const e = new URLSearchParams(a).toString();
|
|
7
7
|
return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
|
|
8
|
-
},
|
|
8
|
+
}, W = (a, t = {}) => {
|
|
9
9
|
const e = [];
|
|
10
|
-
Object.entries(t).forEach(([
|
|
11
|
-
e.push(`${
|
|
10
|
+
Object.entries(t).forEach(([k, F]) => {
|
|
11
|
+
e.push(`${k}:${F}`);
|
|
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 H(o, "iframe.html");
|
|
19
19
|
}, n = (a, t) => `${a}-${t}`;
|
|
20
|
-
class
|
|
20
|
+
class X {
|
|
21
21
|
constructor(t) {
|
|
22
|
-
|
|
22
|
+
s(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}-${w.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, w.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, w.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
|
-
class
|
|
36
|
+
class U {
|
|
37
37
|
constructor(t) {
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
38
|
+
s(this, "page");
|
|
39
|
+
s(this, "testId");
|
|
40
|
+
s(this, "componentId");
|
|
41
|
+
s(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,80 +47,80 @@ class D {
|
|
|
47
47
|
...t.additionalComponentParams
|
|
48
48
|
};
|
|
49
49
|
await this.page.goto(
|
|
50
|
-
|
|
50
|
+
W(
|
|
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 f {
|
|
58
58
|
constructor(t) {
|
|
59
|
-
|
|
59
|
+
s(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}-${p.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, p.HEADER)).locator(".font-heading-3").textContent();
|
|
68
68
|
}
|
|
69
69
|
getDialogText({ testId: t }) {
|
|
70
|
-
return this.page.getByTestId(n(t,
|
|
70
|
+
return this.page.getByTestId(n(t, p.CONTENT)).textContent();
|
|
71
71
|
}
|
|
72
72
|
async closeDialog({ testId: t }) {
|
|
73
73
|
await (await this.page.getByTestId(
|
|
74
|
-
n(t,
|
|
74
|
+
n(t, p.ACTION_CLOSE)
|
|
75
75
|
)).click();
|
|
76
76
|
}
|
|
77
77
|
async clickOnPrimaryButton({ testId: t }) {
|
|
78
78
|
await (await this.page.getByTestId(
|
|
79
|
-
n(t,
|
|
79
|
+
n(t, p.ACTION_BUTTONS_WRAPPER)
|
|
80
80
|
).locator(".primary")).click();
|
|
81
81
|
}
|
|
82
82
|
async clickOnDefaultButton({ testId: t }) {
|
|
83
83
|
await (await this.page.getByTestId(
|
|
84
|
-
n(t,
|
|
84
|
+
n(t, p.ACTION_BUTTONS_WRAPPER)
|
|
85
85
|
).locator(".default")).click();
|
|
86
86
|
}
|
|
87
87
|
async clickOnDeleteButton({ testId: t }) {
|
|
88
88
|
await (await this.page.getByTestId(
|
|
89
|
-
n(t,
|
|
89
|
+
n(t, p.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, p.HEADER)).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, p.WRAPPER)
|
|
98
98
|
)).isVisible();
|
|
99
99
|
}
|
|
100
100
|
}
|
|
101
|
-
class
|
|
101
|
+
class N {
|
|
102
102
|
constructor(t) {
|
|
103
|
-
|
|
103
|
+
s(this, "page");
|
|
104
104
|
this.page = t;
|
|
105
105
|
}
|
|
106
106
|
async waitForComponent({ testId: t }) {
|
|
107
107
|
await this.page.getByTestId(
|
|
108
|
-
n(t,
|
|
108
|
+
n(t, c.WRAPPER)
|
|
109
109
|
);
|
|
110
110
|
}
|
|
111
111
|
async selectDropdownOptionByIndex({ testId: t, index: e }) {
|
|
112
|
-
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
112
|
+
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(e).click();
|
|
113
113
|
}
|
|
114
114
|
async openDropdownComponent({ testId: t }) {
|
|
115
|
-
await this.page.getByTestId(n(t,
|
|
115
|
+
await this.page.getByTestId(n(t, c.TRIGGER)).click({ position: { x: 10, y: 10 } });
|
|
116
116
|
}
|
|
117
117
|
async selectDropdownOptionByName({ testId: t, name: e }) {
|
|
118
|
-
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
118
|
+
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span", { hasText: e }).click();
|
|
119
119
|
}
|
|
120
120
|
async selectMultipleItemsByIndex({ testId: t, itemsToSelect: e }) {
|
|
121
121
|
await this.openDropdownComponent({ testId: t });
|
|
122
122
|
for (const o of e)
|
|
123
|
-
await this.page.getByTestId(n(t,
|
|
123
|
+
await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(o).click();
|
|
124
124
|
}
|
|
125
125
|
async selectMultipleItemsByName({
|
|
126
126
|
testId: t,
|
|
@@ -128,54 +128,54 @@ class L {
|
|
|
128
128
|
}) {
|
|
129
129
|
await this.openDropdownComponent({ testId: t });
|
|
130
130
|
for (const o of e)
|
|
131
|
-
await this.page.getByTestId(n(t,
|
|
131
|
+
await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span", { hasText: o }).first().click();
|
|
132
132
|
}
|
|
133
133
|
async clickOnApply({ testId: t }) {
|
|
134
|
-
await this.page.getByTestId(n(t,
|
|
134
|
+
await this.page.getByTestId(n(t, c.ACTION_APPLY)).click();
|
|
135
135
|
}
|
|
136
136
|
async clickOnCancel({ testId: t }) {
|
|
137
|
-
await this.page.getByTestId(n(t,
|
|
137
|
+
await this.page.getByTestId(n(t, c.ACTION_CANCEL)).click();
|
|
138
138
|
}
|
|
139
139
|
}
|
|
140
|
-
class
|
|
140
|
+
class R {
|
|
141
141
|
constructor(t) {
|
|
142
|
-
|
|
142
|
+
s(this, "page");
|
|
143
143
|
this.page = t;
|
|
144
144
|
}
|
|
145
145
|
getLabelText({ testId: t }) {
|
|
146
|
-
return this.page.getByTestId(n(t,
|
|
146
|
+
return this.page.getByTestId(n(t, E.TEXT)).textContent();
|
|
147
147
|
}
|
|
148
148
|
isMandatory({ testId: t }) {
|
|
149
|
-
return this.page.getByTestId(n(t,
|
|
149
|
+
return this.page.getByTestId(n(t, E.MANDATORY)).isVisible();
|
|
150
150
|
}
|
|
151
151
|
async getHelpIconText({ testId: t }) {
|
|
152
152
|
const e = await this.page.getByTestId(
|
|
153
|
-
n(t,
|
|
153
|
+
n(t, E.TOOLTIP)
|
|
154
154
|
);
|
|
155
155
|
return await e.hover(), e.getAttribute("text");
|
|
156
156
|
}
|
|
157
157
|
}
|
|
158
|
-
class
|
|
158
|
+
class O {
|
|
159
159
|
constructor(t) {
|
|
160
|
-
|
|
160
|
+
s(this, "page");
|
|
161
161
|
this.page = t;
|
|
162
162
|
}
|
|
163
163
|
hasExtraText({ testId: t }) {
|
|
164
|
-
return this.page.getByTestId(n(t,
|
|
164
|
+
return this.page.getByTestId(n(t, A.TEXT)).isVisible();
|
|
165
165
|
}
|
|
166
166
|
getExtraText({ testId: t }) {
|
|
167
|
-
return this.page.getByTestId(n(t,
|
|
167
|
+
return this.page.getByTestId(n(t, A.TEXT)).textContent();
|
|
168
168
|
}
|
|
169
169
|
async hasExtraTextIconType({ testId: t, type: e }) {
|
|
170
|
-
return await (await this.page.getByTestId(n(t,
|
|
170
|
+
return await (await this.page.getByTestId(n(t, A.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
|
|
171
171
|
}
|
|
172
172
|
}
|
|
173
|
-
class
|
|
173
|
+
class Y extends N {
|
|
174
174
|
constructor(e) {
|
|
175
175
|
super(e);
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
this.fieldLabelComponent = new
|
|
176
|
+
s(this, "fieldLabelComponent");
|
|
177
|
+
s(this, "fieldHelpTextComponent");
|
|
178
|
+
this.fieldLabelComponent = new R(e), this.fieldHelpTextComponent = new O(e);
|
|
179
179
|
}
|
|
180
180
|
getDropdownTitle({ testId: e }) {
|
|
181
181
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -196,113 +196,116 @@ class V extends L {
|
|
|
196
196
|
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
|
|
197
197
|
}
|
|
198
198
|
getSelectedLabel({ testId: e }) {
|
|
199
|
-
return this.page.getByTestId(n(e,
|
|
199
|
+
return this.page.getByTestId(n(e, c.BUTTON_CONTENT)).textContent();
|
|
200
200
|
}
|
|
201
201
|
async searchForItem({ testId: e, searchTerm: o }) {
|
|
202
|
-
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, i.FIELD)).fill(o), this.page.getByTestId(n(e,
|
|
202
|
+
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, i.FIELD)).fill(o), this.page.getByTestId(n(e, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
203
203
|
}
|
|
204
204
|
isErrorText({ testId: e }) {
|
|
205
|
-
return this.page.getByTestId(n(e,
|
|
205
|
+
return this.page.getByTestId(n(e, c.TRIGGER)).locator(".state-error").isVisible();
|
|
206
206
|
}
|
|
207
207
|
async isDisabled({ testId: e }) {
|
|
208
|
-
return (await this.page.getByTestId(n(e,
|
|
208
|
+
return (await this.page.getByTestId(n(e, c.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
209
209
|
}
|
|
210
210
|
async clearAllOptions({ testId: e }) {
|
|
211
|
-
await this.page.getByTestId(n(e,
|
|
211
|
+
await this.page.getByTestId(n(e, c.ACTION_CLEAR_ALL)).click();
|
|
212
212
|
}
|
|
213
213
|
isSelectAllChecked({ testId: e }) {
|
|
214
|
-
return this.page.getByTestId(n(e,
|
|
214
|
+
return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
215
215
|
}
|
|
216
216
|
isSelectAllIndeterminate({ testId: e }) {
|
|
217
|
-
return this.page.getByTestId(n(e,
|
|
217
|
+
return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
218
218
|
}
|
|
219
219
|
async removeChipSelection({ testId: e }) {
|
|
220
|
-
await this.page.getByTestId(n(e,
|
|
220
|
+
await this.page.getByTestId(n(e, c.BUTTON_CLEAR)).click();
|
|
221
|
+
}
|
|
222
|
+
getDropdownOptions({ testId: e }) {
|
|
223
|
+
return this.page.getByTestId(n(e, c.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
221
224
|
}
|
|
222
225
|
}
|
|
223
|
-
class
|
|
226
|
+
class j extends N {
|
|
224
227
|
constructor(t) {
|
|
225
228
|
super(t);
|
|
226
229
|
}
|
|
227
230
|
getDropdownTitle({ testId: t }) {
|
|
228
|
-
return this.page.getByTestId(n(t,
|
|
231
|
+
return this.page.getByTestId(n(t, c.WRAPPER)).locator("label > span").textContent();
|
|
229
232
|
}
|
|
230
233
|
getSelectedItem({ testId: t }) {
|
|
231
|
-
return this.page.getByTestId(n(t,
|
|
234
|
+
return this.page.getByTestId(n(t, c.TRIGGER)).locator("button > span").textContent();
|
|
232
235
|
}
|
|
233
236
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
234
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
237
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, I.FIELD)).fill(e), this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
235
238
|
}
|
|
236
239
|
}
|
|
237
|
-
class
|
|
240
|
+
class K {
|
|
238
241
|
constructor(t) {
|
|
239
|
-
|
|
242
|
+
s(this, "page");
|
|
240
243
|
this.page = t;
|
|
241
244
|
}
|
|
242
245
|
async waitForComponent({ testId: t }) {
|
|
243
|
-
const e = `[data-testid='${t}-${
|
|
246
|
+
const e = `[data-testid='${t}-${l.TRIGGER}']`;
|
|
244
247
|
await this.page.waitForSelector(e);
|
|
245
248
|
}
|
|
246
249
|
async clickOnApply(t) {
|
|
247
250
|
await this.page.getByTestId(
|
|
248
|
-
n(t,
|
|
251
|
+
n(t, l.ACTION_APPLY)
|
|
249
252
|
).click();
|
|
250
253
|
}
|
|
251
254
|
async clickOnCancel(t) {
|
|
252
255
|
await this.page.getByTestId(
|
|
253
|
-
n(t,
|
|
256
|
+
n(t, l.ACTION_CANCEL)
|
|
254
257
|
).click();
|
|
255
258
|
}
|
|
256
259
|
async openIncludeExcludeComponent(t) {
|
|
257
|
-
await this.page.getByTestId(n(t,
|
|
260
|
+
await this.page.getByTestId(n(t, l.TRIGGER)).click();
|
|
258
261
|
}
|
|
259
262
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
260
|
-
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
263
|
+
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, l.SEARCH)).locator("input.transparent").fill(e), this.page.getByTestId(n(t, l.LIST)).locator("ul > li .v-popper span").first().textContent();
|
|
261
264
|
}
|
|
262
265
|
async selectItemByName({ testId: t, entityName: e }) {
|
|
263
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
266
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, l.LIST)).locator("ul > li .v-popper span", { hasText: e }).first().click(), await this.clickOnApply(t);
|
|
264
267
|
}
|
|
265
268
|
async selectItemByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
266
|
-
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
269
|
+
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, l.LIST)).locator(".include-exclude-list ul > li").nth(e).click(), await this.page.waitForSelector("include-exclude-list-header-loading", {
|
|
267
270
|
state: "hidden"
|
|
268
271
|
}), o && await this.clickOnApply(t);
|
|
269
272
|
}
|
|
270
273
|
async selectMultipleItems({ testId: t, itemsToSelect: e }) {
|
|
271
274
|
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t);
|
|
272
275
|
for (const o of e)
|
|
273
|
-
await this.page.getByTestId(n(t,
|
|
276
|
+
await this.page.getByTestId(n(t, l.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
|
|
274
277
|
}
|
|
275
278
|
async unselectItemByName({ testId: t, entityName: e }) {
|
|
276
279
|
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(
|
|
277
|
-
n(t,
|
|
280
|
+
n(t, l.LIST_SELECTED)
|
|
278
281
|
).locator("ul > li", { hasText: e }).locator(".clear-button").click(), await this.clickOnApply(t);
|
|
279
282
|
}
|
|
280
283
|
async unselectByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
281
284
|
await this.page.getByTestId(
|
|
282
|
-
n(t,
|
|
285
|
+
n(t, l.LIST_SELECTED)
|
|
283
286
|
).locator("ul li button").nth(e).click(), o && await this.clickOnApply(t);
|
|
284
287
|
}
|
|
285
288
|
async getSelectedCounter(t) {
|
|
286
289
|
return await this.page.getByTestId(
|
|
287
|
-
n(t,
|
|
290
|
+
n(t, l.LIST_SELECTED)
|
|
288
291
|
).locator(".include-exclude-selected-header-left span").textContent();
|
|
289
292
|
}
|
|
290
293
|
async clearAll({ testId: t }) {
|
|
291
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
294
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, l.CLEAR_ALL)).click(), await this.clickOnApply(t);
|
|
292
295
|
}
|
|
293
296
|
getTriggerText({ testId: t }) {
|
|
294
|
-
return this.page.getByTestId(n(t,
|
|
297
|
+
return this.page.getByTestId(n(t, l.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
|
|
295
298
|
}
|
|
296
299
|
getTriggerDescription({ testId: t }) {
|
|
297
|
-
return this.page.getByTestId(n(t,
|
|
300
|
+
return this.page.getByTestId(n(t, l.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
|
|
298
301
|
}
|
|
299
302
|
async selectAll({ testId: t }) {
|
|
300
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
303
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, l.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
301
304
|
}
|
|
302
305
|
}
|
|
303
|
-
class
|
|
306
|
+
class _ {
|
|
304
307
|
constructor(t) {
|
|
305
|
-
|
|
308
|
+
s(this, "page");
|
|
306
309
|
this.page = t;
|
|
307
310
|
}
|
|
308
311
|
getInputsFieldText({ testId: t }) {
|
|
@@ -324,12 +327,12 @@ class O {
|
|
|
324
327
|
return this.page.getByTestId(n(t, i.FIELD)).isDisabled();
|
|
325
328
|
}
|
|
326
329
|
}
|
|
327
|
-
class
|
|
330
|
+
class q extends _ {
|
|
328
331
|
constructor(e) {
|
|
329
332
|
super(e);
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
this.fieldLabelComponent = new
|
|
333
|
+
s(this, "fieldLabelComponent");
|
|
334
|
+
s(this, "fieldHelpTextComponent");
|
|
335
|
+
this.fieldLabelComponent = new R(e), this.fieldHelpTextComponent = new O(e);
|
|
333
336
|
}
|
|
334
337
|
getInputsLabelText({ testId: e }) {
|
|
335
338
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -395,57 +398,58 @@ class v extends O {
|
|
|
395
398
|
return (await this.getFontCaptionText({ testId: e }))[0];
|
|
396
399
|
}
|
|
397
400
|
async getFontCaptionText({ testId: e }) {
|
|
398
|
-
return (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".font-caption").textContent()).split("/").map((
|
|
401
|
+
return (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".font-caption").textContent()).split("/").map((g) => parseInt(g.trim(), 10));
|
|
399
402
|
}
|
|
400
403
|
getHelpIconText({ testId: e }) {
|
|
401
404
|
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
402
405
|
}
|
|
403
406
|
}
|
|
404
|
-
class
|
|
407
|
+
class z {
|
|
405
408
|
constructor(t) {
|
|
406
|
-
|
|
409
|
+
s(this, "page");
|
|
407
410
|
this.page = t;
|
|
408
411
|
}
|
|
409
412
|
async waitForComponent({ testId: t }) {
|
|
410
|
-
const e = `[data-testid='${t}-${
|
|
413
|
+
const e = `[data-testid='${t}-${u.WRAPPER}']`;
|
|
411
414
|
await this.page.waitForSelector(e);
|
|
412
415
|
}
|
|
413
416
|
getSelectedTabText({ testId: t }) {
|
|
414
|
-
return this.page.getByTestId(n(t,
|
|
417
|
+
return this.page.getByTestId(n(t, u.WRAPPER)).locator(".tab-item--active").textContent();
|
|
415
418
|
}
|
|
416
419
|
async selectTab({ testId: t, tabName: e }) {
|
|
417
420
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
418
421
|
await this.page.getByTestId(
|
|
419
|
-
n(t, `${
|
|
422
|
+
n(t, `${u.TAB}-${o + 1}`)
|
|
420
423
|
).click();
|
|
421
424
|
}
|
|
422
425
|
async getTabIndex({ testId: t, tabName: e }) {
|
|
423
|
-
return (await this.page.getByTestId(n(t,
|
|
426
|
+
return (await this.page.getByTestId(n(t, u.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
|
|
424
427
|
}
|
|
425
428
|
async isTabDisabled({ testId: t, tabName: e }) {
|
|
426
429
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
427
|
-
return this.page.getByTestId(n(t, `${
|
|
430
|
+
return this.page.getByTestId(n(t, `${u.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
|
|
428
431
|
}
|
|
429
432
|
}
|
|
430
|
-
class
|
|
433
|
+
class J {
|
|
431
434
|
constructor(t) {
|
|
432
|
-
|
|
435
|
+
s(this, "page");
|
|
433
436
|
this.page = t;
|
|
434
437
|
}
|
|
435
438
|
async waitForComponent({ testId: t }) {
|
|
436
|
-
const e = `[data-testid='${t}-${
|
|
439
|
+
const e = `[data-testid='${t}-${B.TRIGGER}']`;
|
|
437
440
|
await this.page.waitForSelector(e);
|
|
438
441
|
}
|
|
439
442
|
getTooltipText({ testId: t }) {
|
|
440
|
-
return this.page.getByTestId(`${t}-${
|
|
443
|
+
return this.page.getByTestId(`${t}-${B.TRIGGER}`).getAttribute("text");
|
|
441
444
|
}
|
|
442
445
|
getTooltipHeaderText({ testId: t }) {
|
|
443
|
-
return this.page.getByTestId(`${t}-${
|
|
446
|
+
return this.page.getByTestId(`${t}-${B.TRIGGER}`).getAttribute("header");
|
|
444
447
|
}
|
|
445
448
|
}
|
|
446
|
-
|
|
449
|
+
const h = ".table-row", m = ".icon-wrapper", P = ".states", L = ".table-head-container", S = ".table-row.loading";
|
|
450
|
+
class Q {
|
|
447
451
|
constructor(t) {
|
|
448
|
-
|
|
452
|
+
s(this, "page");
|
|
449
453
|
this.page = t;
|
|
450
454
|
}
|
|
451
455
|
async waitForComponent({ testId: t }) {
|
|
@@ -453,75 +457,10 @@ class X {
|
|
|
453
457
|
await this.page.waitForSelector(e);
|
|
454
458
|
}
|
|
455
459
|
getTableRowCount({ testId: t }) {
|
|
456
|
-
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(
|
|
457
|
-
}
|
|
458
|
-
getTableRowContentByIndex({ testId: t, index: e }) {
|
|
459
|
-
try {
|
|
460
|
-
return this.page.getByTestId(`${t}-${r.BODY_WRAPPER}`).locator(".table-row").nth(e).innerText();
|
|
461
|
-
} catch (o) {
|
|
462
|
-
throw console.error(o), new Error(o);
|
|
463
|
-
}
|
|
464
|
-
}
|
|
465
|
-
async getTableRowsByRowValue({
|
|
466
|
-
testId: t,
|
|
467
|
-
headerName: e,
|
|
468
|
-
rowValue: o
|
|
469
|
-
}) {
|
|
470
|
-
const s = await this.getRowIndicesByRowValue({
|
|
471
|
-
testId: t,
|
|
472
|
-
headerName: e,
|
|
473
|
-
rowValue: o
|
|
474
|
-
}), g = [];
|
|
475
|
-
for (const E of s) {
|
|
476
|
-
const m = await this.getTableRowContentByIndex({
|
|
477
|
-
testId: t,
|
|
478
|
-
index: E
|
|
479
|
-
});
|
|
480
|
-
g.push(m);
|
|
481
|
-
}
|
|
482
|
-
return g;
|
|
483
|
-
}
|
|
484
|
-
async getRowIndicesByRowValue({
|
|
485
|
-
testId: t,
|
|
486
|
-
headerName: e,
|
|
487
|
-
rowValue: o
|
|
488
|
-
}) {
|
|
489
|
-
const s = await this.getColumnValuesByHeader({
|
|
490
|
-
testId: t,
|
|
491
|
-
headerName: e
|
|
492
|
-
});
|
|
493
|
-
return this.getIndicesOf({ searchStr: o, array: s });
|
|
494
|
-
}
|
|
495
|
-
getIndicesOf({ searchStr: t, array: e }) {
|
|
496
|
-
const o = [];
|
|
497
|
-
for (let s = 0; s < e.length; s++)
|
|
498
|
-
e[s] === t && o.push(s);
|
|
499
|
-
return o;
|
|
500
|
-
}
|
|
501
|
-
async getColumnValuesByHeader({ headerName: t, testId: e }) {
|
|
502
|
-
const o = await this.getColumnIndexByHeader({
|
|
503
|
-
testId: e,
|
|
504
|
-
headerName: t
|
|
505
|
-
});
|
|
506
|
-
return this.getColumnValuesByIndex({ testId: e, index: o });
|
|
507
|
-
}
|
|
508
|
-
async getColumnIndexByHeader({ headerName: t, testId: e }) {
|
|
509
|
-
return (await this.getColumnHeaders({ testId: e })).indexOf(t);
|
|
510
|
-
}
|
|
511
|
-
async getColumnValuesByIndex({ index: t, testId: e }) {
|
|
512
|
-
const o = [], s = await this.getTableRowCount({ testId: e });
|
|
513
|
-
for (let g = 0; g < s; g++) {
|
|
514
|
-
const m = (await this.getTableRowContentByIndex({
|
|
515
|
-
testId: e,
|
|
516
|
-
index: g
|
|
517
|
-
})).split(`
|
|
518
|
-
`)[t];
|
|
519
|
-
o.push(m);
|
|
520
|
-
}
|
|
521
|
-
return o;
|
|
460
|
+
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(h).count();
|
|
522
461
|
}
|
|
523
462
|
async getColumnHeaders({ testId: t }) {
|
|
524
|
-
return this.page.getByTestId(n(t, r.TABLE)).locator(
|
|
463
|
+
return this.page.getByTestId(n(t, r.TABLE)).locator(L).allTextContents();
|
|
525
464
|
}
|
|
526
465
|
getTableLabel({ testId: t }) {
|
|
527
466
|
return this.page.getByTestId(n(t, r.HEADER)).innerText();
|
|
@@ -529,28 +468,19 @@ class X {
|
|
|
529
468
|
getTableFooter({ testId: t }) {
|
|
530
469
|
return this.page.getByTestId(n(t, r.CONTAINER)).locator(".table-footer").innerText();
|
|
531
470
|
}
|
|
532
|
-
async
|
|
533
|
-
await this.
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
const o = await this.getColumnIndexByHeader({
|
|
537
|
-
testId: t,
|
|
538
|
-
headerName: e
|
|
539
|
-
});
|
|
540
|
-
await this.page.getByTestId(n(t, r.TABLE)).locator(".table-head-container").nth(o).click();
|
|
471
|
+
async clickOnHeaderByName(t) {
|
|
472
|
+
await this.page.locator(L, {
|
|
473
|
+
hasText: t
|
|
474
|
+
}).click();
|
|
541
475
|
}
|
|
542
476
|
async searchForItems({ testId: t, searchTerm: e }) {
|
|
543
|
-
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, i.FIELD)).fill(e);
|
|
477
|
+
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, i.FIELD)).fill(e), await this.waitForTableToLoad();
|
|
544
478
|
}
|
|
545
479
|
async clearSearchText({ testId: t }) {
|
|
546
|
-
await this.page.getByTestId(n(t, i.FIELD)).clear();
|
|
480
|
+
await this.page.getByTestId(n(t, i.FIELD)).clear(), await this.waitForTableToLoad();
|
|
547
481
|
}
|
|
548
|
-
|
|
549
|
-
|
|
550
|
-
headerName: e,
|
|
551
|
-
testId: t
|
|
552
|
-
});
|
|
553
|
-
return this.page.getByTestId(n(t, r.TABLE)).locator(".table-head-container").nth(o).locator(".table-sort-icon").isVisible();
|
|
482
|
+
isArrowVisible({ testId: t, headerName: e }) {
|
|
483
|
+
return this.page.getByTestId(n(t, r.TABLE)).locator(L, { hasText: e }).locator(".table-sort-icon").isVisible();
|
|
554
484
|
}
|
|
555
485
|
async scrollDownTableRows({ testId: t }) {
|
|
556
486
|
const e = `[data-testid=${n(
|
|
@@ -558,51 +488,29 @@ class X {
|
|
|
558
488
|
r.TABLE
|
|
559
489
|
)}]`;
|
|
560
490
|
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
561
|
-
const
|
|
562
|
-
|
|
491
|
+
const g = document.querySelector(o);
|
|
492
|
+
g && (g.scrollTop = g.scrollHeight);
|
|
563
493
|
}, e), await this.waitForTableToLoad();
|
|
564
494
|
}
|
|
565
495
|
async waitForTableToLoad() {
|
|
566
|
-
await this.page.waitForSelector(
|
|
496
|
+
await this.page.waitForSelector(S, {
|
|
567
497
|
state: "hidden"
|
|
568
498
|
});
|
|
569
499
|
}
|
|
570
|
-
async
|
|
571
|
-
|
|
572
|
-
headerName: e,
|
|
573
|
-
rowValue: o
|
|
574
|
-
}) {
|
|
575
|
-
const s = await this.getRowIndicesByRowValue({
|
|
576
|
-
testId: t,
|
|
577
|
-
headerName: e,
|
|
578
|
-
rowValue: o
|
|
579
|
-
});
|
|
580
|
-
await this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(s[0]).locator(".icon-wrapper").click();
|
|
500
|
+
async waitingForTableLoadingToAppear() {
|
|
501
|
+
await this.page.waitForSelector(S);
|
|
581
502
|
}
|
|
582
|
-
async
|
|
583
|
-
|
|
584
|
-
testId: t,
|
|
585
|
-
headerName: e,
|
|
586
|
-
rowValue: o
|
|
587
|
-
});
|
|
588
|
-
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(s[0]).locator(".icon-wrapper").isVisible();
|
|
503
|
+
async expandRow({ testId: t, rowValue: e }) {
|
|
504
|
+
await this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(h, { hasText: e }).locator(m).click();
|
|
589
505
|
}
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
await this.isRowExpanded({
|
|
596
|
-
testId: t,
|
|
597
|
-
headerName: e,
|
|
598
|
-
rowValue: o
|
|
599
|
-
}) || await this.expandRow({ testId: t, headerName: e, rowValue: o });
|
|
600
|
-
const g = await this.getRowIndicesByRowValue({
|
|
506
|
+
isRowExpanded({ testId: t, rowValue: e }) {
|
|
507
|
+
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(h, { hasText: e }).locator(m).isVisible();
|
|
508
|
+
}
|
|
509
|
+
async getExpandedRowContent({ testId: t, rowValue: e }) {
|
|
510
|
+
return await this.isRowExpanded({
|
|
601
511
|
testId: t,
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
});
|
|
605
|
-
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(g[0]).locator(".icon-wrapper").textContent();
|
|
512
|
+
rowValue: e
|
|
513
|
+
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(h, { hasText: e }).locator(m).textContent();
|
|
606
514
|
}
|
|
607
515
|
isEmptyStateVisible({ testId: t }) {
|
|
608
516
|
return this.page.getByTestId(n(t, r.TABLE)).locator(".empty-state").isVisible();
|
|
@@ -613,48 +521,26 @@ class X {
|
|
|
613
521
|
getEmptyStateSubtitle({ testId: t }) {
|
|
614
522
|
return this.page.getByTestId(n(t, r.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
615
523
|
}
|
|
616
|
-
async
|
|
617
|
-
await this.page.getByTestId(n(t, r.
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
testId: t,
|
|
621
|
-
headerName: e,
|
|
622
|
-
rowValue: o
|
|
623
|
-
}) {
|
|
624
|
-
const s = await this.getRowIndicesByRowValue({
|
|
625
|
-
testId: t,
|
|
626
|
-
headerName: e,
|
|
627
|
-
rowValue: o
|
|
628
|
-
});
|
|
629
|
-
for (const g of s)
|
|
630
|
-
await this.clickOnRowCheckboxByIndex({ testId: t, index: g });
|
|
524
|
+
async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
|
|
525
|
+
await this.page.getByTestId(n(t, r.TABLE)).locator(h, {
|
|
526
|
+
hasText: e
|
|
527
|
+
}).locator(P).click();
|
|
631
528
|
}
|
|
632
529
|
getCheckedRowsNumber({ testId: t }) {
|
|
633
|
-
return this.page.getByTestId(n(t, r.TABLE)).locator(
|
|
530
|
+
return this.page.getByTestId(n(t, r.TABLE)).locator(h).locator(".icon.checked").count();
|
|
634
531
|
}
|
|
635
532
|
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
636
|
-
await this.page.getByTestId(n(t, r.TABLE)).locator(
|
|
637
|
-
}
|
|
638
|
-
getTableRowLocatorByIndex({ testId: t, index: e }) {
|
|
639
|
-
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(e);
|
|
533
|
+
await this.page.getByTestId(n(t, r.TABLE)).locator(P).nth(0).click();
|
|
640
534
|
}
|
|
641
|
-
|
|
642
|
-
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
rowValue: o
|
|
646
|
-
}) {
|
|
647
|
-
const s = await this.getRowIndicesByRowValue({
|
|
648
|
-
testId: t,
|
|
649
|
-
headerName: e,
|
|
650
|
-
rowValue: o
|
|
651
|
-
});
|
|
652
|
-
return this.getTableRowLocatorByIndex({ testId: t, index: s[0] });
|
|
535
|
+
getTableLocator({ testId: t }) {
|
|
536
|
+
return this.page.getByTestId(
|
|
537
|
+
n(t, r.CONTAINER)
|
|
538
|
+
);
|
|
653
539
|
}
|
|
654
540
|
}
|
|
655
|
-
class
|
|
541
|
+
class G {
|
|
656
542
|
constructor(t) {
|
|
657
|
-
|
|
543
|
+
s(this, "page");
|
|
658
544
|
this.page = t;
|
|
659
545
|
}
|
|
660
546
|
async waitForComponent({ testId: t }) {
|
|
@@ -674,45 +560,45 @@ class _ {
|
|
|
674
560
|
return this.page.getByTestId(t).isDisabled();
|
|
675
561
|
}
|
|
676
562
|
}
|
|
677
|
-
class
|
|
563
|
+
class Z {
|
|
678
564
|
constructor(t) {
|
|
679
|
-
|
|
565
|
+
s(this, "page");
|
|
680
566
|
this.page = t;
|
|
681
567
|
}
|
|
682
568
|
async waitForComponent({ testId: t }) {
|
|
683
|
-
const e = `[data-testid='${t}-${
|
|
569
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
684
570
|
await this.page.waitForSelector(e);
|
|
685
571
|
}
|
|
686
572
|
getSnackbarTitle({ testId: t }) {
|
|
687
|
-
return this.page.getByTestId(n(t,
|
|
573
|
+
return this.page.getByTestId(n(t, T.TITLE)).textContent();
|
|
688
574
|
}
|
|
689
575
|
async closeSnackbar({ testId: t }) {
|
|
690
|
-
await this.page.getByTestId(n(t,
|
|
576
|
+
await this.page.getByTestId(n(t, T.CLOSE)).locator(".icon-name--x").click();
|
|
691
577
|
}
|
|
692
578
|
async waitForSnackbarToBeClosed({ testId: t }) {
|
|
693
|
-
const e = `[data-testid='${t}-${
|
|
579
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
694
580
|
await this.page.waitForSelector(e, { state: "detached" });
|
|
695
581
|
}
|
|
696
582
|
getSnackbarDescription({ testId: t }) {
|
|
697
|
-
return this.page.getByTestId(n(t,
|
|
583
|
+
return this.page.getByTestId(n(t, T.MESSAGE)).textContent();
|
|
698
584
|
}
|
|
699
585
|
async clickOnActionButton({ testId: t, buttonName: e }) {
|
|
700
586
|
const o = await this.getActionButtonIndex({
|
|
701
587
|
testId: t,
|
|
702
588
|
buttonName: e
|
|
703
|
-
}),
|
|
704
|
-
await this.page.click(
|
|
589
|
+
}), g = `[data-testid='${t}-${T.ACTION_BUTTON}-${o}']`;
|
|
590
|
+
await this.page.click(g);
|
|
705
591
|
}
|
|
706
592
|
async getActionButtonIndex({
|
|
707
593
|
testId: t,
|
|
708
594
|
buttonName: e
|
|
709
595
|
}) {
|
|
710
|
-
return (await this.page.getByTestId(n(t,
|
|
596
|
+
return (await this.page.getByTestId(n(t, T.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
|
|
711
597
|
}
|
|
712
598
|
}
|
|
713
|
-
class
|
|
599
|
+
class M {
|
|
714
600
|
constructor(t) {
|
|
715
|
-
|
|
601
|
+
s(this, "page");
|
|
716
602
|
this.page = t;
|
|
717
603
|
}
|
|
718
604
|
async waitForComponent({ testId: t }) {
|
|
@@ -737,28 +623,28 @@ class j {
|
|
|
737
623
|
).locator(".start-icon").click();
|
|
738
624
|
}
|
|
739
625
|
}
|
|
740
|
-
class
|
|
626
|
+
class tt {
|
|
741
627
|
constructor(t) {
|
|
742
|
-
|
|
628
|
+
s(this, "page");
|
|
743
629
|
this.page = t;
|
|
744
630
|
}
|
|
745
631
|
async waitForComponent({ testId: t }) {
|
|
746
|
-
const e = `[data-testid='${t}-${
|
|
632
|
+
const e = `[data-testid='${t}-${E.TEXT}']`;
|
|
747
633
|
await this.page.waitForSelector(e);
|
|
748
634
|
}
|
|
749
635
|
getFormRowTitle({ testId: t }) {
|
|
750
|
-
return new
|
|
636
|
+
return new R(this.page).getLabelText({ testId: t });
|
|
751
637
|
}
|
|
752
638
|
isFormRowMandatory({ testId: t }) {
|
|
753
|
-
return new
|
|
639
|
+
return new R(this.page).isMandatory({ testId: t });
|
|
754
640
|
}
|
|
755
641
|
getIconText({ testId: t }) {
|
|
756
|
-
return new
|
|
642
|
+
return new O(this.page).getExtraText({ testId: t });
|
|
757
643
|
}
|
|
758
644
|
}
|
|
759
|
-
class
|
|
645
|
+
class et {
|
|
760
646
|
constructor(t) {
|
|
761
|
-
|
|
647
|
+
s(this, "page");
|
|
762
648
|
this.page = t;
|
|
763
649
|
}
|
|
764
650
|
async waitForComponent({ testId: t }) {
|
|
@@ -778,10 +664,10 @@ class K {
|
|
|
778
664
|
await this.page.getByTestId(n(t, d.CANCEL_BUTTON)).click();
|
|
779
665
|
}
|
|
780
666
|
isSaveButtonLoading({ testId: t }) {
|
|
781
|
-
return new
|
|
667
|
+
return new G(this.page).isButtonLoading({ testId: t });
|
|
782
668
|
}
|
|
783
669
|
}
|
|
784
|
-
class
|
|
670
|
+
class C extends _ {
|
|
785
671
|
constructor(t) {
|
|
786
672
|
super(t);
|
|
787
673
|
}
|
|
@@ -821,51 +707,89 @@ class w extends O {
|
|
|
821
707
|
await (await this.page.getByTestId(n(t, i.WRAPPER)).locator(".password-visibility")).click();
|
|
822
708
|
}
|
|
823
709
|
}
|
|
824
|
-
class
|
|
710
|
+
class at {
|
|
825
711
|
constructor(t) {
|
|
826
|
-
|
|
712
|
+
s(this, "page");
|
|
827
713
|
this.page = t;
|
|
828
714
|
}
|
|
829
715
|
async waitForComponent({ testId: t }) {
|
|
830
|
-
const e = `[data-testid='${t}-${
|
|
716
|
+
const e = `[data-testid='${t}-${I.CONTAINER}']`;
|
|
831
717
|
await this.page.waitForSelector(e);
|
|
832
718
|
}
|
|
833
|
-
async searchInput({ testId: t,
|
|
834
|
-
await new
|
|
719
|
+
async searchInput({ testId: t, searchTerm: e }) {
|
|
720
|
+
await new C(this.page).addInput({ testId: t, text: e });
|
|
835
721
|
}
|
|
836
722
|
async clearInput({ testId: t }) {
|
|
837
|
-
await new
|
|
723
|
+
await new C(this.page).clearInput({ testId: t });
|
|
838
724
|
}
|
|
839
725
|
async clickOnXButton({ testId: t }) {
|
|
840
|
-
await this.page.getByTestId(n(t,
|
|
726
|
+
await this.page.getByTestId(n(t, I.CLEAR)).locator(".icon-name--x-circle").click();
|
|
841
727
|
}
|
|
842
728
|
isDisabled({ testId: t }) {
|
|
843
|
-
return new
|
|
729
|
+
return new C(this.page).isDisabled({ testId: t });
|
|
844
730
|
}
|
|
845
731
|
getSearchPlaceholder({ testId: t }) {
|
|
846
|
-
return new
|
|
732
|
+
return new C(this.page).getPlaceholderText({ testId: t });
|
|
847
733
|
}
|
|
848
734
|
getSearchInputValue({ testId: t }) {
|
|
849
|
-
return new
|
|
735
|
+
return new C(this.page).getInputsFieldText({ testId: t });
|
|
736
|
+
}
|
|
737
|
+
}
|
|
738
|
+
class v {
|
|
739
|
+
constructor(t) {
|
|
740
|
+
s(this, "page");
|
|
741
|
+
this.page = t;
|
|
742
|
+
}
|
|
743
|
+
async waitForComponent({ testId: t }) {
|
|
744
|
+
const e = `[data-testid='${t}-${b.TEXT}']`;
|
|
745
|
+
await this.page.waitForSelector(e);
|
|
746
|
+
}
|
|
747
|
+
getInlineCopyText({ testId: t }) {
|
|
748
|
+
return this.page.getByTestId(`${t}-${b.TEXT}`).textContent();
|
|
749
|
+
}
|
|
750
|
+
}
|
|
751
|
+
class nt {
|
|
752
|
+
constructor(t) {
|
|
753
|
+
s(this, "page");
|
|
754
|
+
this.page = t;
|
|
755
|
+
}
|
|
756
|
+
async waitForComponent({ testId: t }) {
|
|
757
|
+
const e = `[data-testid='${t}-${x.TITLE}']`;
|
|
758
|
+
await this.page.waitForSelector(e);
|
|
759
|
+
}
|
|
760
|
+
getHeaderTitle({ testId: t }) {
|
|
761
|
+
return this.page.getByTestId(`${t}-${x.TITLE}`).textContent();
|
|
762
|
+
}
|
|
763
|
+
getInlineCopyText({ testId: t }) {
|
|
764
|
+
return new v(this.page).getInlineCopyText({
|
|
765
|
+
testId: t
|
|
766
|
+
});
|
|
767
|
+
}
|
|
768
|
+
async isIconPresent({
|
|
769
|
+
testId: t,
|
|
770
|
+
iconName: e
|
|
771
|
+
}) {
|
|
772
|
+
return await this.page.getByTestId(`${t}-${x.APP_PLATFORM}`).getAttribute("data-platform") === e;
|
|
850
773
|
}
|
|
851
774
|
}
|
|
852
775
|
export {
|
|
853
|
-
|
|
854
|
-
|
|
855
|
-
|
|
856
|
-
|
|
857
|
-
|
|
858
|
-
|
|
859
|
-
|
|
860
|
-
|
|
861
|
-
|
|
862
|
-
|
|
863
|
-
|
|
864
|
-
|
|
865
|
-
|
|
866
|
-
|
|
867
|
-
|
|
868
|
-
|
|
869
|
-
|
|
870
|
-
|
|
776
|
+
nt as AppHeaderComponent,
|
|
777
|
+
X as BannerComponent,
|
|
778
|
+
G as ButtonComponent,
|
|
779
|
+
U as ComponentBasePage,
|
|
780
|
+
f as DialogComponent,
|
|
781
|
+
Y as DropdownComponent,
|
|
782
|
+
j as DropdownComponentV3,
|
|
783
|
+
O as FieldHelpTextComponent,
|
|
784
|
+
R as FieldLabelComponent,
|
|
785
|
+
et as FormCardComponent,
|
|
786
|
+
tt as FormRowComponent,
|
|
787
|
+
K as IncludeExcludeComponent,
|
|
788
|
+
q as InputsComponent,
|
|
789
|
+
M as MultiBarComponent,
|
|
790
|
+
at as SearchComponent,
|
|
791
|
+
Z as SnackbarComponent,
|
|
792
|
+
Q as TableComponent,
|
|
793
|
+
z as TabsComponent,
|
|
794
|
+
J as TooltipComponent
|
|
871
795
|
};
|