@ironsource/shared-ui-e2e 2.1.12-rc.37 → 2.1.12-rc.38
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 +283 -223
- package/shared-e2e-commands.umd.cjs +1 -1
- package/tests/components/date-range/date-range-component.d.ts +7 -8
- package/tests/components/date-range/date-range-page.d.ts +3 -5
- package/tests/components/date-range/types.d.ts +7 -0
- package/tsconfig.tsbuildinfo +1 -1
package/shared-e2e-commands.js
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
var j = Object.defineProperty;
|
|
2
2
|
var q = (a, t, e) => t in a ? j(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
-
var
|
|
4
|
-
var
|
|
3
|
+
var r = (a, t, e) => (q(a, typeof t != "symbol" ? t + "" : t, e), e);
|
|
4
|
+
var T = /* @__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))(T || {}), i = /* @__PURE__ */ ((a) => (a.TRIGGER = "dd-trigger", a.WRAPPER = "dd-wrapper", a.BUTTON = "dd-button", a.BUTTON_WRAPPER = "dd-button-wrapper", a.BUTTON_CONTENT = "dd-button-content", a.BUTTON_CONTENT_SUFFIX = "dd-button-content-suffix", a.BUTTON_CLEAR = "dd-button-clear", a.LABEL = "dd-label", a.LIST_CONTAINER = "dd-list-container", a.SEARCH = "dd-search", a.TITLE = "dd-title", a.ACTION_CANCEL = "dd-action-cancel", a.ACTION_APPLY = "dd-action-apply", a.ACTION_CLEAR_ALL = "dd-action-clear-all", a.HELPER_TEXT = "dd-helper-text", a.HELPER_TEXT_ERROR = "dd-helper-text-error", a.SELECT_ALL = "dd-select-all", a.NO_RESULT = "dd-no-result", a))(i || {}), S = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(S || {}), d = /* @__PURE__ */ ((a) => (a.WRAPPER = "alert-wrapper", a.TITLE = "alert-title", a.MESSAGE = "alert-message", a.ACTION_BUTTON = "alert-action-button", a.CLOSE_BUTTON = "alert-close-button", a))(d || {}), u = /* @__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))(u || {}), l = /* @__PURE__ */ ((a) => (a.WRAPPER = "input-wrapper", a.TOOLTIP = "input-tooltip", a.TOOLTIP_WITHOUT_ICON = "input-tooltip-without-icon", 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))(l || {}), v = /* @__PURE__ */ ((a) => (a.WRAPPER = "swicth-wrapper", a.BUTTON = "swicth-button", a.TEXT = "swicth-text", a))(v || {}), C = /* @__PURE__ */ ((a) => (a.WRAPPER = "ta-wrapper", a.LABEL = "ta-label", a.FIELD = "ta-field", a.TEXT = "ta-text", a))(C || {}), D = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(D || {}), g = /* @__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.PRE_SEARCH_HEADER = "tbl-pre-search-header", a))(g || {}), P = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(P || {}), m = /* @__PURE__ */ ((a) => (a.WRAPPER = "dr-wrapper", a.FIELD = "dr-field", a.TRIGGER = "dr-trigger", a.CONTAINER = "dr-container", a.MENU = "dr-menu", a.MESSAGE = "dr-message", a.ACTION_APPLY = "dr-action-apply", a.ACTION_CANCEL = "dr-action-cancel", a))(m || {}), A = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(A || {}), R = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(R || {}), E = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(E || {}), w = /* @__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))(w || {}), I = /* @__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))(I || {}), _ = /* @__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))(_ || {}), G = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))(G || {}), L = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(L || {}), h = /* @__PURE__ */ ((a) => (a.CONTAINER = "sortable-list-container", a.DRAGGABLE_LIST = "sortable-list-draggable-list", a.LOCKED_LIST = "sortable-list-locked-list", a))(h || {});
|
|
5
5
|
const z = (a, t) => {
|
|
6
6
|
const e = new URLSearchParams(a).toString();
|
|
7
7
|
return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
|
|
8
8
|
}, Q = (a, t = {}) => {
|
|
9
9
|
const e = [];
|
|
10
|
-
Object.entries(t).forEach(([
|
|
11
|
-
e.push(`${
|
|
10
|
+
Object.entries(t).forEach(([c, p]) => {
|
|
11
|
+
e.push(`${c}:${p}`);
|
|
12
12
|
});
|
|
13
13
|
const o = {
|
|
14
14
|
id: a,
|
|
@@ -19,26 +19,26 @@ const z = (a, t) => {
|
|
|
19
19
|
}, n = (a, t) => `${a}-${t}`;
|
|
20
20
|
class it {
|
|
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}-${S.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, S.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, S.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
|
|
34
34
|
}
|
|
35
35
|
}
|
|
36
36
|
class ct {
|
|
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 = {}) {
|
|
@@ -56,7 +56,7 @@ class ct {
|
|
|
56
56
|
}
|
|
57
57
|
class rt {
|
|
58
58
|
constructor(t) {
|
|
59
|
-
|
|
59
|
+
r(this, "page");
|
|
60
60
|
this.page = t;
|
|
61
61
|
}
|
|
62
62
|
async waitForComponent({ testId: t }) {
|
|
@@ -104,9 +104,9 @@ class rt {
|
|
|
104
104
|
);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
|
-
class
|
|
107
|
+
class Y {
|
|
108
108
|
constructor(t) {
|
|
109
|
-
|
|
109
|
+
r(this, "page");
|
|
110
110
|
this.page = t;
|
|
111
111
|
}
|
|
112
112
|
async waitForComponent({ testId: t }) {
|
|
@@ -162,45 +162,45 @@ class U {
|
|
|
162
162
|
return (await this.page.getByTestId(n(t, i.BUTTON_WRAPPER)).getAttribute("class")).includes("state-error");
|
|
163
163
|
}
|
|
164
164
|
}
|
|
165
|
-
class
|
|
165
|
+
class b {
|
|
166
166
|
constructor(t) {
|
|
167
|
-
|
|
167
|
+
r(this, "page");
|
|
168
168
|
this.page = t;
|
|
169
169
|
}
|
|
170
170
|
getLabelText({ testId: t }) {
|
|
171
|
-
return this.page.getByTestId(n(t,
|
|
171
|
+
return this.page.getByTestId(n(t, R.TEXT)).textContent();
|
|
172
172
|
}
|
|
173
173
|
isMandatory({ testId: t }) {
|
|
174
|
-
return this.page.getByTestId(n(t,
|
|
174
|
+
return this.page.getByTestId(n(t, R.MANDATORY)).isVisible();
|
|
175
175
|
}
|
|
176
176
|
async getHelpIconText({ testId: t }) {
|
|
177
177
|
const e = await this.page.getByTestId(
|
|
178
|
-
n(t,
|
|
178
|
+
n(t, R.TOOLTIP)
|
|
179
179
|
);
|
|
180
180
|
return await e.hover(), e.getAttribute("text");
|
|
181
181
|
}
|
|
182
182
|
}
|
|
183
|
-
class
|
|
183
|
+
class H {
|
|
184
184
|
constructor(t) {
|
|
185
|
-
|
|
185
|
+
r(this, "page");
|
|
186
186
|
this.page = t;
|
|
187
187
|
}
|
|
188
188
|
hasExtraText({ testId: t }) {
|
|
189
|
-
return this.page.getByTestId(n(t,
|
|
189
|
+
return this.page.getByTestId(n(t, E.TEXT)).isVisible();
|
|
190
190
|
}
|
|
191
191
|
getExtraText({ testId: t }) {
|
|
192
|
-
return this.page.getByTestId(n(t,
|
|
192
|
+
return this.page.getByTestId(n(t, E.TEXT)).textContent();
|
|
193
193
|
}
|
|
194
194
|
async hasExtraTextIconType({ testId: t, type: e }) {
|
|
195
|
-
return await (await this.page.getByTestId(n(t,
|
|
195
|
+
return await (await this.page.getByTestId(n(t, E.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
|
|
196
196
|
}
|
|
197
197
|
}
|
|
198
|
-
class Z extends
|
|
198
|
+
class Z extends Y {
|
|
199
199
|
constructor(e) {
|
|
200
200
|
super(e);
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
this.fieldLabelComponent = new
|
|
201
|
+
r(this, "fieldLabelComponent");
|
|
202
|
+
r(this, "fieldHelpTextComponent");
|
|
203
|
+
this.fieldLabelComponent = new b(e), this.fieldHelpTextComponent = new H(e);
|
|
204
204
|
}
|
|
205
205
|
getDropdownTitle({ testId: e }) {
|
|
206
206
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
@@ -225,18 +225,18 @@ class Z extends U {
|
|
|
225
225
|
if (await this.page.getByTestId(
|
|
226
226
|
n(e, i.BUTTON_CONTENT_SUFFIX)
|
|
227
227
|
).isVisible({ timeout: 1e3 })) {
|
|
228
|
-
const
|
|
228
|
+
const p = await this.page.getByTestId(
|
|
229
229
|
n(e, i.BUTTON_CONTENT_SUFFIX)
|
|
230
230
|
).textContent();
|
|
231
|
-
s = `${s}${
|
|
231
|
+
s = `${s}${p}`;
|
|
232
232
|
}
|
|
233
233
|
return s;
|
|
234
234
|
}
|
|
235
235
|
async searchForItem({ testId: e, searchTerm: o }) {
|
|
236
|
-
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e,
|
|
236
|
+
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, l.FIELD)).fill(o), this.page.getByTestId(n(e, i.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
237
237
|
}
|
|
238
238
|
async isErrorText({ testId: e }) {
|
|
239
|
-
return await this.page.getByTestId(n(e,
|
|
239
|
+
return await this.page.getByTestId(n(e, E.TEXT)).count() > 0;
|
|
240
240
|
}
|
|
241
241
|
async isDisabled({ testId: e }) {
|
|
242
242
|
return (await this.page.getByTestId(n(e, i.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
@@ -254,7 +254,7 @@ class Z extends U {
|
|
|
254
254
|
return this.page.getByTestId(n(e, i.LIST_CONTAINER)).locator(".list").allTextContents();
|
|
255
255
|
}
|
|
256
256
|
}
|
|
257
|
-
class lt extends
|
|
257
|
+
class lt extends Y {
|
|
258
258
|
constructor(t) {
|
|
259
259
|
super(t);
|
|
260
260
|
}
|
|
@@ -265,111 +265,111 @@ class lt extends U {
|
|
|
265
265
|
return this.page.getByTestId(n(t, i.TRIGGER)).locator("button > span").textContent();
|
|
266
266
|
}
|
|
267
267
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
268
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
268
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, D.FIELD)).fill(e), this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
271
|
class pt {
|
|
272
272
|
constructor(t) {
|
|
273
|
-
|
|
273
|
+
r(this, "page");
|
|
274
274
|
this.page = t;
|
|
275
275
|
}
|
|
276
276
|
async waitForComponent({ testId: t }) {
|
|
277
|
-
const e = `[data-testid='${t}-${
|
|
277
|
+
const e = `[data-testid='${t}-${T.TRIGGER}']`;
|
|
278
278
|
await this.page.waitForSelector(e);
|
|
279
279
|
}
|
|
280
280
|
async clickOnApply(t) {
|
|
281
281
|
await this.page.getByTestId(
|
|
282
|
-
n(t,
|
|
282
|
+
n(t, T.ACTION_APPLY)
|
|
283
283
|
).click();
|
|
284
284
|
}
|
|
285
285
|
async clickOnCancel(t) {
|
|
286
286
|
await this.page.getByTestId(
|
|
287
|
-
n(t,
|
|
287
|
+
n(t, T.ACTION_CANCEL)
|
|
288
288
|
).click();
|
|
289
289
|
}
|
|
290
290
|
async openIncludeExcludeComponent(t) {
|
|
291
|
-
await this.page.getByTestId(n(t,
|
|
291
|
+
await this.page.getByTestId(n(t, T.TRIGGER)).click();
|
|
292
292
|
}
|
|
293
293
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
294
|
-
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
294
|
+
return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.SEARCH)).locator("input.transparent").fill(e), this.page.getByTestId(n(t, T.LIST)).locator("ul > li .v-popper span").first().textContent();
|
|
295
295
|
}
|
|
296
296
|
async selectItemByName({ testId: t, entityName: e }) {
|
|
297
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
297
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.LIST)).locator("ul > li .v-popper span", { hasText: e }).first().click(), await this.clickOnApply(t);
|
|
298
298
|
}
|
|
299
299
|
async selectItemByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
300
|
-
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
300
|
+
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.LIST)).locator(".include-exclude-list ul > li").nth(e).click(), await this.page.waitForSelector("include-exclude-list-header-loading", {
|
|
301
301
|
state: "hidden"
|
|
302
302
|
}), o && await this.clickOnApply(t);
|
|
303
303
|
}
|
|
304
304
|
async selectMultipleItems({ testId: t, itemsToSelect: e }) {
|
|
305
305
|
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t);
|
|
306
306
|
for (const o of e)
|
|
307
|
-
await this.page.getByTestId(n(t,
|
|
307
|
+
await this.page.getByTestId(n(t, T.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
|
|
308
308
|
}
|
|
309
309
|
async unselectItemByName({ testId: t, entityName: e }) {
|
|
310
310
|
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(
|
|
311
|
-
n(t,
|
|
311
|
+
n(t, T.LIST_SELECTED)
|
|
312
312
|
).locator("ul > li", { hasText: e }).locator(".clear-button").click(), await this.clickOnApply(t);
|
|
313
313
|
}
|
|
314
314
|
async unselectByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
315
315
|
await this.page.getByTestId(
|
|
316
|
-
n(t,
|
|
316
|
+
n(t, T.LIST_SELECTED)
|
|
317
317
|
).locator("ul li button").nth(e).click(), o && await this.clickOnApply(t);
|
|
318
318
|
}
|
|
319
319
|
async getSelectedCounter(t) {
|
|
320
320
|
return await this.page.getByTestId(
|
|
321
|
-
n(t,
|
|
321
|
+
n(t, T.LIST_SELECTED)
|
|
322
322
|
).locator(".include-exclude-selected-header-left span").textContent();
|
|
323
323
|
}
|
|
324
324
|
async clearAll({ testId: t }) {
|
|
325
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
325
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.CLEAR_ALL)).click(), await this.clickOnApply(t);
|
|
326
326
|
}
|
|
327
327
|
getTriggerText({ testId: t }) {
|
|
328
|
-
return this.page.getByTestId(n(t,
|
|
328
|
+
return this.page.getByTestId(n(t, T.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
|
|
329
329
|
}
|
|
330
330
|
getTriggerDescription({ testId: t }) {
|
|
331
|
-
return this.page.getByTestId(n(t,
|
|
331
|
+
return this.page.getByTestId(n(t, T.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
|
|
332
332
|
}
|
|
333
333
|
async selectAll({ testId: t }) {
|
|
334
|
-
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t,
|
|
334
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, T.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
335
335
|
}
|
|
336
336
|
}
|
|
337
|
-
class
|
|
337
|
+
class J {
|
|
338
338
|
constructor(t) {
|
|
339
|
-
|
|
339
|
+
r(this, "page");
|
|
340
340
|
this.page = t;
|
|
341
341
|
}
|
|
342
342
|
getInputsFieldText({ testId: t }) {
|
|
343
|
-
return this.page.getByTestId(n(t,
|
|
343
|
+
return this.page.getByTestId(n(t, l.FIELD)).inputValue();
|
|
344
344
|
}
|
|
345
345
|
getPlaceholderText({ testId: t }) {
|
|
346
|
-
return this.page.getByTestId(n(t,
|
|
346
|
+
return this.page.getByTestId(n(t, l.FIELD)).getAttribute("placeholder");
|
|
347
347
|
}
|
|
348
348
|
getInputsType({ testId: t }) {
|
|
349
|
-
return this.page.getByTestId(n(t,
|
|
349
|
+
return this.page.getByTestId(n(t, l.FIELD)).getAttribute("type");
|
|
350
350
|
}
|
|
351
351
|
async addInput({ testId: t, text: e }) {
|
|
352
|
-
await this.page.getByTestId(n(t,
|
|
352
|
+
await this.page.getByTestId(n(t, l.FIELD)).type(e);
|
|
353
353
|
}
|
|
354
354
|
async clearInput({ testId: t }) {
|
|
355
|
-
await this.page.getByTestId(n(t,
|
|
355
|
+
await this.page.getByTestId(n(t, l.FIELD)).clear();
|
|
356
356
|
}
|
|
357
357
|
isDisabled({ testId: t }) {
|
|
358
|
-
return this.page.getByTestId(n(t,
|
|
358
|
+
return this.page.getByTestId(n(t, l.FIELD)).isDisabled();
|
|
359
359
|
}
|
|
360
360
|
}
|
|
361
|
-
class gt extends
|
|
361
|
+
class gt extends J {
|
|
362
362
|
constructor(e) {
|
|
363
363
|
super(e);
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
this.fieldLabelComponent = new
|
|
364
|
+
r(this, "fieldLabelComponent");
|
|
365
|
+
r(this, "fieldHelpTextComponent");
|
|
366
|
+
this.fieldLabelComponent = new b(e), this.fieldHelpTextComponent = new H(e);
|
|
367
367
|
}
|
|
368
368
|
getInputsLabelText({ testId: e }) {
|
|
369
369
|
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
370
370
|
}
|
|
371
371
|
async waitForComponent({ testId: e }) {
|
|
372
|
-
const o = `[data-testid='${e}-${
|
|
372
|
+
const o = `[data-testid='${e}-${l.WRAPPER}']`;
|
|
373
373
|
await this.page.waitForSelector(o);
|
|
374
374
|
}
|
|
375
375
|
isInputMandatory({ testId: e }) {
|
|
@@ -382,7 +382,7 @@ class gt extends V {
|
|
|
382
382
|
return this.fieldHelpTextComponent.getExtraText({ testId: e });
|
|
383
383
|
}
|
|
384
384
|
async clickOnApplyButton({ testId: e }) {
|
|
385
|
-
await (await this.page.getByTestId(n(e,
|
|
385
|
+
await (await this.page.getByTestId(n(e, l.WRAPPER)).locator(".icon.icon-name--check")).click();
|
|
386
386
|
}
|
|
387
387
|
hasInlineErrorText({
|
|
388
388
|
testId: e,
|
|
@@ -403,17 +403,17 @@ class gt extends V {
|
|
|
403
403
|
await this.isPasswordHidden({ testId: e }) && await this.clickOnPasswordIcon({ testId: e });
|
|
404
404
|
}
|
|
405
405
|
async clickOnPasswordIcon({ testId: e }) {
|
|
406
|
-
await this.page.getByTestId(n(e,
|
|
406
|
+
await this.page.getByTestId(n(e, l.TOGGLE_PASSWORD)).click();
|
|
407
407
|
}
|
|
408
408
|
async clickOnHidePassword({ testId: e }) {
|
|
409
409
|
await this.isPasswordHidden({ testId: e }) || await this.clickOnPasswordIcon({ testId: e });
|
|
410
410
|
}
|
|
411
411
|
isPasswordHidden({ testId: e }) {
|
|
412
|
-
return this.page.getByTestId(n(e,
|
|
412
|
+
return this.page.getByTestId(n(e, l.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
|
|
413
413
|
}
|
|
414
414
|
async clearInput({ testId: e }) {
|
|
415
415
|
await (await this.page.getByTestId(
|
|
416
|
-
n(e,
|
|
416
|
+
n(e, l.FIELD)
|
|
417
417
|
)).clear();
|
|
418
418
|
}
|
|
419
419
|
hasExtraTextIconType({ testId: e, type: o }) {
|
|
@@ -421,11 +421,11 @@ class gt extends V {
|
|
|
421
421
|
}
|
|
422
422
|
async isDisabled({ testId: e }) {
|
|
423
423
|
return (await this.page.getByTestId(
|
|
424
|
-
n(e,
|
|
424
|
+
n(e, l.FIELD)
|
|
425
425
|
)).isDisabled();
|
|
426
426
|
}
|
|
427
427
|
hasApplyButton({ testId: e }) {
|
|
428
|
-
return this.page.getByTestId(n(e,
|
|
428
|
+
return this.page.getByTestId(n(e, l.WRAPPER)).locator(".icon.icon-name--check").isVisible();
|
|
429
429
|
}
|
|
430
430
|
async getMaxLengthNumber({ testId: e }) {
|
|
431
431
|
return (await this.getFontCaptionText({ testId: e }))[1];
|
|
@@ -434,97 +434,97 @@ class gt extends V {
|
|
|
434
434
|
return (await this.getFontCaptionText({ testId: e }))[0];
|
|
435
435
|
}
|
|
436
436
|
async getFontCaptionText({ testId: e }) {
|
|
437
|
-
return (await this.page.getByTestId(n(e,
|
|
437
|
+
return (await this.page.getByTestId(n(e, l.WRAPPER)).locator(".font-caption").textContent()).split("/").map((s) => parseInt(s.trim(), 10));
|
|
438
438
|
}
|
|
439
439
|
getHelpIconText({ testId: e }) {
|
|
440
440
|
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
441
441
|
}
|
|
442
442
|
async isValidationAppear({ testId: e }) {
|
|
443
|
-
return (await this.page.getByTestId(n(e,
|
|
443
|
+
return (await this.page.getByTestId(n(e, l.WRAPPER)).getAttribute("class")).includes("variant-error");
|
|
444
444
|
}
|
|
445
445
|
}
|
|
446
446
|
class Tt {
|
|
447
447
|
constructor(t) {
|
|
448
|
-
|
|
448
|
+
r(this, "page");
|
|
449
449
|
this.page = t;
|
|
450
450
|
}
|
|
451
451
|
async waitForComponent({ testId: t }) {
|
|
452
|
-
const e = `[data-testid='${t}-${
|
|
452
|
+
const e = `[data-testid='${t}-${A.WRAPPER}']`;
|
|
453
453
|
await this.page.waitForSelector(e);
|
|
454
454
|
}
|
|
455
455
|
getSelectedTabText({ testId: t }) {
|
|
456
|
-
return this.page.getByTestId(n(t,
|
|
456
|
+
return this.page.getByTestId(n(t, A.WRAPPER)).locator(".tab-item--active").textContent();
|
|
457
457
|
}
|
|
458
458
|
async selectTab({ testId: t, tabName: e }) {
|
|
459
459
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
460
460
|
await this.page.getByTestId(
|
|
461
|
-
n(t, `${
|
|
461
|
+
n(t, `${A.TAB}-${o + 1}`)
|
|
462
462
|
).click();
|
|
463
463
|
}
|
|
464
464
|
async getTabIndex({ testId: t, tabName: e }) {
|
|
465
|
-
return (await this.page.getByTestId(n(t,
|
|
465
|
+
return (await this.page.getByTestId(n(t, A.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
|
|
466
466
|
}
|
|
467
467
|
async isTabDisabled({ testId: t, tabName: e }) {
|
|
468
468
|
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
469
|
-
return this.page.getByTestId(n(t, `${
|
|
469
|
+
return this.page.getByTestId(n(t, `${A.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
|
|
470
470
|
}
|
|
471
471
|
}
|
|
472
472
|
class ht {
|
|
473
473
|
constructor(t) {
|
|
474
|
-
|
|
474
|
+
r(this, "page");
|
|
475
475
|
this.page = t;
|
|
476
476
|
}
|
|
477
477
|
async waitForComponent({ testId: t }) {
|
|
478
|
-
const e = `[data-testid='${t}-${
|
|
478
|
+
const e = `[data-testid='${t}-${P.TRIGGER}']`;
|
|
479
479
|
await this.page.waitForSelector(e);
|
|
480
480
|
}
|
|
481
481
|
getTooltipText({ testId: t }) {
|
|
482
|
-
return this.page.getByTestId(`${t}-${
|
|
482
|
+
return this.page.getByTestId(`${t}-${P.TRIGGER}`).getAttribute("text");
|
|
483
483
|
}
|
|
484
484
|
getTooltipHeaderText({ testId: t }) {
|
|
485
|
-
return this.page.getByTestId(`${t}-${
|
|
485
|
+
return this.page.getByTestId(`${t}-${P.TRIGGER}`).getAttribute("header");
|
|
486
486
|
}
|
|
487
487
|
}
|
|
488
|
-
const
|
|
488
|
+
const x = ".table-row", $ = ".icon-wrapper", V = ".states", f = ".table-head-container", X = ".table-row.loading", M = 1e3;
|
|
489
489
|
class ut {
|
|
490
490
|
constructor(t) {
|
|
491
|
-
|
|
491
|
+
r(this, "page");
|
|
492
492
|
this.page = t;
|
|
493
493
|
}
|
|
494
494
|
async waitForComponent({ testId: t }) {
|
|
495
|
-
const e = `[data-testid='${t}-${
|
|
495
|
+
const e = `[data-testid='${t}-${g.CONTAINER}']`;
|
|
496
496
|
await this.page.waitForSelector(e);
|
|
497
497
|
}
|
|
498
498
|
getTableRowCount({ testId: t }) {
|
|
499
|
-
return this.page.getByTestId(n(t,
|
|
499
|
+
return this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x).count();
|
|
500
500
|
}
|
|
501
501
|
async getColumnHeaders({ testId: t }) {
|
|
502
|
-
return this.page.getByTestId(n(t,
|
|
502
|
+
return this.page.getByTestId(n(t, g.TABLE)).locator(f).allTextContents();
|
|
503
503
|
}
|
|
504
504
|
getTableLabel({ testId: t }) {
|
|
505
|
-
return this.page.getByTestId(n(t,
|
|
505
|
+
return this.page.getByTestId(n(t, g.HEADER)).innerText();
|
|
506
506
|
}
|
|
507
507
|
getTableFooter({ testId: t }) {
|
|
508
|
-
return this.page.getByTestId(n(t,
|
|
508
|
+
return this.page.getByTestId(n(t, g.CONTAINER)).locator(".table-footer").innerText();
|
|
509
509
|
}
|
|
510
510
|
async clickOnHeaderByName(t) {
|
|
511
|
-
await this.page.locator(
|
|
511
|
+
await this.page.locator(f, {
|
|
512
512
|
hasText: t
|
|
513
513
|
}).click();
|
|
514
514
|
}
|
|
515
515
|
async searchForItems({ testId: t, searchTerm: e }) {
|
|
516
|
-
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t,
|
|
516
|
+
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, l.FIELD)).fill(e);
|
|
517
517
|
}
|
|
518
518
|
async clearSearchText({ testId: t }) {
|
|
519
|
-
await this.page.getByTestId(n(t,
|
|
519
|
+
await this.page.getByTestId(n(t, l.FIELD)).clear(), await this.waitForTableToLoad();
|
|
520
520
|
}
|
|
521
521
|
isArrowVisible({ testId: t, headerName: e }) {
|
|
522
|
-
return this.page.getByTestId(n(t,
|
|
522
|
+
return this.page.getByTestId(n(t, g.TABLE)).locator(f, { hasText: e }).locator(".table-sort-icon").isVisible();
|
|
523
523
|
}
|
|
524
524
|
async scrollDownTableRows({ testId: t }) {
|
|
525
525
|
const e = `[data-testid=${n(
|
|
526
526
|
t,
|
|
527
|
-
|
|
527
|
+
g.TABLE
|
|
528
528
|
)}]`;
|
|
529
529
|
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
530
530
|
const s = document.querySelector(o);
|
|
@@ -532,48 +532,48 @@ class ut {
|
|
|
532
532
|
}, e), await this.page.waitForTimeout(M);
|
|
533
533
|
}
|
|
534
534
|
async waitForTableToLoad() {
|
|
535
|
-
await this.page.waitForSelector(
|
|
535
|
+
await this.page.waitForSelector(X, {
|
|
536
536
|
state: "hidden"
|
|
537
537
|
});
|
|
538
538
|
}
|
|
539
539
|
async waitingForTableLoadingToAppear() {
|
|
540
|
-
await this.page.waitForSelector(
|
|
540
|
+
await this.page.waitForSelector(X);
|
|
541
541
|
}
|
|
542
542
|
async expandRow({ testId: t, rowValue: e }) {
|
|
543
|
-
await this.page.getByTestId(n(t,
|
|
543
|
+
await this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x, { hasText: e }).locator($).click();
|
|
544
544
|
}
|
|
545
545
|
isRowExpanded({ testId: t, rowValue: e }) {
|
|
546
|
-
return this.page.getByTestId(n(t,
|
|
546
|
+
return this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x, { hasText: e }).locator($).isVisible();
|
|
547
547
|
}
|
|
548
548
|
async getExpandedRowContent({ testId: t, rowValue: e }) {
|
|
549
549
|
return await this.isRowExpanded({
|
|
550
550
|
testId: t,
|
|
551
551
|
rowValue: e
|
|
552
|
-
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t,
|
|
552
|
+
}) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, g.BODY_WRAPPER)).locator(x, { hasText: e }).locator($).textContent();
|
|
553
553
|
}
|
|
554
554
|
isEmptyStateVisible({ testId: t }) {
|
|
555
|
-
return this.page.getByTestId(n(t,
|
|
555
|
+
return this.page.getByTestId(n(t, g.TABLE)).locator(".empty-state").isVisible();
|
|
556
556
|
}
|
|
557
557
|
getEmptyStateTitle({ testId: t }) {
|
|
558
|
-
return this.page.getByTestId(n(t,
|
|
558
|
+
return this.page.getByTestId(n(t, g.TABLE)).locator(".font-heading-4.title").textContent();
|
|
559
559
|
}
|
|
560
560
|
getEmptyStateSubtitle({ testId: t }) {
|
|
561
|
-
return this.page.getByTestId(n(t,
|
|
561
|
+
return this.page.getByTestId(n(t, g.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
562
562
|
}
|
|
563
563
|
async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
|
|
564
|
-
await this.page.getByTestId(n(t,
|
|
564
|
+
await this.page.getByTestId(n(t, g.TABLE)).locator(x, {
|
|
565
565
|
hasText: e
|
|
566
|
-
}).locator(
|
|
566
|
+
}).locator(V).click();
|
|
567
567
|
}
|
|
568
568
|
getCheckedRowsNumber({ testId: t }) {
|
|
569
|
-
return this.page.getByTestId(n(t,
|
|
569
|
+
return this.page.getByTestId(n(t, g.TABLE)).locator(x).locator(".icon.checked").count();
|
|
570
570
|
}
|
|
571
571
|
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
572
|
-
await this.page.getByTestId(n(t,
|
|
572
|
+
await this.page.getByTestId(n(t, g.TABLE)).locator(V).nth(0).click();
|
|
573
573
|
}
|
|
574
574
|
getTableLocator({ testId: t }) {
|
|
575
575
|
return this.page.getByTestId(
|
|
576
|
-
n(t,
|
|
576
|
+
n(t, g.CONTAINER)
|
|
577
577
|
);
|
|
578
578
|
}
|
|
579
579
|
getColumnContentByHeaderName({ testId: t, headerName: e }) {
|
|
@@ -582,7 +582,7 @@ class ut {
|
|
|
582
582
|
}
|
|
583
583
|
class tt {
|
|
584
584
|
constructor(t) {
|
|
585
|
-
|
|
585
|
+
r(this, "page");
|
|
586
586
|
this.page = t;
|
|
587
587
|
}
|
|
588
588
|
async waitForComponent({ testId: t }) {
|
|
@@ -604,89 +604,89 @@ class tt {
|
|
|
604
604
|
}
|
|
605
605
|
class dt {
|
|
606
606
|
constructor(t) {
|
|
607
|
-
|
|
607
|
+
r(this, "page");
|
|
608
608
|
this.page = t;
|
|
609
609
|
}
|
|
610
610
|
async waitForComponent({ testId: t }) {
|
|
611
|
-
const e = `[data-testid='${t}-${
|
|
611
|
+
const e = `[data-testid='${t}-${w.CONTAINER}']`;
|
|
612
612
|
await this.page.waitForSelector(e);
|
|
613
613
|
}
|
|
614
614
|
getSnackbarTitle({ testId: t }) {
|
|
615
|
-
return this.page.getByTestId(n(t,
|
|
615
|
+
return this.page.getByTestId(n(t, w.TITLE)).textContent();
|
|
616
616
|
}
|
|
617
617
|
async closeSnackbar({ testId: t }) {
|
|
618
|
-
await this.page.getByTestId(n(t,
|
|
618
|
+
await this.page.getByTestId(n(t, w.CLOSE)).locator(".icon-name--x").click();
|
|
619
619
|
}
|
|
620
620
|
async waitForSnackbarToBeClosed({ testId: t }) {
|
|
621
|
-
const e = `[data-testid='${t}-${
|
|
621
|
+
const e = `[data-testid='${t}-${w.CONTAINER}']`;
|
|
622
622
|
await this.page.waitForSelector(e, { state: "detached" });
|
|
623
623
|
}
|
|
624
624
|
getSnackbarDescription({ testId: t }) {
|
|
625
|
-
return this.page.getByTestId(n(t,
|
|
625
|
+
return this.page.getByTestId(n(t, w.MESSAGE)).textContent();
|
|
626
626
|
}
|
|
627
627
|
async clickOnActionButton({ testId: t, buttonName: e }) {
|
|
628
628
|
const o = await this.getActionButtonIndex({
|
|
629
629
|
testId: t,
|
|
630
630
|
buttonName: e
|
|
631
|
-
}), s = `[data-testid='${t}-${
|
|
631
|
+
}), s = `[data-testid='${t}-${w.ACTION_BUTTON}-${o}']`;
|
|
632
632
|
await this.page.click(s);
|
|
633
633
|
}
|
|
634
634
|
async getActionButtonIndex({
|
|
635
635
|
testId: t,
|
|
636
636
|
buttonName: e
|
|
637
637
|
}) {
|
|
638
|
-
return (await this.page.getByTestId(n(t,
|
|
638
|
+
return (await this.page.getByTestId(n(t, w.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
|
|
639
639
|
}
|
|
640
640
|
}
|
|
641
641
|
class yt {
|
|
642
642
|
constructor(t) {
|
|
643
|
-
|
|
643
|
+
r(this, "page");
|
|
644
644
|
this.page = t;
|
|
645
645
|
}
|
|
646
646
|
async waitForComponent({ testId: t }) {
|
|
647
|
-
const e = `[data-testid='${t}-${
|
|
647
|
+
const e = `[data-testid='${t}-${L.WRAPPER}']`;
|
|
648
648
|
await this.page.waitForSelector(e);
|
|
649
649
|
}
|
|
650
650
|
async closeMultiBar({ testId: t }) {
|
|
651
|
-
await this.page.getByTestId(n(t,
|
|
651
|
+
await this.page.getByTestId(n(t, L.CLOSE_BTN)).locator(".icon-wrapper").click();
|
|
652
652
|
}
|
|
653
653
|
getMultiBarCountText({ testId: t }) {
|
|
654
|
-
return this.page.getByTestId(n(t,
|
|
654
|
+
return this.page.getByTestId(n(t, L.WRAPPER)).locator(".count-text").textContent();
|
|
655
655
|
}
|
|
656
656
|
async isMultiBarVisible({ testId: t }) {
|
|
657
|
-
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t,
|
|
657
|
+
return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, L.WRAPPER)).locator(".multi-bar-panel").isVisible();
|
|
658
658
|
}
|
|
659
659
|
async clickOnActionButton({ testId: t, actionButtonId: e }) {
|
|
660
660
|
await this.page.getByTestId(
|
|
661
661
|
n(
|
|
662
662
|
t,
|
|
663
|
-
`${
|
|
663
|
+
`${L.ACTION}-${e}`
|
|
664
664
|
)
|
|
665
665
|
).locator(".start-icon").click();
|
|
666
666
|
}
|
|
667
667
|
}
|
|
668
668
|
class wt {
|
|
669
669
|
constructor(t) {
|
|
670
|
-
|
|
670
|
+
r(this, "page");
|
|
671
671
|
this.page = t;
|
|
672
672
|
}
|
|
673
673
|
async waitForComponent({ testId: t }) {
|
|
674
|
-
const e = `[data-testid='${t}-${
|
|
674
|
+
const e = `[data-testid='${t}-${R.TEXT}']`;
|
|
675
675
|
await this.page.waitForSelector(e);
|
|
676
676
|
}
|
|
677
677
|
getFormRowTitle({ testId: t }) {
|
|
678
|
-
return new
|
|
678
|
+
return new b(this.page).getLabelText({ testId: t });
|
|
679
679
|
}
|
|
680
680
|
isFormRowMandatory({ testId: t }) {
|
|
681
|
-
return new
|
|
681
|
+
return new b(this.page).isMandatory({ testId: t });
|
|
682
682
|
}
|
|
683
683
|
getIconText({ testId: t }) {
|
|
684
|
-
return new
|
|
684
|
+
return new H(this.page).getExtraText({ testId: t });
|
|
685
685
|
}
|
|
686
686
|
}
|
|
687
687
|
class Et {
|
|
688
688
|
constructor(t) {
|
|
689
|
-
|
|
689
|
+
r(this, "page");
|
|
690
690
|
this.page = t;
|
|
691
691
|
}
|
|
692
692
|
async waitForComponent({ testId: t }) {
|
|
@@ -700,7 +700,7 @@ class Et {
|
|
|
700
700
|
return this.page.getByTestId(n(t, I.CONTENT)).textContent();
|
|
701
701
|
}
|
|
702
702
|
getCardLabelText({ testId: t }) {
|
|
703
|
-
return new
|
|
703
|
+
return new b(this.page).getLabelText({ testId: t });
|
|
704
704
|
}
|
|
705
705
|
async clickOnSaveButton({ testId: t }) {
|
|
706
706
|
await this.page.getByTestId(n(t, I.SAVE_BUTTON)).click();
|
|
@@ -720,98 +720,98 @@ class Et {
|
|
|
720
720
|
).all()).forEach((s) => s.clear());
|
|
721
721
|
}
|
|
722
722
|
}
|
|
723
|
-
class
|
|
723
|
+
class O extends J {
|
|
724
724
|
constructor(t) {
|
|
725
725
|
super(t);
|
|
726
726
|
}
|
|
727
727
|
async waitForComponent({ testId: t }) {
|
|
728
|
-
const e = `[data-testid='${t}-${
|
|
728
|
+
const e = `[data-testid='${t}-${l.WRAPPER}']`;
|
|
729
729
|
await this.page.waitForSelector(e);
|
|
730
730
|
}
|
|
731
731
|
async isViewOnly({ testId: t }) {
|
|
732
|
-
return await this.page.getByTestId(n(t,
|
|
732
|
+
return await this.page.getByTestId(n(t, l.WRAPPER)).locator(".view-only.input-type").count() > 0;
|
|
733
733
|
}
|
|
734
734
|
getLabel({ testId: t }) {
|
|
735
|
-
return this.page.getByTestId(n(t,
|
|
735
|
+
return this.page.getByTestId(n(t, l.LABEL_TEXT)).textContent();
|
|
736
736
|
}
|
|
737
737
|
isInputMandatory({ testId: t }) {
|
|
738
|
-
return this.page.getByTestId(n(t,
|
|
738
|
+
return this.page.getByTestId(n(t, l.MANDATORY)).isVisible();
|
|
739
739
|
}
|
|
740
740
|
hasInputExtraHelpText({ testId: t }) {
|
|
741
|
-
return this.page.getByTestId(n(t,
|
|
741
|
+
return this.page.getByTestId(n(t, l.EXTRA_TEXT)).isVisible();
|
|
742
742
|
}
|
|
743
743
|
async getHelpIconText({ testId: t }) {
|
|
744
|
-
const e = await this.page.getByTestId(n(t,
|
|
744
|
+
const e = await this.page.getByTestId(n(t, l.LABEL_CONTAINER)).locator(".v-popper.v-popper--theme-default");
|
|
745
745
|
return await e.hover(), e.getAttribute("text");
|
|
746
746
|
}
|
|
747
747
|
getInputExtraText({ testId: t }) {
|
|
748
|
-
return this.page.getByTestId(n(t,
|
|
748
|
+
return this.page.getByTestId(n(t, l.EXTRA_TEXT)).textContent();
|
|
749
749
|
}
|
|
750
750
|
getErrorExtraText({ testId: t }) {
|
|
751
|
-
return this.page.getByTestId(n(t,
|
|
751
|
+
return this.page.getByTestId(n(t, l.EXTRA_TEXT)).locator(".error").textContent();
|
|
752
752
|
}
|
|
753
753
|
async showPassword({ testId: t }) {
|
|
754
754
|
await this.isPasswordHidden({ testId: t }) && await this.clickOnPasswordButton({ testId: t });
|
|
755
755
|
}
|
|
756
756
|
async isPasswordHidden({ testId: t }) {
|
|
757
|
-
return await this.page.getByTestId(n(t,
|
|
757
|
+
return await this.page.getByTestId(n(t, l.WRAPPER)).getAttribute("type") === "password";
|
|
758
758
|
}
|
|
759
759
|
async clickOnPasswordButton({ testId: t }) {
|
|
760
|
-
await (await this.page.getByTestId(n(t,
|
|
760
|
+
await (await this.page.getByTestId(n(t, l.WRAPPER)).locator(".password-visibility")).click();
|
|
761
761
|
}
|
|
762
762
|
}
|
|
763
763
|
class Ct {
|
|
764
764
|
constructor(t) {
|
|
765
|
-
|
|
765
|
+
r(this, "page");
|
|
766
766
|
this.page = t;
|
|
767
767
|
}
|
|
768
768
|
async waitForComponent({ testId: t }) {
|
|
769
|
-
const e = `[data-testid='${t}-${
|
|
769
|
+
const e = `[data-testid='${t}-${D.CONTAINER}']`;
|
|
770
770
|
await this.page.waitForSelector(e);
|
|
771
771
|
}
|
|
772
772
|
async searchInput({ testId: t, searchTerm: e }) {
|
|
773
|
-
await new
|
|
773
|
+
await new O(this.page).addInput({ testId: t, text: e });
|
|
774
774
|
}
|
|
775
775
|
async clearInput({ testId: t }) {
|
|
776
|
-
await new
|
|
776
|
+
await new O(this.page).clearInput({ testId: t });
|
|
777
777
|
}
|
|
778
778
|
async clickOnXButton({ testId: t }) {
|
|
779
|
-
await this.page.getByTestId(n(t,
|
|
779
|
+
await this.page.getByTestId(n(t, D.CLEAR)).locator(".icon-name--x-circle").click();
|
|
780
780
|
}
|
|
781
781
|
isDisabled({ testId: t }) {
|
|
782
|
-
return new
|
|
782
|
+
return new O(this.page).isDisabled({ testId: t });
|
|
783
783
|
}
|
|
784
784
|
getSearchPlaceholder({ testId: t }) {
|
|
785
|
-
return new
|
|
785
|
+
return new O(this.page).getPlaceholderText({ testId: t });
|
|
786
786
|
}
|
|
787
787
|
getSearchInputValue({ testId: t }) {
|
|
788
|
-
return new
|
|
788
|
+
return new O(this.page).getInputsFieldText({ testId: t });
|
|
789
789
|
}
|
|
790
790
|
}
|
|
791
791
|
class et {
|
|
792
792
|
constructor(t) {
|
|
793
|
-
|
|
793
|
+
r(this, "page");
|
|
794
794
|
this.page = t;
|
|
795
795
|
}
|
|
796
796
|
async waitForComponent({ testId: t }) {
|
|
797
|
-
const e = `[data-testid='${t}-${
|
|
797
|
+
const e = `[data-testid='${t}-${G.TEXT}']`;
|
|
798
798
|
await this.page.waitForSelector(e);
|
|
799
799
|
}
|
|
800
800
|
getInlineCopyText({ testId: t }) {
|
|
801
|
-
return this.page.getByTestId(`${t}-${
|
|
801
|
+
return this.page.getByTestId(`${t}-${G.TEXT}`).textContent();
|
|
802
802
|
}
|
|
803
803
|
}
|
|
804
|
-
class
|
|
804
|
+
class mt {
|
|
805
805
|
constructor(t) {
|
|
806
|
-
|
|
806
|
+
r(this, "page");
|
|
807
807
|
this.page = t;
|
|
808
808
|
}
|
|
809
809
|
async waitForComponent({ testId: t }) {
|
|
810
|
-
const e = `[data-testid='${t}-${
|
|
810
|
+
const e = `[data-testid='${t}-${_.TITLE}']`;
|
|
811
811
|
await this.page.waitForSelector(e);
|
|
812
812
|
}
|
|
813
813
|
getHeaderTitle({ testId: t }) {
|
|
814
|
-
return this.page.getByTestId(`${t}-${
|
|
814
|
+
return this.page.getByTestId(`${t}-${_.TITLE}`).textContent();
|
|
815
815
|
}
|
|
816
816
|
getInlineCopyText({ testId: t }) {
|
|
817
817
|
return new et(this.page).getInlineCopyText({
|
|
@@ -822,12 +822,12 @@ class It {
|
|
|
822
822
|
testId: t,
|
|
823
823
|
iconName: e
|
|
824
824
|
}) {
|
|
825
|
-
return await this.page.getByTestId(`${t}-${
|
|
825
|
+
return await this.page.getByTestId(`${t}-${_.APP_PLATFORM}`).getAttribute("data-platform") === e;
|
|
826
826
|
}
|
|
827
827
|
}
|
|
828
|
-
class
|
|
828
|
+
class It {
|
|
829
829
|
constructor(t) {
|
|
830
|
-
|
|
830
|
+
r(this, "page");
|
|
831
831
|
this.page = t;
|
|
832
832
|
}
|
|
833
833
|
async waitForComponent({ testId: t }) {
|
|
@@ -860,38 +860,38 @@ class mt {
|
|
|
860
860
|
}
|
|
861
861
|
class at {
|
|
862
862
|
constructor(t) {
|
|
863
|
-
|
|
863
|
+
r(this, "page");
|
|
864
864
|
this.page = t;
|
|
865
865
|
}
|
|
866
866
|
async waitForComponent({ testId: t }) {
|
|
867
|
-
const e = `[data-testid='${t}-${
|
|
867
|
+
const e = `[data-testid='${t}-${C.FIELD}']`;
|
|
868
868
|
await this.page.waitForSelector(e);
|
|
869
869
|
}
|
|
870
870
|
async addInput({ testId: t, text: e }) {
|
|
871
|
-
await this.page.getByTestId(n(t,
|
|
871
|
+
await this.page.getByTestId(n(t, C.FIELD)).type(e);
|
|
872
872
|
}
|
|
873
873
|
async clearInput({ testId: t }) {
|
|
874
|
-
await this.page.getByTestId(n(t,
|
|
874
|
+
await this.page.getByTestId(n(t, C.FIELD)).clear();
|
|
875
875
|
}
|
|
876
876
|
getInput({ testId: t }) {
|
|
877
|
-
return this.page.getByTestId(n(t,
|
|
877
|
+
return this.page.getByTestId(n(t, C.FIELD)).inputValue();
|
|
878
878
|
}
|
|
879
879
|
getPlaceholderText({ testId: t }) {
|
|
880
|
-
return this.page.getByTestId(n(t,
|
|
880
|
+
return this.page.getByTestId(n(t, C.FIELD)).getAttribute("placeholder");
|
|
881
881
|
}
|
|
882
882
|
isDisabled({ testId: t }) {
|
|
883
|
-
return this.page.getByTestId(n(t,
|
|
883
|
+
return this.page.getByTestId(n(t, C.FIELD)).isDisabled();
|
|
884
884
|
}
|
|
885
885
|
}
|
|
886
886
|
class Bt extends at {
|
|
887
887
|
getLabelText({ testId: t }) {
|
|
888
|
-
return this.page.getByTestId(n(t,
|
|
888
|
+
return this.page.getByTestId(n(t, R.TEXT)).textContent();
|
|
889
889
|
}
|
|
890
890
|
hasFieldHelpText({ testId: t }) {
|
|
891
|
-
return this.page.getByTestId(n(t,
|
|
891
|
+
return this.page.getByTestId(n(t, E.CONTAINER)).isVisible();
|
|
892
892
|
}
|
|
893
893
|
getFieldHelpText({ testId: t }) {
|
|
894
|
-
return this.page.getByTestId(n(t,
|
|
894
|
+
return this.page.getByTestId(n(t, E.CONTAINER)).textContent();
|
|
895
895
|
}
|
|
896
896
|
}
|
|
897
897
|
class xt extends Z {
|
|
@@ -920,10 +920,10 @@ class xt extends Z {
|
|
|
920
920
|
return this.page.getByTestId(n(t, i.BUTTON_CONTENT)).textContent();
|
|
921
921
|
}
|
|
922
922
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
923
|
-
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t,
|
|
923
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, l.FIELD)).fill(e), this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
924
924
|
}
|
|
925
925
|
async isErrorText({ testId: t }) {
|
|
926
|
-
return await this.page.getByTestId(n(t,
|
|
926
|
+
return await this.page.getByTestId(n(t, E.TEXT)).count() > 0;
|
|
927
927
|
}
|
|
928
928
|
async isDisabled({ testId: t }) {
|
|
929
929
|
return (await this.page.getByTestId(n(t, i.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
@@ -960,9 +960,9 @@ class xt extends Z {
|
|
|
960
960
|
shouldExpand: s = !1
|
|
961
961
|
}) {
|
|
962
962
|
await this.openDropdownComponent({ testId: t }), s && await this.expandTreeNode({ testId: t, nodeName: e });
|
|
963
|
-
const
|
|
964
|
-
if (await
|
|
965
|
-
await
|
|
963
|
+
const c = this.page.getByTestId(n(t, i.LIST_CONTAINER)).locator(`text=${o}`);
|
|
964
|
+
if (await c.isVisible())
|
|
965
|
+
await c.click();
|
|
966
966
|
else
|
|
967
967
|
throw new Error(`Option with text "${o}" not found in the dropdown.`);
|
|
968
968
|
}
|
|
@@ -985,28 +985,28 @@ class xt extends Z {
|
|
|
985
985
|
const nt = ".sortable-item";
|
|
986
986
|
class At {
|
|
987
987
|
constructor(t) {
|
|
988
|
-
|
|
988
|
+
r(this, "page");
|
|
989
989
|
this.page = t;
|
|
990
990
|
}
|
|
991
991
|
async waitForComponent({ testId: t }) {
|
|
992
|
-
const e = `[data-testid='${t}-${
|
|
992
|
+
const e = `[data-testid='${t}-${h.CONTAINER}']`;
|
|
993
993
|
await this.page.waitForSelector(e);
|
|
994
994
|
}
|
|
995
995
|
async isComponentLoaded(t) {
|
|
996
|
-
const e = `[data-testid='${t}-${
|
|
996
|
+
const e = `[data-testid='${t}-${h.CONTAINER}']`;
|
|
997
997
|
return this.page.isVisible(e);
|
|
998
998
|
}
|
|
999
999
|
async getItems(t) {
|
|
1000
|
-
return this.page.getByTestId(n(t,
|
|
1000
|
+
return this.page.getByTestId(n(t, h.CONTAINER)).locator(".sortable-item").allTextContents();
|
|
1001
1001
|
}
|
|
1002
1002
|
async sortItem(t, e, o) {
|
|
1003
1003
|
const s = await this.page.getByTestId(
|
|
1004
1004
|
n(t, "sortable-list-item")
|
|
1005
|
-
),
|
|
1006
|
-
await
|
|
1005
|
+
), c = s.nth(e), p = s.nth(o);
|
|
1006
|
+
await c.dragTo(p);
|
|
1007
1007
|
}
|
|
1008
1008
|
async verifyOrder(t, e) {
|
|
1009
|
-
return (await this.getItems(t)).every((s,
|
|
1009
|
+
return (await this.getItems(t)).every((s, c) => s === e[c]);
|
|
1010
1010
|
}
|
|
1011
1011
|
async getListItemLocator({ testId: t, item: e, modifier: o }) {
|
|
1012
1012
|
return this.page.getByTestId(n(t, o)).locator(nt, {
|
|
@@ -1014,7 +1014,7 @@ class At {
|
|
|
1014
1014
|
});
|
|
1015
1015
|
}
|
|
1016
1016
|
async selectItem({ testId: t, item: e, isLockedItem: o }) {
|
|
1017
|
-
const s = o ?
|
|
1017
|
+
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
|
|
1018
1018
|
await (await this.getListItemLocator({
|
|
1019
1019
|
testId: t,
|
|
1020
1020
|
item: e,
|
|
@@ -1025,7 +1025,7 @@ class At {
|
|
|
1025
1025
|
return await this.page.locator(".sortable-item--selected", { hasText: t }).count() > 0;
|
|
1026
1026
|
}
|
|
1027
1027
|
async expandItem({ testId: t, item: e, isLockedItem: o }) {
|
|
1028
|
-
const s = o ?
|
|
1028
|
+
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
|
|
1029
1029
|
await (await this.getListItemLocator({
|
|
1030
1030
|
testId: t,
|
|
1031
1031
|
item: e,
|
|
@@ -1047,7 +1047,7 @@ class At {
|
|
|
1047
1047
|
}).click();
|
|
1048
1048
|
}
|
|
1049
1049
|
async isListOpened({ testId: t, item: e, isLockedItem: o }) {
|
|
1050
|
-
const s = o ?
|
|
1050
|
+
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
|
|
1051
1051
|
return await (await this.getListItemLocator({
|
|
1052
1052
|
testId: t,
|
|
1053
1053
|
item: e,
|
|
@@ -1058,7 +1058,7 @@ class At {
|
|
|
1058
1058
|
return await this.page.locator("ul li span", { hasText: t }).count() > 0;
|
|
1059
1059
|
}
|
|
1060
1060
|
async openItemMenu({ testId: t, item: e, isLockedItem: o }) {
|
|
1061
|
-
const s = o ?
|
|
1061
|
+
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST;
|
|
1062
1062
|
await (await this.getListItemLocator({
|
|
1063
1063
|
testId: t,
|
|
1064
1064
|
item: e,
|
|
@@ -1076,68 +1076,68 @@ class At {
|
|
|
1076
1076
|
item: e,
|
|
1077
1077
|
isLockedItem: o
|
|
1078
1078
|
});
|
|
1079
|
-
const
|
|
1080
|
-
await
|
|
1079
|
+
const c = this.page.locator(".dropdown-list-wrapper");
|
|
1080
|
+
await c.locator("ul.list li", { hasText: s }).click(), await c.waitFor({ state: "detached" });
|
|
1081
1081
|
}
|
|
1082
1082
|
async isMenuOpened() {
|
|
1083
1083
|
return await this.page.locator(".dropdown-list-wrapper").count() > 0;
|
|
1084
1084
|
}
|
|
1085
1085
|
async dragAndDrop({ testId: t, item: e, isLockedItem: o }) {
|
|
1086
|
-
const s = o ?
|
|
1086
|
+
const s = o ? h.LOCKED_LIST : h.DRAGGABLE_LIST, p = await (await this.getListItemLocator({
|
|
1087
1087
|
testId: t,
|
|
1088
1088
|
item: e,
|
|
1089
1089
|
modifier: s
|
|
1090
1090
|
})).locator(".item.drag-allowed").first().boundingBox();
|
|
1091
|
-
if (
|
|
1092
|
-
const
|
|
1093
|
-
await this.page.mouse.move(
|
|
1091
|
+
if (p) {
|
|
1092
|
+
const B = p.x, y = p.y;
|
|
1093
|
+
await this.page.mouse.move(B, y), await this.page.mouse.down(), await this.page.mouse.move(B + 20, y - 20), await this.page.mouse.up();
|
|
1094
1094
|
}
|
|
1095
1095
|
}
|
|
1096
1096
|
async getListOrder() {
|
|
1097
1097
|
return (await this.page.locator(".sortable-list-container .item__text span").allInnerTexts()).reduce((e, o, s) => (e[s + 1] = o, e), {});
|
|
1098
1098
|
}
|
|
1099
1099
|
async searchForItem({ testId: t, searchTerm: e }) {
|
|
1100
|
-
return await this.page.getByTestId(n(t,
|
|
1100
|
+
return await this.page.getByTestId(n(t, l.FIELD)).fill(e), this.page.getByTestId(n(t, h.CONTAINER)).locator("ul > li span").first().textContent();
|
|
1101
1101
|
}
|
|
1102
1102
|
// returns array of booleans according to the search results in each group
|
|
1103
1103
|
async verifySearchResultDisplayed({ testId: t, item: e }) {
|
|
1104
|
-
const o = [], s = await this.page.getByTestId(n(t,
|
|
1105
|
-
let
|
|
1106
|
-
for (const
|
|
1107
|
-
|
|
1104
|
+
const o = [], s = await this.page.getByTestId(n(t, h.CONTAINER)).all();
|
|
1105
|
+
let c;
|
|
1106
|
+
for (const p of s)
|
|
1107
|
+
c = await p.locator(".child-list span", { hasText: e }).count(), o.push(c > 0);
|
|
1108
1108
|
return o;
|
|
1109
1109
|
}
|
|
1110
1110
|
async getSelectedItem(t) {
|
|
1111
|
-
return this.page.getByTestId(n(t,
|
|
1111
|
+
return this.page.getByTestId(n(t, h.CONTAINER)).locator(".sortable-item--selected").textContent();
|
|
1112
1112
|
}
|
|
1113
1113
|
}
|
|
1114
1114
|
class Lt {
|
|
1115
1115
|
constructor(t) {
|
|
1116
|
-
|
|
1116
|
+
r(this, "page");
|
|
1117
1117
|
this.page = t;
|
|
1118
1118
|
}
|
|
1119
1119
|
async waitForComponent({ testId: t }) {
|
|
1120
|
-
const e = n(t,
|
|
1120
|
+
const e = n(t, v.WRAPPER);
|
|
1121
1121
|
await this.page.getByTestId(e).waitFor({ state: "visible" });
|
|
1122
1122
|
}
|
|
1123
1123
|
async selectView({ view: t, testId: e }) {
|
|
1124
1124
|
const o = `[text="${t}"]`;
|
|
1125
1125
|
console.log(o);
|
|
1126
|
-
const s = n(e,
|
|
1126
|
+
const s = n(e, v.WRAPPER);
|
|
1127
1127
|
await (await this.page.getByTestId(s).locator(o)).click();
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
1130
|
class Rt {
|
|
1131
1131
|
constructor(t) {
|
|
1132
|
-
|
|
1132
|
+
r(this, "page");
|
|
1133
1133
|
this.page = t;
|
|
1134
1134
|
}
|
|
1135
1135
|
async waitForComponent({ testId: t }) {
|
|
1136
|
-
const e = n(t,
|
|
1136
|
+
const e = n(t, m.WRAPPER);
|
|
1137
1137
|
await this.page.getByTestId(e).waitFor({ state: "visible" });
|
|
1138
1138
|
}
|
|
1139
1139
|
async openDateRangeComponent(t) {
|
|
1140
|
-
const e = n(t,
|
|
1140
|
+
const e = n(t, m.TRIGGER);
|
|
1141
1141
|
await (await this.page.getByTestId(e)).click();
|
|
1142
1142
|
}
|
|
1143
1143
|
async selectDateRangeMenu({
|
|
@@ -1145,20 +1145,58 @@ class Rt {
|
|
|
1145
1145
|
option: e
|
|
1146
1146
|
}) {
|
|
1147
1147
|
await this.openDateRangeComponent(t);
|
|
1148
|
-
const o = n(t,
|
|
1148
|
+
const o = n(t, m.MENU);
|
|
1149
1149
|
await (await this.page.getByTestId(
|
|
1150
1150
|
`${o}-${e}`
|
|
1151
1151
|
)).click();
|
|
1152
1152
|
}
|
|
1153
|
+
// month year should be the calendar month title, like - "May 2024"
|
|
1153
1154
|
async selectSpecificDates({
|
|
1154
1155
|
testId: t,
|
|
1155
|
-
|
|
1156
|
-
|
|
1156
|
+
startMonthYear: e,
|
|
1157
|
+
startDate: o,
|
|
1158
|
+
endMonthYear: s,
|
|
1159
|
+
endDate: c
|
|
1157
1160
|
}) {
|
|
1158
|
-
await this.openDateRangeComponent(t)
|
|
1161
|
+
await this.openDateRangeComponent(t);
|
|
1162
|
+
const p = await this.goToStartMonthYear(e);
|
|
1163
|
+
await (await this.getDayElement(
|
|
1164
|
+
p,
|
|
1165
|
+
o
|
|
1166
|
+
)).click();
|
|
1167
|
+
const y = await this.goToEndMonthYear(s);
|
|
1168
|
+
await (await this.getDayElement(y, c)).click();
|
|
1169
|
+
}
|
|
1170
|
+
async getDayElement(t, e) {
|
|
1171
|
+
const o = await t.locator(".date-wrapper").all();
|
|
1172
|
+
for (const s of o)
|
|
1173
|
+
if (await s.textContent() === e)
|
|
1174
|
+
return s;
|
|
1175
|
+
return null;
|
|
1176
|
+
}
|
|
1177
|
+
async goToStartMonthYear(t) {
|
|
1178
|
+
let o = 1;
|
|
1179
|
+
for (; o < 24; ) {
|
|
1180
|
+
const s = await this.page.$$(".month-header span.month-name");
|
|
1181
|
+
for (const p of s)
|
|
1182
|
+
if (await p.textContent() === t)
|
|
1183
|
+
return this.page.locator(".calendar-month", {
|
|
1184
|
+
hasText: t
|
|
1185
|
+
});
|
|
1186
|
+
await (await this.page.locator(".previous")).click(), o++, await this.page.waitForTimeout(500);
|
|
1187
|
+
}
|
|
1159
1188
|
}
|
|
1160
|
-
async
|
|
1161
|
-
|
|
1189
|
+
async goToEndMonthYear(t) {
|
|
1190
|
+
let o = 1;
|
|
1191
|
+
for (; o < 24; ) {
|
|
1192
|
+
const s = await this.page.$$(".month-header span.month-name");
|
|
1193
|
+
for (const p of s)
|
|
1194
|
+
if (await p.textContent() === t)
|
|
1195
|
+
return this.page.locator(".calendar-month", {
|
|
1196
|
+
hasText: t
|
|
1197
|
+
});
|
|
1198
|
+
await (await this.page.locator(".next")).click(), o++, await this.page.waitForTimeout(500);
|
|
1199
|
+
}
|
|
1162
1200
|
}
|
|
1163
1201
|
async getSelectedDays() {
|
|
1164
1202
|
const t = await this.page.locator("span.start-day.today").count(), e = await this.page.locator("span.selected-day-between").count(), o = await this.page.locator("span.end-day").count();
|
|
@@ -1167,25 +1205,47 @@ class Rt {
|
|
|
1167
1205
|
async clickOnApply(t) {
|
|
1168
1206
|
const e = n(
|
|
1169
1207
|
t,
|
|
1170
|
-
|
|
1208
|
+
m.ACTION_APPLY
|
|
1171
1209
|
);
|
|
1172
1210
|
await (await this.page.getByTestId(e)).click();
|
|
1173
1211
|
}
|
|
1174
1212
|
async clickOnCancel(t) {
|
|
1175
1213
|
const e = n(
|
|
1176
1214
|
t,
|
|
1177
|
-
|
|
1215
|
+
m.ACTION_CANCEL
|
|
1178
1216
|
);
|
|
1179
1217
|
await (await this.page.getByTestId(e)).click();
|
|
1180
1218
|
}
|
|
1181
1219
|
async getDateRangeLabel(t) {
|
|
1182
|
-
const e = n(t,
|
|
1220
|
+
const e = n(t, m.TRIGGER);
|
|
1183
1221
|
return (await this.page.getByTestId(e)).textContent();
|
|
1184
1222
|
}
|
|
1223
|
+
createRangeLabel({
|
|
1224
|
+
startMonthYear: t,
|
|
1225
|
+
startDate: e,
|
|
1226
|
+
endMonthYear: o,
|
|
1227
|
+
endDate: s
|
|
1228
|
+
}) {
|
|
1229
|
+
const c = {
|
|
1230
|
+
January: "Jan",
|
|
1231
|
+
February: "Feb",
|
|
1232
|
+
March: "Mar",
|
|
1233
|
+
April: "Apr",
|
|
1234
|
+
May: "May",
|
|
1235
|
+
June: "Jun",
|
|
1236
|
+
July: "Jul",
|
|
1237
|
+
August: "Aug",
|
|
1238
|
+
September: "Sep",
|
|
1239
|
+
October: "Oct",
|
|
1240
|
+
November: "Nov",
|
|
1241
|
+
December: "Dec"
|
|
1242
|
+
}, [p, B] = t.split(" "), y = c[p], [N, F] = o.split(" "), k = c[N];
|
|
1243
|
+
return `${y} ${e}, ${B} - ${k} ${s}, ${F}`;
|
|
1244
|
+
}
|
|
1185
1245
|
calculateDaysBetweenDates(t) {
|
|
1186
1246
|
const [e, o] = t.split(" - ");
|
|
1187
|
-
function s(
|
|
1188
|
-
const [
|
|
1247
|
+
function s(N) {
|
|
1248
|
+
const [F, k] = N.split(", "), [W, K] = F.split(" "), U = {
|
|
1189
1249
|
Jan: 0,
|
|
1190
1250
|
Feb: 1,
|
|
1191
1251
|
Mar: 2,
|
|
@@ -1198,18 +1258,18 @@ class Rt {
|
|
|
1198
1258
|
Oct: 9,
|
|
1199
1259
|
Nov: 10,
|
|
1200
1260
|
Dec: 11
|
|
1201
|
-
}[
|
|
1202
|
-
if (
|
|
1203
|
-
throw new Error(`Invalid month: ${
|
|
1204
|
-
return new Date(parseInt(
|
|
1261
|
+
}[W];
|
|
1262
|
+
if (U === void 0)
|
|
1263
|
+
throw new Error(`Invalid month: ${W}`);
|
|
1264
|
+
return new Date(parseInt(k), U, parseInt(K));
|
|
1205
1265
|
}
|
|
1206
|
-
const
|
|
1207
|
-
return Math.floor(
|
|
1266
|
+
const c = s(e), y = (s(o).getTime() - c.getTime()) / (1e3 * 60 * 60 * 24);
|
|
1267
|
+
return Math.floor(y + 1);
|
|
1208
1268
|
}
|
|
1209
1269
|
}
|
|
1210
1270
|
export {
|
|
1211
|
-
|
|
1212
|
-
|
|
1271
|
+
It as AlertComponent,
|
|
1272
|
+
mt as AppHeaderComponent,
|
|
1213
1273
|
it as BannerComponent,
|
|
1214
1274
|
tt as ButtonComponent,
|
|
1215
1275
|
ct as ComponentBasePage,
|
|
@@ -1217,8 +1277,8 @@ export {
|
|
|
1217
1277
|
rt as DialogComponent,
|
|
1218
1278
|
Z as DropdownComponent,
|
|
1219
1279
|
lt as DropdownComponentV3,
|
|
1220
|
-
|
|
1221
|
-
|
|
1280
|
+
H as FieldHelpTextComponent,
|
|
1281
|
+
b as FieldLabelComponent,
|
|
1222
1282
|
Et as FormCardComponent,
|
|
1223
1283
|
wt as FormRowComponent,
|
|
1224
1284
|
pt as IncludeExcludeComponent,
|