@ironsource/shared-ui-e2e 2.1.3-rc.2 → 2.1.3-rc.21
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 +410 -270
- package/shared-e2e-commands.umd.cjs +1 -2
- package/tests/components/appHeader/app-header-component.d.ts +18 -0
- package/tests/components/appHeader/app-header-page.d.ts +11 -0
- package/tests/components/appHeader/consts.d.ts +3 -0
- package/tests/components/button/button-component.d.ts +20 -0
- package/tests/components/button/button-page.d.ts +12 -0
- package/tests/components/button/consts.d.ts +3 -0
- 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/formCard/consts.d.ts +3 -0
- package/tests/components/formCard/form-card-component.d.ts +23 -0
- package/tests/components/formCard/form-card-page.d.ts +13 -0
- package/tests/components/formRow/consts.d.ts +3 -0
- package/tests/components/formRow/form-row-component.d.ts +17 -0
- package/tests/components/formRow/form-row-page.d.ts +10 -0
- package/tests/components/inlineCopy/consts.d.ts +3 -0
- package/tests/components/inlineCopy/inline-copy-component.d.ts +11 -0
- package/tests/components/inlineCopy/inline-copy-page.d.ts +9 -0
- package/tests/components/inputs/types.d.ts +1 -1
- package/tests/components/search/consts.d.ts +3 -0
- package/tests/components/search/search-component.d.ts +25 -0
- package/tests/components/search/search-page.d.ts +14 -0
- package/tests/components/snackbar/consts.d.ts +4 -0
- package/tests/components/snackbar/snackbar-component.d.ts +27 -0
- package/tests/components/snackbar/snackbar-page.d.ts +13 -0
- package/tests/components/table/table-component.d.ts +11 -29
- package/tests/components/table/table-page.d.ts +4 -16
- package/tests/components/table/types.d.ts +10 -2
- package/tests/global/types.d.ts +4 -0
- package/tests/index.d.ts +12 -0
- package/tests/testids/index.d.ts +9 -1
- 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 N {
|
|
|
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 x {
|
|
|
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
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 R(e), this.fieldHelpTextComponent = 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,146 +196,149 @@ class _ extends x {
|
|
|
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,
|
|
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 }) {
|
|
309
|
-
return this.page.getByTestId(n(t,
|
|
312
|
+
return this.page.getByTestId(n(t, i.FIELD)).inputValue();
|
|
310
313
|
}
|
|
311
314
|
getPlaceholderText({ testId: t }) {
|
|
312
|
-
return this.page.getByTestId(n(t,
|
|
315
|
+
return this.page.getByTestId(n(t, i.FIELD)).getAttribute("placeholder");
|
|
313
316
|
}
|
|
314
317
|
getInputsType({ testId: t }) {
|
|
315
|
-
return this.page.getByTestId(n(t,
|
|
318
|
+
return this.page.getByTestId(n(t, i.FIELD)).getAttribute("type");
|
|
316
319
|
}
|
|
317
320
|
async addInput({ testId: t, text: e }) {
|
|
318
|
-
await this.page.getByTestId(n(t,
|
|
321
|
+
await this.page.getByTestId(n(t, i.FIELD)).type(e);
|
|
319
322
|
}
|
|
320
323
|
async clearInput({ testId: t }) {
|
|
321
|
-
await this.page.getByTestId(n(t,
|
|
324
|
+
await this.page.getByTestId(n(t, i.FIELD)).clear();
|
|
322
325
|
}
|
|
323
326
|
isDisabled({ testId: t }) {
|
|
324
|
-
return this.page.getByTestId(n(t,
|
|
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 R(e), this.fieldHelpTextComponent = 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 });
|
|
336
339
|
}
|
|
337
340
|
async waitForComponent({ testId: e }) {
|
|
338
|
-
const o = `[data-testid='${e}-${
|
|
341
|
+
const o = `[data-testid='${e}-${i.WRAPPER}']`;
|
|
339
342
|
await this.page.waitForSelector(o);
|
|
340
343
|
}
|
|
341
344
|
isInputMandatory({ testId: e }) {
|
|
@@ -348,14 +351,14 @@ class F extends O {
|
|
|
348
351
|
return this.fieldHelpTextComponent.getExtraText({ testId: e });
|
|
349
352
|
}
|
|
350
353
|
async clickOnApplyButton({ testId: e }) {
|
|
351
|
-
await (await this.page.getByTestId(n(e,
|
|
354
|
+
await (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".icon.icon-name--check")).click();
|
|
352
355
|
}
|
|
353
356
|
hasInlineErrorText({ testId: e }) {
|
|
354
|
-
return this.page.getByTestId(n(e,
|
|
357
|
+
return this.page.getByTestId(n(e, i.TOOLTIP)).isVisible();
|
|
355
358
|
}
|
|
356
359
|
async getInlineErrorText({ testId: e }) {
|
|
357
360
|
const o = await this.page.getByTestId(
|
|
358
|
-
n(e,
|
|
361
|
+
n(e, i.TOOLTIP)
|
|
359
362
|
);
|
|
360
363
|
return await o.hover(), o.getAttribute("text");
|
|
361
364
|
}
|
|
@@ -363,17 +366,17 @@ class F extends O {
|
|
|
363
366
|
await this.isPasswordHidden({ testId: e }) && await this.clickOnPasswordIcon({ testId: e });
|
|
364
367
|
}
|
|
365
368
|
async clickOnPasswordIcon({ testId: e }) {
|
|
366
|
-
await this.page.getByTestId(n(e,
|
|
369
|
+
await this.page.getByTestId(n(e, i.TOGGLE_PASSWORD)).click();
|
|
367
370
|
}
|
|
368
371
|
async clickOnHidePassword({ testId: e }) {
|
|
369
372
|
await this.isPasswordHidden({ testId: e }) || await this.clickOnPasswordIcon({ testId: e });
|
|
370
373
|
}
|
|
371
374
|
isPasswordHidden({ testId: e }) {
|
|
372
|
-
return this.page.getByTestId(n(e,
|
|
375
|
+
return this.page.getByTestId(n(e, i.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
|
|
373
376
|
}
|
|
374
377
|
async clearInput({ testId: e }) {
|
|
375
378
|
const o = await this.page.getByTestId(
|
|
376
|
-
n(e,
|
|
379
|
+
n(e, i.FIELD)
|
|
377
380
|
);
|
|
378
381
|
await o.click({ clickCount: 2 }), await o.type("");
|
|
379
382
|
}
|
|
@@ -382,11 +385,11 @@ class F extends O {
|
|
|
382
385
|
}
|
|
383
386
|
async isDisabled({ testId: e }) {
|
|
384
387
|
return (await this.page.getByTestId(
|
|
385
|
-
n(e,
|
|
388
|
+
n(e, i.FIELD)
|
|
386
389
|
)).isDisabled();
|
|
387
390
|
}
|
|
388
391
|
hasApplyButton({ testId: e }) {
|
|
389
|
-
return this.page.getByTestId(n(e,
|
|
392
|
+
return this.page.getByTestId(n(e, i.WRAPPER)).locator(".icon.icon-name--check").isVisible();
|
|
390
393
|
}
|
|
391
394
|
async getMaxLengthNumber({ testId: e }) {
|
|
392
395
|
return (await this.getFontCaptionText({ testId: e }))[1];
|
|
@@ -395,57 +398,58 @@ class F 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,
|
|
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,87 +457,10 @@ class V {
|
|
|
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({
|
|
459
|
-
testId: t,
|
|
460
|
-
index: e
|
|
461
|
-
}) {
|
|
462
|
-
try {
|
|
463
|
-
return this.page.getByTestId(`${t}-${r.BODY_WRAPPER}`).locator(".table-row").nth(e).innerText();
|
|
464
|
-
} catch (o) {
|
|
465
|
-
throw console.error(o), new Error(o);
|
|
466
|
-
}
|
|
467
|
-
}
|
|
468
|
-
async getTableRowsByRowValue({
|
|
469
|
-
testId: t,
|
|
470
|
-
rowHeader: e,
|
|
471
|
-
rowValue: o
|
|
472
|
-
}) {
|
|
473
|
-
const i = await this.getRowIndicesByRowValue({
|
|
474
|
-
testId: t,
|
|
475
|
-
rowHeader: e,
|
|
476
|
-
rowValue: o
|
|
477
|
-
}), g = [];
|
|
478
|
-
for (const y of i) {
|
|
479
|
-
const C = await this.getTableRowContentByIndex({
|
|
480
|
-
testId: t,
|
|
481
|
-
index: y
|
|
482
|
-
});
|
|
483
|
-
g.push(C);
|
|
484
|
-
}
|
|
485
|
-
return g;
|
|
486
|
-
}
|
|
487
|
-
async getRowIndicesByRowValue({
|
|
488
|
-
testId: t,
|
|
489
|
-
rowHeader: e,
|
|
490
|
-
rowValue: o
|
|
491
|
-
}) {
|
|
492
|
-
const i = await this.getColumnValuesByHeader({
|
|
493
|
-
testId: t,
|
|
494
|
-
header: e
|
|
495
|
-
});
|
|
496
|
-
return this.getIndicesOf(o, i);
|
|
497
|
-
}
|
|
498
|
-
getIndicesOf(t, e) {
|
|
499
|
-
const o = [];
|
|
500
|
-
for (let i = 0; i < e.length; i++)
|
|
501
|
-
e[i] === t && o.push(i);
|
|
502
|
-
return o;
|
|
503
|
-
}
|
|
504
|
-
async getColumnValuesByHeader({
|
|
505
|
-
header: t,
|
|
506
|
-
testId: e
|
|
507
|
-
}) {
|
|
508
|
-
const o = await this.getColumnIndexByHeader({
|
|
509
|
-
testId: e,
|
|
510
|
-
header: t
|
|
511
|
-
});
|
|
512
|
-
return this.getColumnValuesByIndex({ testId: e, index: o });
|
|
513
|
-
}
|
|
514
|
-
async getColumnIndexByHeader({
|
|
515
|
-
header: t,
|
|
516
|
-
testId: e
|
|
517
|
-
}) {
|
|
518
|
-
return (await this.getColumnHeaders({ testId: e })).indexOf(t);
|
|
519
|
-
}
|
|
520
|
-
async getColumnValuesByIndex({
|
|
521
|
-
index: t,
|
|
522
|
-
testId: e
|
|
523
|
-
}) {
|
|
524
|
-
const o = [], i = await this.getTableRowCount({ testId: e });
|
|
525
|
-
for (let g = 0; g < i; g++) {
|
|
526
|
-
const C = (await this.getTableRowContentByIndex({
|
|
527
|
-
testId: e,
|
|
528
|
-
index: g
|
|
529
|
-
})).split(`
|
|
530
|
-
`)[t];
|
|
531
|
-
o.push(C);
|
|
532
|
-
}
|
|
533
|
-
return o;
|
|
460
|
+
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(h).count();
|
|
534
461
|
}
|
|
535
462
|
async getColumnHeaders({ testId: t }) {
|
|
536
|
-
return this.page.getByTestId(n(t, r.TABLE)).locator(
|
|
463
|
+
return this.page.getByTestId(n(t, r.TABLE)).locator(L).allTextContents();
|
|
537
464
|
}
|
|
538
465
|
getTableLabel({ testId: t }) {
|
|
539
466
|
return this.page.getByTestId(n(t, r.HEADER)).innerText();
|
|
@@ -541,28 +468,19 @@ class V {
|
|
|
541
468
|
getTableFooter({ testId: t }) {
|
|
542
469
|
return this.page.getByTestId(n(t, r.CONTAINER)).locator(".table-footer").innerText();
|
|
543
470
|
}
|
|
544
|
-
async
|
|
545
|
-
await this.
|
|
546
|
-
|
|
547
|
-
|
|
548
|
-
const o = await this.getColumnIndexByHeader({
|
|
549
|
-
testId: t,
|
|
550
|
-
header: e
|
|
551
|
-
});
|
|
552
|
-
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();
|
|
553
475
|
}
|
|
554
476
|
async searchForItems({ testId: t, searchTerm: e }) {
|
|
555
|
-
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t,
|
|
477
|
+
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, i.FIELD)).fill(e);
|
|
556
478
|
}
|
|
557
479
|
async clearSearchText({ testId: t }) {
|
|
558
|
-
await this.page.getByTestId(n(t,
|
|
480
|
+
await this.page.getByTestId(n(t, i.FIELD)).clear(), await this.waitForTableToLoad();
|
|
559
481
|
}
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
header: e,
|
|
563
|
-
testId: t
|
|
564
|
-
});
|
|
565
|
-
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();
|
|
566
484
|
}
|
|
567
485
|
async scrollDownTableRows({ testId: t }) {
|
|
568
486
|
const e = `[data-testid=${n(
|
|
@@ -570,47 +488,29 @@ class V {
|
|
|
570
488
|
r.TABLE
|
|
571
489
|
)}]`;
|
|
572
490
|
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
573
|
-
const
|
|
574
|
-
|
|
491
|
+
const g = document.querySelector(o);
|
|
492
|
+
g && (g.scrollTop = g.scrollHeight);
|
|
575
493
|
}, e), await this.waitForTableToLoad();
|
|
576
494
|
}
|
|
577
495
|
async waitForTableToLoad() {
|
|
578
|
-
await this.page.waitForSelector(
|
|
496
|
+
await this.page.waitForSelector(S, {
|
|
579
497
|
state: "hidden"
|
|
580
498
|
});
|
|
581
499
|
}
|
|
582
|
-
async
|
|
583
|
-
|
|
584
|
-
headerName: e,
|
|
585
|
-
rowValue: o
|
|
586
|
-
}) {
|
|
587
|
-
const i = await this.getRowIndicesByRowValue({
|
|
588
|
-
testId: t,
|
|
589
|
-
rowHeader: e,
|
|
590
|
-
rowValue: o
|
|
591
|
-
});
|
|
592
|
-
await this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(i[0]).locator(".icon-wrapper").click();
|
|
500
|
+
async waitingForTableLoadingToAppear() {
|
|
501
|
+
await this.page.waitForSelector(S);
|
|
593
502
|
}
|
|
594
|
-
async
|
|
595
|
-
|
|
596
|
-
testId: t,
|
|
597
|
-
rowHeader: e,
|
|
598
|
-
rowValue: o
|
|
599
|
-
});
|
|
600
|
-
return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(i[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();
|
|
601
505
|
}
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
}) || await this.expandRow({ testId: t, headerName: e, rowValue: o });
|
|
608
|
-
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({
|
|
609
511
|
testId: t,
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
});
|
|
613
|
-
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();
|
|
614
514
|
}
|
|
615
515
|
isEmptyStateVisible({ testId: t }) {
|
|
616
516
|
return this.page.getByTestId(n(t, r.TABLE)).locator(".empty-state").isVisible();
|
|
@@ -621,35 +521,275 @@ class V {
|
|
|
621
521
|
getEmptyStateSubtitle({ testId: t }) {
|
|
622
522
|
return this.page.getByTestId(n(t, r.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
623
523
|
}
|
|
624
|
-
async
|
|
625
|
-
await this.page.getByTestId(n(t, r.
|
|
626
|
-
|
|
627
|
-
|
|
628
|
-
const i = await this.getRowIndicesByRowValue({
|
|
629
|
-
testId: t,
|
|
630
|
-
rowHeader: e,
|
|
631
|
-
rowValue: o
|
|
632
|
-
});
|
|
633
|
-
await this.clickOnRowCheckboxByIndex({ testId: t, index: i });
|
|
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();
|
|
634
528
|
}
|
|
635
529
|
getCheckedRowsNumber({ testId: t }) {
|
|
636
|
-
return this.page.getByTestId(n(t, r.TABLE)).locator(
|
|
530
|
+
return this.page.getByTestId(n(t, r.TABLE)).locator(h).locator(".icon.checked").count();
|
|
637
531
|
}
|
|
638
532
|
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
639
|
-
await this.page.getByTestId(n(t, r.TABLE)).locator(
|
|
533
|
+
await this.page.getByTestId(n(t, r.TABLE)).locator(P).nth(0).click();
|
|
534
|
+
}
|
|
535
|
+
getTableLocator({ testId: t }) {
|
|
536
|
+
return this.page.getByTestId(
|
|
537
|
+
n(t, r.CONTAINER)
|
|
538
|
+
);
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
class G {
|
|
542
|
+
constructor(t) {
|
|
543
|
+
s(this, "page");
|
|
544
|
+
this.page = t;
|
|
545
|
+
}
|
|
546
|
+
async waitForComponent({ testId: t }) {
|
|
547
|
+
const e = `[data-testid='${t}']`;
|
|
548
|
+
await this.page.waitForSelector(e);
|
|
549
|
+
}
|
|
550
|
+
async clickOnButton({ testId: t }) {
|
|
551
|
+
await this.page.click(`[data-testid='${t}']`);
|
|
552
|
+
}
|
|
553
|
+
async isButtonLoading({ testId: t }) {
|
|
554
|
+
return (await this.page.getByTestId(t).getAttribute("class")).includes("loading");
|
|
555
|
+
}
|
|
556
|
+
async getButtonText({ testId: t }) {
|
|
557
|
+
return this.page.getByTestId(t).locator(".font-button").textContent();
|
|
558
|
+
}
|
|
559
|
+
isButtonDisabled({ testId: t }) {
|
|
560
|
+
return this.page.getByTestId(t).isDisabled();
|
|
561
|
+
}
|
|
562
|
+
}
|
|
563
|
+
class Z {
|
|
564
|
+
constructor(t) {
|
|
565
|
+
s(this, "page");
|
|
566
|
+
this.page = t;
|
|
567
|
+
}
|
|
568
|
+
async waitForComponent({ testId: t }) {
|
|
569
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
570
|
+
await this.page.waitForSelector(e);
|
|
571
|
+
}
|
|
572
|
+
getSnackbarTitle({ testId: t }) {
|
|
573
|
+
return this.page.getByTestId(n(t, T.TITLE)).textContent();
|
|
574
|
+
}
|
|
575
|
+
async closeSnackbar({ testId: t }) {
|
|
576
|
+
await this.page.getByTestId(n(t, T.CLOSE)).locator(".icon-name--x").click();
|
|
577
|
+
}
|
|
578
|
+
async waitForSnackbarToBeClosed({ testId: t }) {
|
|
579
|
+
const e = `[data-testid='${t}-${T.CONTAINER}']`;
|
|
580
|
+
await this.page.waitForSelector(e, { state: "detached" });
|
|
581
|
+
}
|
|
582
|
+
getSnackbarDescription({ testId: t }) {
|
|
583
|
+
return this.page.getByTestId(n(t, T.MESSAGE)).textContent();
|
|
584
|
+
}
|
|
585
|
+
async clickOnActionButton({ testId: t, buttonName: e }) {
|
|
586
|
+
const o = await this.getActionButtonIndex({
|
|
587
|
+
testId: t,
|
|
588
|
+
buttonName: e
|
|
589
|
+
}), g = `[data-testid='${t}-${T.ACTION_BUTTON}-${o}']`;
|
|
590
|
+
await this.page.click(g);
|
|
591
|
+
}
|
|
592
|
+
async getActionButtonIndex({
|
|
593
|
+
testId: t,
|
|
594
|
+
buttonName: e
|
|
595
|
+
}) {
|
|
596
|
+
return (await this.page.getByTestId(n(t, T.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
|
|
597
|
+
}
|
|
598
|
+
}
|
|
599
|
+
class M {
|
|
600
|
+
constructor(t) {
|
|
601
|
+
s(this, "page");
|
|
602
|
+
this.page = t;
|
|
603
|
+
}
|
|
604
|
+
async waitForComponent({ testId: t }) {
|
|
605
|
+
const e = `[data-testid='${t}-${y.WRAPPER}']`;
|
|
606
|
+
await this.page.waitForSelector(e);
|
|
607
|
+
}
|
|
608
|
+
async closeMultiBar({ testId: t }) {
|
|
609
|
+
await this.page.getByTestId(n(t, y.CLOSE_BTN)).locator(".icon-wrapper").click();
|
|
610
|
+
}
|
|
611
|
+
getMultiBarCountText({ testId: t }) {
|
|
612
|
+
return this.page.getByTestId(n(t, y.WRAPPER)).locator(".count-text").textContent();
|
|
613
|
+
}
|
|
614
|
+
async isMultiBarVisible({ testId: t }) {
|
|
615
|
+
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, y.WRAPPER)).locator(".multi-bar-panel").isVisible();
|
|
616
|
+
}
|
|
617
|
+
async clickOnActionButton({ testId: t, actionButtonId: e }) {
|
|
618
|
+
await this.page.getByTestId(
|
|
619
|
+
n(
|
|
620
|
+
t,
|
|
621
|
+
`${y.ACTION}-${e}`
|
|
622
|
+
)
|
|
623
|
+
).locator(".start-icon").click();
|
|
624
|
+
}
|
|
625
|
+
}
|
|
626
|
+
class tt {
|
|
627
|
+
constructor(t) {
|
|
628
|
+
s(this, "page");
|
|
629
|
+
this.page = t;
|
|
630
|
+
}
|
|
631
|
+
async waitForComponent({ testId: t }) {
|
|
632
|
+
const e = `[data-testid='${t}-${E.TEXT}']`;
|
|
633
|
+
await this.page.waitForSelector(e);
|
|
634
|
+
}
|
|
635
|
+
getFormRowTitle({ testId: t }) {
|
|
636
|
+
return new R(this.page).getLabelText({ testId: t });
|
|
637
|
+
}
|
|
638
|
+
isFormRowMandatory({ testId: t }) {
|
|
639
|
+
return new R(this.page).isMandatory({ testId: t });
|
|
640
|
+
}
|
|
641
|
+
getIconText({ testId: t }) {
|
|
642
|
+
return new O(this.page).getExtraText({ testId: t });
|
|
643
|
+
}
|
|
644
|
+
}
|
|
645
|
+
class et {
|
|
646
|
+
constructor(t) {
|
|
647
|
+
s(this, "page");
|
|
648
|
+
this.page = t;
|
|
649
|
+
}
|
|
650
|
+
async waitForComponent({ testId: t }) {
|
|
651
|
+
const e = `[data-testid='${t}-${d.CONTENT}']`;
|
|
652
|
+
await this.page.waitForSelector(e);
|
|
653
|
+
}
|
|
654
|
+
getCardTitle({ testId: t }) {
|
|
655
|
+
return this.page.getByTestId(n(t, d.TITLE)).textContent();
|
|
656
|
+
}
|
|
657
|
+
getCardContentText({ testId: t }) {
|
|
658
|
+
return this.page.getByTestId(n(t, d.CONTENT)).textContent();
|
|
659
|
+
}
|
|
660
|
+
async clickOnSaveButton({ testId: t }) {
|
|
661
|
+
await this.page.getByTestId(n(t, d.SAVE_BUTTON)).click();
|
|
662
|
+
}
|
|
663
|
+
async clickOnCancelButton({ testId: t }) {
|
|
664
|
+
await this.page.getByTestId(n(t, d.CANCEL_BUTTON)).click();
|
|
665
|
+
}
|
|
666
|
+
isSaveButtonLoading({ testId: t }) {
|
|
667
|
+
return new G(this.page).isButtonLoading({ testId: t });
|
|
668
|
+
}
|
|
669
|
+
}
|
|
670
|
+
class C extends _ {
|
|
671
|
+
constructor(t) {
|
|
672
|
+
super(t);
|
|
673
|
+
}
|
|
674
|
+
async waitForComponent({ testId: t }) {
|
|
675
|
+
const e = `[data-testid='${t}-${i.WRAPPER}']`;
|
|
676
|
+
await this.page.waitForSelector(e);
|
|
677
|
+
}
|
|
678
|
+
async isViewOnly({ testId: t }) {
|
|
679
|
+
return await this.page.getByTestId(n(t, i.WRAPPER)).locator(".view-only.input-type").count() > 0;
|
|
680
|
+
}
|
|
681
|
+
getLabel({ testId: t }) {
|
|
682
|
+
return this.page.getByTestId(n(t, i.LABEL_TEXT)).textContent();
|
|
683
|
+
}
|
|
684
|
+
isInputMandatory({ testId: t }) {
|
|
685
|
+
return this.page.getByTestId(n(t, i.MANDATORY)).isVisible();
|
|
686
|
+
}
|
|
687
|
+
hasInputExtraHelpText({ testId: t }) {
|
|
688
|
+
return this.page.getByTestId(n(t, i.EXTRA_TEXT)).isVisible();
|
|
689
|
+
}
|
|
690
|
+
async getHelpIconText({ testId: t }) {
|
|
691
|
+
const e = await this.page.getByTestId(n(t, i.LABEL_CONTAINER)).locator(".v-popper.v-popper--theme-default");
|
|
692
|
+
return await e.hover(), e.getAttribute("text");
|
|
693
|
+
}
|
|
694
|
+
getInputExtraText({ testId: t }) {
|
|
695
|
+
return this.page.getByTestId(n(t, i.EXTRA_TEXT)).textContent();
|
|
696
|
+
}
|
|
697
|
+
getErrorExtraText({ testId: t }) {
|
|
698
|
+
return this.page.getByTestId(n(t, i.EXTRA_TEXT)).locator(".error").textContent();
|
|
699
|
+
}
|
|
700
|
+
async showPassword({ testId: t }) {
|
|
701
|
+
await this.isPasswordHidden({ testId: t }) && await this.clickOnPasswordButton({ testId: t });
|
|
702
|
+
}
|
|
703
|
+
async isPasswordHidden({ testId: t }) {
|
|
704
|
+
return await this.page.getByTestId(n(t, i.WRAPPER)).getAttribute("type") === "password";
|
|
705
|
+
}
|
|
706
|
+
async clickOnPasswordButton({ testId: t }) {
|
|
707
|
+
await (await this.page.getByTestId(n(t, i.WRAPPER)).locator(".password-visibility")).click();
|
|
708
|
+
}
|
|
709
|
+
}
|
|
710
|
+
class at {
|
|
711
|
+
constructor(t) {
|
|
712
|
+
s(this, "page");
|
|
713
|
+
this.page = t;
|
|
714
|
+
}
|
|
715
|
+
async waitForComponent({ testId: t }) {
|
|
716
|
+
const e = `[data-testid='${t}-${I.CONTAINER}']`;
|
|
717
|
+
await this.page.waitForSelector(e);
|
|
718
|
+
}
|
|
719
|
+
async searchInput({ testId: t, searchTerm: e }) {
|
|
720
|
+
await new C(this.page).addInput({ testId: t, text: e });
|
|
721
|
+
}
|
|
722
|
+
async clearInput({ testId: t }) {
|
|
723
|
+
await new C(this.page).clearInput({ testId: t });
|
|
724
|
+
}
|
|
725
|
+
async clickOnXButton({ testId: t }) {
|
|
726
|
+
await this.page.getByTestId(n(t, I.CLEAR)).locator(".icon-name--x-circle").click();
|
|
727
|
+
}
|
|
728
|
+
isDisabled({ testId: t }) {
|
|
729
|
+
return new C(this.page).isDisabled({ testId: t });
|
|
730
|
+
}
|
|
731
|
+
getSearchPlaceholder({ testId: t }) {
|
|
732
|
+
return new C(this.page).getPlaceholderText({ testId: t });
|
|
733
|
+
}
|
|
734
|
+
getSearchInputValue({ testId: t }) {
|
|
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;
|
|
640
773
|
}
|
|
641
774
|
}
|
|
642
775
|
export {
|
|
643
|
-
|
|
644
|
-
|
|
645
|
-
|
|
646
|
-
|
|
647
|
-
|
|
648
|
-
|
|
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,
|
|
649
784
|
R as FieldLabelComponent,
|
|
650
|
-
|
|
651
|
-
|
|
652
|
-
|
|
653
|
-
|
|
654
|
-
|
|
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
|
|
655
795
|
};
|