@ironsource/shared-ui-e2e 2.1.3-rc.9 → 2.1.3

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.
Files changed (38) hide show
  1. package/package.json +1 -1
  2. package/shared-e2e-commands.js +406 -293
  3. package/shared-e2e-commands.umd.cjs +1 -2
  4. package/tests/components/alert/alert-component.d.ts +29 -0
  5. package/tests/components/alert/alert-page.d.ts +15 -0
  6. package/tests/components/alert/consts.d.ts +3 -0
  7. package/tests/components/appHeader/app-header-component.d.ts +18 -0
  8. package/tests/components/appHeader/app-header-page.d.ts +11 -0
  9. package/tests/components/appHeader/consts.d.ts +3 -0
  10. package/tests/components/button/button-component.d.ts +9 -0
  11. package/tests/components/button/button-page.d.ts +3 -0
  12. package/tests/components/dropdown/base-dropdown.d.ts +2 -1
  13. package/tests/components/dropdown/dropdown-v4/consts.d.ts +2 -0
  14. package/tests/components/dropdown/dropdown-v4/dropdown-component.d.ts +3 -0
  15. package/tests/components/dropdown/dropdown-v4/dropdown-page.d.ts +1 -0
  16. package/tests/components/dropdown/types.d.ts +1 -0
  17. package/tests/components/formCard/consts.d.ts +3 -0
  18. package/tests/components/formCard/form-card-component.d.ts +30 -0
  19. package/tests/components/formCard/form-card-page.d.ts +13 -0
  20. package/tests/components/formRow/consts.d.ts +3 -0
  21. package/tests/components/formRow/form-row-component.d.ts +17 -0
  22. package/tests/components/formRow/form-row-page.d.ts +10 -0
  23. package/tests/components/inlineCopy/consts.d.ts +3 -0
  24. package/tests/components/inlineCopy/inline-copy-component.d.ts +11 -0
  25. package/tests/components/inlineCopy/inline-copy-page.d.ts +9 -0
  26. package/tests/components/inputs/input-v4/inputs-component.d.ts +2 -2
  27. package/tests/components/inputs/input-v4/inputs-page.d.ts +3 -2
  28. package/tests/components/inputs/types.d.ts +1 -1
  29. package/tests/components/search/consts.d.ts +3 -0
  30. package/tests/components/search/search-component.d.ts +25 -0
  31. package/tests/components/search/search-page.d.ts +14 -0
  32. package/tests/components/table/table-component.d.ts +11 -29
  33. package/tests/components/table/table-page.d.ts +4 -16
  34. package/tests/components/table/types.d.ts +10 -2
  35. package/tests/global/types.d.ts +4 -0
  36. package/tests/index.d.ts +11 -0
  37. package/tests/testids/index.d.ts +5 -2
  38. package/tsconfig.tsbuildinfo +1 -1
@@ -1,44 +1,44 @@
1
- var b = Object.defineProperty;
2
- var O = (a, t, e) => t in a ? b(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
- var c = (a, t, e) => (O(a, typeof t != "symbol" ? t + "" : t, e), e);
4
- var p = /* @__PURE__ */ ((a) => (a.TRIGGER = "ie-trigger", a.CONTENT = "ie-content", a.SEARCH = "ie-search", a.LIST = "ie-list", a.LIST_SELECTED = "ie-list-selected", a.ACTION_CANCEL = "ie-action-cancel", a.ACTION_APPLY = "ie-action-apply", a.SELECT_ALL = "ie-select-all", a.CLEAR_ALL = "ie-clear-all", a))(p || {}), l = /* @__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))(l || {}), w = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(w || {}), T = /* @__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))(T || {}), s = /* @__PURE__ */ ((a) => (a.WRAPPER = "input-wrapper", a.TOOLTIP = "input-tooltip", a.MANDATORY = "input-mandatory", a.LABEL_CONTAINER = "input-label-container", a.LABEL_TEXT = "input-label-text", a.FIELD = "input-field", a.EXTRA_TEXT = "input-extra-text", a.TOGGLE_PASSWORD = "input-toggle-password-icon", a))(s || {}), R = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(R || {}), 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 || {}), E = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(E || {}), u = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(u || {}), C = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(C || {}), B = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(B || {}), h = /* @__PURE__ */ ((a) => (a.CONTAINER = "sb-container", a.TITLE = "sb-title", a.MESSAGE = "sb-message", a.CLOSE = "sb-close", a.ICON = "sb-icon", a.ACTION_BUTTON = "sb-action-button", a))(h || {}), y = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(y || {});
5
- const L = (a, t) => {
1
+ var D = Object.defineProperty;
2
+ var H = (a, t, e) => t in a ? D(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
3
+ var s = (a, t, e) => (H(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 || {}), x = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(x || {}), T = /* @__PURE__ */ ((a) => (a.WRAPPER = "alert-wrapper", a.TITLE = "alert-title", a.MESSAGE = "alert-message", a.ACTION_BUTTON = "alert-action-button", a.CLOSE_BUTTON = "alert-close-button", a))(T || {}), g = /* @__PURE__ */ ((a) => (a.WRAPPER = "dialog-wrapper", a.HEADER = "dialog-header", a.ACTION_CLOSE = "dialog-action-close", a.HEADER_SECONDARY = "dialog-header-secondary", a.CONTENT = "dialog-content", a.ACTION_BUTTONS_WRAPPER = "dialog-action-buttons-wrapper", a.BACKDROP = "dialog-backdrop", a.SAVE_BUTTON = "dialog-save-button", a.CANCEL_BUTTON = "dialog-cancel-button", a))(g || {}), i = /* @__PURE__ */ ((a) => (a.WRAPPER = "input-wrapper", a.TOOLTIP = "input-tooltip", a.MANDATORY = "input-mandatory", a.LABEL_CONTAINER = "input-label-container", a.LABEL_TEXT = "input-label-text", a.FIELD = "input-field", a.EXTRA_TEXT = "input-extra-text", a.TOGGLE_PASSWORD = "input-toggle-password-icon", a))(i || {}), R = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(R || {}), 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 || {}), I = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(I || {}), d = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(d || {}), w = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(w || {}), B = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(B || {}), h = /* @__PURE__ */ ((a) => (a.CONTAINER = "sb-container", a.TITLE = "sb-title", a.MESSAGE = "sb-message", a.CLOSE = "sb-close", a.ICON = "sb-icon", a.ACTION_BUTTON = "sb-action-button", a))(h || {}), u = /* @__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))(u || {}), m = /* @__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))(m || {}), b = /* @__PURE__ */ ((a) => (a.TEXT = "ic-text", a.COPY_BTN = "ic-copy-btn", a))(b || {}), C = /* @__PURE__ */ ((a) => (a.WRAPPER = "multibar-wrapper", a.CLOSE_BTN = "multibar-close-button", a.MENU = "multibar-menu", a.ACTION = "multibar-action", a))(C || {});
5
+ const W = (a, t) => {
6
6
  const e = new URLSearchParams(a).toString();
7
7
  return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
8
- }, P = (a, t = {}) => {
8
+ }, G = (a, t = {}) => {
9
9
  const e = [];
10
- Object.entries(t).forEach(([g, d]) => {
11
- e.push(`${g}:${d}`);
10
+ Object.entries(t).forEach(([F, $]) => {
11
+ e.push(`${F}:${$}`);
12
12
  });
13
13
  const o = {
14
14
  id: a,
15
15
  viewMode: "story",
16
16
  args: e.join(";")
17
17
  };
18
- return L(o, "iframe.html");
18
+ return W(o, "iframe.html");
19
19
  }, n = (a, t) => `${a}-${t}`;
20
- class k {
20
+ class Y {
21
21
  constructor(t) {
22
- c(this, "page");
22
+ s(this, "page");
23
23
  this.page = t;
24
24
  }
25
25
  async waitForComponent({ testId: t }) {
26
- const e = `[data-testid='${t}-${w.WRAPPER}']`;
26
+ const e = `[data-testid='${t}-${x.WRAPPER}']`;
27
27
  await this.page.waitForSelector(e);
28
28
  }
29
29
  getBannerText({ testId: t }) {
30
- return this.page.getByTestId(n(t, w.CONTENT)).textContent();
30
+ return this.page.getByTestId(n(t, x.CONTENT)).textContent();
31
31
  }
32
32
  hasBannerType({ testId: t, type: e }) {
33
- return this.page.getByTestId(n(t, w.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
33
+ return this.page.getByTestId(n(t, x.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
34
34
  }
35
35
  }
36
- class _ {
36
+ class f {
37
37
  constructor(t) {
38
- c(this, "page");
39
- c(this, "testId");
40
- c(this, "componentId");
41
- c(this, "loadedPageSelector");
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,87 @@ class _ {
47
47
  ...t.additionalComponentParams
48
48
  };
49
49
  await this.page.goto(
50
- P(
50
+ G(
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 F {
57
+ class j {
58
58
  constructor(t) {
59
- c(this, "page");
59
+ s(this, "page");
60
60
  this.page = t;
61
61
  }
62
62
  async waitForComponent({ testId: t }) {
63
- const e = `[data-testid='${t}-${T.WRAPPER}']`;
63
+ const e = `[data-testid='${t}-${g.WRAPPER}']`;
64
64
  await this.page.waitForSelector(e);
65
65
  }
66
66
  getDialogTitle({ testId: t }) {
67
- return this.page.getByTestId(n(t, T.HEADER)).locator(".font-heading-3").textContent();
67
+ return this.page.getByTestId(n(t, g.HEADER)).textContent();
68
68
  }
69
69
  getDialogText({ testId: t }) {
70
- return this.page.getByTestId(n(t, T.CONTENT)).textContent();
70
+ return this.page.getByTestId(n(t, g.CONTENT)).textContent();
71
71
  }
72
72
  async closeDialog({ testId: t }) {
73
73
  await (await this.page.getByTestId(
74
- n(t, T.ACTION_CLOSE)
74
+ n(t, g.ACTION_CLOSE)
75
75
  )).click();
76
76
  }
77
77
  async clickOnPrimaryButton({ testId: t }) {
78
- await (await this.page.getByTestId(
79
- n(t, T.ACTION_BUTTONS_WRAPPER)
80
- ).locator(".primary")).click();
78
+ await this.page.getByTestId(
79
+ n(t, g.SAVE_BUTTON)
80
+ ).click();
81
81
  }
82
82
  async clickOnDefaultButton({ testId: t }) {
83
- await (await this.page.getByTestId(
84
- n(t, T.ACTION_BUTTONS_WRAPPER)
85
- ).locator(".default")).click();
83
+ await this.page.getByTestId(
84
+ n(t, g.CANCEL_BUTTON)
85
+ ).click();
86
86
  }
87
87
  async clickOnDeleteButton({ testId: t }) {
88
88
  await (await this.page.getByTestId(
89
- n(t, T.ACTION_BUTTONS_WRAPPER)
89
+ n(t, g.ACTION_BUTTONS_WRAPPER)
90
90
  ).locator(".danger")).click();
91
91
  }
92
92
  getDialogSubtitle({ testId: t }) {
93
- return this.page.getByTestId(n(t, T.HEADER)).locator(".subtitle").textContent();
93
+ return this.page.getByTestId(n(t, g.HEADER_SECONDARY)).locator(".subtitle").textContent();
94
94
  }
95
95
  async isDialogVisible({ testId: t }) {
96
96
  return await this.page.waitForTimeout(1e3), (await this.page.getByTestId(
97
- n(t, T.WRAPPER)
97
+ n(t, g.WRAPPER)
98
98
  )).isVisible();
99
99
  }
100
100
  }
101
- class A {
101
+ class _ {
102
102
  constructor(t) {
103
- c(this, "page");
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, l.WRAPPER)
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, l.LIST_CONTAINER)).locator("ul > li").nth(e).click();
112
+ await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(e).click();
113
+ }
114
+ async getDropdownButtonContent(t) {
115
+ await this.page.getByTestId(n(t, c.BUTTON_CONTENT)).textContent();
113
116
  }
114
117
  async openDropdownComponent({ testId: t }) {
115
- await this.page.getByTestId(n(t, l.TRIGGER)).click({ position: { x: 10, y: 10 } });
118
+ await this.page.getByTestId(n(t, c.TRIGGER)).click({ position: { x: 15, y: 15 } });
116
119
  }
117
- async selectDropdownOptionByName({ testId: t, name: e }) {
118
- await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, l.LIST_CONTAINER)).locator("ul > li span", { hasText: e }).click();
120
+ async selectDropdownOptionByName({
121
+ testId: t,
122
+ name: e,
123
+ shouldOpen: o = !0
124
+ }) {
125
+ o && await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span", { hasText: e }).click();
119
126
  }
120
127
  async selectMultipleItemsByIndex({ testId: t, itemsToSelect: e }) {
121
128
  await this.openDropdownComponent({ testId: t });
122
129
  for (const o of e)
123
- await this.page.getByTestId(n(t, l.LIST_CONTAINER)).locator("ul > li").nth(o).click();
130
+ await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(o).click();
124
131
  }
125
132
  async selectMultipleItemsByName({
126
133
  testId: t,
@@ -128,36 +135,36 @@ class A {
128
135
  }) {
129
136
  await this.openDropdownComponent({ testId: t });
130
137
  for (const o of e)
131
- await this.page.getByTestId(n(t, l.LIST_CONTAINER)).locator("ul > li span", { hasText: o }).first().click();
138
+ await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span", { hasText: o }).first().click();
132
139
  }
133
140
  async clickOnApply({ testId: t }) {
134
- await this.page.getByTestId(n(t, l.ACTION_APPLY)).click();
141
+ await this.page.getByTestId(n(t, c.ACTION_APPLY)).click();
135
142
  }
136
143
  async clickOnCancel({ testId: t }) {
137
- await this.page.getByTestId(n(t, l.ACTION_CANCEL)).click();
144
+ await this.page.getByTestId(n(t, c.ACTION_CANCEL)).click();
138
145
  }
139
146
  }
140
- class I {
147
+ class A {
141
148
  constructor(t) {
142
- c(this, "page");
149
+ s(this, "page");
143
150
  this.page = t;
144
151
  }
145
152
  getLabelText({ testId: t }) {
146
- return this.page.getByTestId(n(t, C.TEXT)).textContent();
153
+ return this.page.getByTestId(n(t, w.TEXT)).textContent();
147
154
  }
148
155
  isMandatory({ testId: t }) {
149
- return this.page.getByTestId(n(t, C.MANDATORY)).isVisible();
156
+ return this.page.getByTestId(n(t, w.MANDATORY)).isVisible();
150
157
  }
151
158
  async getHelpIconText({ testId: t }) {
152
159
  const e = await this.page.getByTestId(
153
- n(t, C.TOOLTIP)
160
+ n(t, w.TOOLTIP)
154
161
  );
155
162
  return await e.hover(), e.getAttribute("text");
156
163
  }
157
164
  }
158
- class m {
165
+ class S {
159
166
  constructor(t) {
160
- c(this, "page");
167
+ s(this, "page");
161
168
  this.page = t;
162
169
  }
163
170
  hasExtraText({ testId: t }) {
@@ -170,12 +177,12 @@ class m {
170
177
  return await (await this.page.getByTestId(n(t, B.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
171
178
  }
172
179
  }
173
- class D extends A {
180
+ class K extends _ {
174
181
  constructor(e) {
175
182
  super(e);
176
- c(this, "fieldLabelComponent");
177
- c(this, "fieldHelpTextComponent");
178
- this.fieldLabelComponent = new I(e), this.fieldHelpTextComponent = new m(e);
183
+ s(this, "fieldLabelComponent");
184
+ s(this, "fieldHelpTextComponent");
185
+ this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new S(e);
179
186
  }
180
187
  getDropdownTitle({ testId: e }) {
181
188
  return this.fieldLabelComponent.getLabelText({ testId: e });
@@ -196,146 +203,149 @@ class D extends A {
196
203
  return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
197
204
  }
198
205
  getSelectedLabel({ testId: e }) {
199
- return this.page.getByTestId(n(e, l.BUTTON_CONTENT)).textContent();
206
+ return this.page.getByTestId(n(e, c.BUTTON_CONTENT)).textContent();
200
207
  }
201
208
  async searchForItem({ testId: e, searchTerm: o }) {
202
- return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, s.FIELD)).fill(o), this.page.getByTestId(n(e, l.LIST_CONTAINER)).locator("ul > li span").first().textContent();
209
+ 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
210
  }
204
- isErrorText({ testId: e }) {
205
- return this.page.getByTestId(n(e, l.TRIGGER)).locator(".state-error").isVisible();
211
+ async isErrorText({ testId: e }) {
212
+ return await this.page.getByTestId(n(e, B.TEXT)).count() > 0;
206
213
  }
207
214
  async isDisabled({ testId: e }) {
208
- return (await this.page.getByTestId(n(e, l.TRIGGER)).locator(".button__container--disabled")).isVisible();
215
+ return (await this.page.getByTestId(n(e, c.TRIGGER)).locator(".button__container--disabled")).isVisible();
209
216
  }
210
217
  async clearAllOptions({ testId: e }) {
211
- await this.page.getByTestId(n(e, l.ACTION_CLEAR_ALL)).click();
218
+ await this.page.getByTestId(n(e, c.ACTION_CLEAR_ALL)).click();
212
219
  }
213
220
  isSelectAllChecked({ testId: e }) {
214
- return this.page.getByTestId(n(e, l.SELECT_ALL)).locator(".checkbox.input").isChecked();
221
+ return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".checkbox.input").isChecked();
215
222
  }
216
223
  isSelectAllIndeterminate({ testId: e }) {
217
- return this.page.getByTestId(n(e, l.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
224
+ return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
218
225
  }
219
226
  async removeChipSelection({ testId: e }) {
220
- await this.page.getByTestId(n(e, l.BUTTON_CLEAR)).click();
227
+ await this.page.getByTestId(n(e, c.BUTTON_CLEAR)).click();
228
+ }
229
+ getDropdownOptions({ testId: e }) {
230
+ return this.page.getByTestId(n(e, c.LIST_CONTAINER)).locator(".list").allTextContents();
221
231
  }
222
232
  }
223
- class H extends A {
233
+ class q extends _ {
224
234
  constructor(t) {
225
235
  super(t);
226
236
  }
227
237
  getDropdownTitle({ testId: t }) {
228
- return this.page.getByTestId(n(t, l.WRAPPER)).locator("label > span").textContent();
238
+ return this.page.getByTestId(n(t, c.WRAPPER)).locator("label > span").textContent();
229
239
  }
230
240
  getSelectedItem({ testId: t }) {
231
- return this.page.getByTestId(n(t, l.TRIGGER)).locator("button > span").textContent();
241
+ return this.page.getByTestId(n(t, c.TRIGGER)).locator("button > span").textContent();
232
242
  }
233
243
  async searchForItem({ testId: t, searchTerm: e }) {
234
- return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, R.FIELD)).fill(e), this.page.getByTestId(n(t, l.LIST_CONTAINER)).locator("ul > li span").first().textContent();
244
+ return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, R.FIELD)).fill(e), this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
235
245
  }
236
246
  }
237
- class $ {
247
+ class z {
238
248
  constructor(t) {
239
- c(this, "page");
249
+ s(this, "page");
240
250
  this.page = t;
241
251
  }
242
252
  async waitForComponent({ testId: t }) {
243
- const e = `[data-testid='${t}-${p.TRIGGER}']`;
253
+ const e = `[data-testid='${t}-${l.TRIGGER}']`;
244
254
  await this.page.waitForSelector(e);
245
255
  }
246
256
  async clickOnApply(t) {
247
257
  await this.page.getByTestId(
248
- n(t, p.ACTION_APPLY)
258
+ n(t, l.ACTION_APPLY)
249
259
  ).click();
250
260
  }
251
261
  async clickOnCancel(t) {
252
262
  await this.page.getByTestId(
253
- n(t, p.ACTION_CANCEL)
263
+ n(t, l.ACTION_CANCEL)
254
264
  ).click();
255
265
  }
256
266
  async openIncludeExcludeComponent(t) {
257
- await this.page.getByTestId(n(t, p.TRIGGER)).click();
267
+ await this.page.getByTestId(n(t, l.TRIGGER)).click();
258
268
  }
259
269
  async searchForItem({ testId: t, searchTerm: e }) {
260
- return await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.SEARCH)).locator("input.transparent").fill(e), this.page.getByTestId(n(t, p.LIST)).locator("ul > li .v-popper span").first().textContent();
270
+ 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
271
  }
262
272
  async selectItemByName({ testId: t, entityName: e }) {
263
- await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.LIST)).locator("ul > li .v-popper span", { hasText: e }).first().click(), await this.clickOnApply(t);
273
+ 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
274
  }
265
275
  async selectItemByIndex({ testId: t, index: e, applyChanges: o }) {
266
- await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.LIST)).locator(".include-exclude-list ul > li").nth(e).click(), await this.page.waitForSelector("include-exclude-list-header-loading", {
276
+ 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
277
  state: "hidden"
268
278
  }), o && await this.clickOnApply(t);
269
279
  }
270
280
  async selectMultipleItems({ testId: t, itemsToSelect: e }) {
271
281
  await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t);
272
282
  for (const o of e)
273
- await this.page.getByTestId(n(t, p.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
283
+ await this.page.getByTestId(n(t, l.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
274
284
  }
275
285
  async unselectItemByName({ testId: t, entityName: e }) {
276
286
  await this.openIncludeExcludeComponent(t), await this.page.getByTestId(
277
- n(t, p.LIST_SELECTED)
287
+ n(t, l.LIST_SELECTED)
278
288
  ).locator("ul > li", { hasText: e }).locator(".clear-button").click(), await this.clickOnApply(t);
279
289
  }
280
290
  async unselectByIndex({ testId: t, index: e, applyChanges: o }) {
281
291
  await this.page.getByTestId(
282
- n(t, p.LIST_SELECTED)
292
+ n(t, l.LIST_SELECTED)
283
293
  ).locator("ul li button").nth(e).click(), o && await this.clickOnApply(t);
284
294
  }
285
295
  async getSelectedCounter(t) {
286
296
  return await this.page.getByTestId(
287
- n(t, p.LIST_SELECTED)
297
+ n(t, l.LIST_SELECTED)
288
298
  ).locator(".include-exclude-selected-header-left span").textContent();
289
299
  }
290
300
  async clearAll({ testId: t }) {
291
- await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.CLEAR_ALL)).click(), await this.clickOnApply(t);
301
+ await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, l.CLEAR_ALL)).click(), await this.clickOnApply(t);
292
302
  }
293
303
  getTriggerText({ testId: t }) {
294
- return this.page.getByTestId(n(t, p.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
304
+ return this.page.getByTestId(n(t, l.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
295
305
  }
296
306
  getTriggerDescription({ testId: t }) {
297
- return this.page.getByTestId(n(t, p.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
307
+ return this.page.getByTestId(n(t, l.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
298
308
  }
299
309
  async selectAll({ testId: t }) {
300
- await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.SELECT_ALL)).click(), await this.clickOnApply(t);
310
+ await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, l.SELECT_ALL)).click(), await this.clickOnApply(t);
301
311
  }
302
312
  }
303
- class S {
313
+ class k {
304
314
  constructor(t) {
305
- c(this, "page");
315
+ s(this, "page");
306
316
  this.page = t;
307
317
  }
308
318
  getInputsFieldText({ testId: t }) {
309
- return this.page.getByTestId(n(t, s.FIELD)).inputValue();
319
+ return this.page.getByTestId(n(t, i.FIELD)).inputValue();
310
320
  }
311
321
  getPlaceholderText({ testId: t }) {
312
- return this.page.getByTestId(n(t, s.FIELD)).getAttribute("placeholder");
322
+ return this.page.getByTestId(n(t, i.FIELD)).getAttribute("placeholder");
313
323
  }
314
324
  getInputsType({ testId: t }) {
315
- return this.page.getByTestId(n(t, s.FIELD)).getAttribute("type");
325
+ return this.page.getByTestId(n(t, i.FIELD)).getAttribute("type");
316
326
  }
317
327
  async addInput({ testId: t, text: e }) {
318
- await this.page.getByTestId(n(t, s.FIELD)).type(e);
328
+ await this.page.getByTestId(n(t, i.FIELD)).type(e);
319
329
  }
320
330
  async clearInput({ testId: t }) {
321
- await this.page.getByTestId(n(t, s.FIELD)).clear();
331
+ await this.page.getByTestId(n(t, i.FIELD)).clear();
322
332
  }
323
333
  isDisabled({ testId: t }) {
324
- return this.page.getByTestId(n(t, s.FIELD)).isDisabled();
334
+ return this.page.getByTestId(n(t, i.FIELD)).isDisabled();
325
335
  }
326
336
  }
327
- class G extends S {
337
+ class J extends k {
328
338
  constructor(e) {
329
339
  super(e);
330
- c(this, "fieldLabelComponent");
331
- c(this, "fieldHelpTextComponent");
332
- this.fieldLabelComponent = new I(e), this.fieldHelpTextComponent = new m(e);
340
+ s(this, "fieldLabelComponent");
341
+ s(this, "fieldHelpTextComponent");
342
+ this.fieldLabelComponent = new A(e), this.fieldHelpTextComponent = new S(e);
333
343
  }
334
344
  getInputsLabelText({ testId: e }) {
335
345
  return this.fieldLabelComponent.getLabelText({ testId: e });
336
346
  }
337
347
  async waitForComponent({ testId: e }) {
338
- const o = `[data-testid='${e}-${s.WRAPPER}']`;
348
+ const o = `[data-testid='${e}-${i.WRAPPER}']`;
339
349
  await this.page.waitForSelector(o);
340
350
  }
341
351
  isInputMandatory({ testId: e }) {
@@ -348,14 +358,14 @@ class G extends S {
348
358
  return this.fieldHelpTextComponent.getExtraText({ testId: e });
349
359
  }
350
360
  async clickOnApplyButton({ testId: e }) {
351
- await (await this.page.getByTestId(n(e, s.WRAPPER)).locator(".icon.icon-name--check")).click();
361
+ await (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".icon.icon-name--check")).click();
352
362
  }
353
363
  hasInlineErrorText({ testId: e }) {
354
- return this.page.getByTestId(n(e, s.TOOLTIP)).isVisible();
364
+ return this.page.getByTestId(n(e, i.TOOLTIP)).isVisible();
355
365
  }
356
366
  async getInlineErrorText({ testId: e }) {
357
367
  const o = await this.page.getByTestId(
358
- n(e, s.TOOLTIP)
368
+ n(e, i.TOOLTIP)
359
369
  );
360
370
  return await o.hover(), o.getAttribute("text");
361
371
  }
@@ -363,30 +373,29 @@ class G extends S {
363
373
  await this.isPasswordHidden({ testId: e }) && await this.clickOnPasswordIcon({ testId: e });
364
374
  }
365
375
  async clickOnPasswordIcon({ testId: e }) {
366
- await this.page.getByTestId(n(e, s.TOGGLE_PASSWORD)).click();
376
+ await this.page.getByTestId(n(e, i.TOGGLE_PASSWORD)).click();
367
377
  }
368
378
  async clickOnHidePassword({ testId: e }) {
369
379
  await this.isPasswordHidden({ testId: e }) || await this.clickOnPasswordIcon({ testId: e });
370
380
  }
371
381
  isPasswordHidden({ testId: e }) {
372
- return this.page.getByTestId(n(e, s.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
382
+ return this.page.getByTestId(n(e, i.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
373
383
  }
374
384
  async clearInput({ testId: e }) {
375
- const o = await this.page.getByTestId(
376
- n(e, s.FIELD)
377
- );
378
- await o.click({ clickCount: 2 }), await o.type("");
385
+ await (await this.page.getByTestId(
386
+ n(e, i.FIELD)
387
+ )).clear();
379
388
  }
380
389
  hasExtraTextIconType({ testId: e, type: o }) {
381
390
  return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
382
391
  }
383
392
  async isDisabled({ testId: e }) {
384
393
  return (await this.page.getByTestId(
385
- n(e, s.FIELD)
394
+ n(e, i.FIELD)
386
395
  )).isDisabled();
387
396
  }
388
397
  hasApplyButton({ testId: e }) {
389
- return this.page.getByTestId(n(e, s.WRAPPER)).locator(".icon.icon-name--check").isVisible();
398
+ return this.page.getByTestId(n(e, i.WRAPPER)).locator(".icon.icon-name--check").isVisible();
390
399
  }
391
400
  async getMaxLengthNumber({ testId: e }) {
392
401
  return (await this.getFontCaptionText({ testId: e }))[1];
@@ -395,57 +404,58 @@ class G extends S {
395
404
  return (await this.getFontCaptionText({ testId: e }))[0];
396
405
  }
397
406
  async getFontCaptionText({ testId: e }) {
398
- return (await this.page.getByTestId(n(e, s.WRAPPER)).locator(".font-caption").textContent()).split("/").map((i) => parseInt(i.trim(), 10));
407
+ return (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".font-caption").textContent()).split("/").map((p) => parseInt(p.trim(), 10));
399
408
  }
400
409
  getHelpIconText({ testId: e }) {
401
410
  return this.fieldLabelComponent.getHelpIconText({ testId: e });
402
411
  }
403
412
  }
404
- class W {
413
+ class Q {
405
414
  constructor(t) {
406
- c(this, "page");
415
+ s(this, "page");
407
416
  this.page = t;
408
417
  }
409
418
  async waitForComponent({ testId: t }) {
410
- const e = `[data-testid='${t}-${u.WRAPPER}']`;
419
+ const e = `[data-testid='${t}-${d.WRAPPER}']`;
411
420
  await this.page.waitForSelector(e);
412
421
  }
413
422
  getSelectedTabText({ testId: t }) {
414
- return this.page.getByTestId(n(t, u.WRAPPER)).locator(".tab-item--active").textContent();
423
+ return this.page.getByTestId(n(t, d.WRAPPER)).locator(".tab-item--active").textContent();
415
424
  }
416
425
  async selectTab({ testId: t, tabName: e }) {
417
426
  const o = await this.getTabIndex({ testId: t, tabName: e });
418
427
  await this.page.getByTestId(
419
- n(t, `${u.TAB}-${o + 1}`)
428
+ n(t, `${d.TAB}-${o + 1}`)
420
429
  ).click();
421
430
  }
422
431
  async getTabIndex({ testId: t, tabName: e }) {
423
- return (await this.page.getByTestId(n(t, u.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
432
+ return (await this.page.getByTestId(n(t, d.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
424
433
  }
425
434
  async isTabDisabled({ testId: t, tabName: e }) {
426
435
  const o = await this.getTabIndex({ testId: t, tabName: e });
427
- return this.page.getByTestId(n(t, `${u.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
436
+ return this.page.getByTestId(n(t, `${d.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
428
437
  }
429
438
  }
430
- class V {
439
+ class Z {
431
440
  constructor(t) {
432
- c(this, "page");
441
+ s(this, "page");
433
442
  this.page = t;
434
443
  }
435
444
  async waitForComponent({ testId: t }) {
436
- const e = `[data-testid='${t}-${E.TRIGGER}']`;
445
+ const e = `[data-testid='${t}-${I.TRIGGER}']`;
437
446
  await this.page.waitForSelector(e);
438
447
  }
439
448
  getTooltipText({ testId: t }) {
440
- return this.page.getByTestId(`${t}-${E.TRIGGER}`).getAttribute("text");
449
+ return this.page.getByTestId(`${t}-${I.TRIGGER}`).getAttribute("text");
441
450
  }
442
451
  getTooltipHeaderText({ testId: t }) {
443
- return this.page.getByTestId(`${t}-${E.TRIGGER}`).getAttribute("header");
452
+ return this.page.getByTestId(`${t}-${I.TRIGGER}`).getAttribute("header");
444
453
  }
445
454
  }
446
- class v {
455
+ const y = ".table-row", L = ".icon-wrapper", N = ".states", O = ".table-head-container", P = ".table-row.loading", v = 1e3;
456
+ class M {
447
457
  constructor(t) {
448
- c(this, "page");
458
+ s(this, "page");
449
459
  this.page = t;
450
460
  }
451
461
  async waitForComponent({ testId: t }) {
@@ -453,87 +463,10 @@ class v {
453
463
  await this.page.waitForSelector(e);
454
464
  }
455
465
  getTableRowCount({ testId: t }) {
456
- return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").count();
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 d of i) {
479
- const x = await this.getTableRowContentByIndex({
480
- testId: t,
481
- index: d
482
- });
483
- g.push(x);
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 x = (await this.getTableRowContentByIndex({
527
- testId: e,
528
- index: g
529
- })).split(`
530
- `)[t];
531
- o.push(x);
532
- }
533
- return o;
466
+ return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(y).count();
534
467
  }
535
468
  async getColumnHeaders({ testId: t }) {
536
- return this.page.getByTestId(n(t, r.TABLE)).locator(".table-head-container").allTextContents();
469
+ return this.page.getByTestId(n(t, r.TABLE)).locator(O).allTextContents();
537
470
  }
538
471
  getTableLabel({ testId: t }) {
539
472
  return this.page.getByTestId(n(t, r.HEADER)).innerText();
@@ -541,28 +474,19 @@ class v {
541
474
  getTableFooter({ testId: t }) {
542
475
  return this.page.getByTestId(n(t, r.CONTAINER)).locator(".table-footer").innerText();
543
476
  }
544
- async clickOnSortByHeaderName({ testId: t, headerName: e }) {
545
- await this.clickOnHeaderByName({ testId: t, headerName: e });
546
- }
547
- async clickOnHeaderByName({ testId: t, headerName: e }) {
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();
477
+ async clickOnHeaderByName(t) {
478
+ await this.page.locator(O, {
479
+ hasText: t
480
+ }).click();
553
481
  }
554
482
  async searchForItems({ testId: t, searchTerm: e }) {
555
- await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, s.FIELD)).fill(e);
483
+ await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, i.FIELD)).fill(e);
556
484
  }
557
485
  async clearSearchText({ testId: t }) {
558
- await this.page.getByTestId(n(t, s.FIELD)).clear();
486
+ await this.page.getByTestId(n(t, i.FIELD)).clear(), await this.waitForTableToLoad();
559
487
  }
560
- async isArrowVisible({ testId: t, headerName: e }) {
561
- const o = await this.getColumnIndexByHeader({
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();
488
+ isArrowVisible({ testId: t, headerName: e }) {
489
+ return this.page.getByTestId(n(t, r.TABLE)).locator(O, { hasText: e }).locator(".table-sort-icon").isVisible();
566
490
  }
567
491
  async scrollDownTableRows({ testId: t }) {
568
492
  const e = `[data-testid=${n(
@@ -570,47 +494,29 @@ class v {
570
494
  r.TABLE
571
495
  )}]`;
572
496
  await this.page.focus(e), await this.page.evaluate((o) => {
573
- const i = document.querySelector(o);
574
- i && (i.scrollTop = i.scrollHeight);
575
- }, e), await this.waitForTableToLoad();
497
+ const p = document.querySelector(o);
498
+ p && (p.scrollTop = p.scrollHeight);
499
+ }, e), await this.page.waitForTimeout(v);
576
500
  }
577
501
  async waitForTableToLoad() {
578
- await this.page.waitForSelector(".table-row.loading", {
502
+ await this.page.waitForSelector(P, {
579
503
  state: "hidden"
580
504
  });
581
505
  }
582
- async expandRow({
583
- testId: t,
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();
506
+ async waitingForTableLoadingToAppear() {
507
+ await this.page.waitForSelector(P);
593
508
  }
594
- async isRowExpanded({ testId: t, headerName: e, rowValue: o }) {
595
- const i = await this.getRowIndicesByRowValue({
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();
509
+ async expandRow({ testId: t, rowValue: e }) {
510
+ await this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(y, { hasText: e }).locator(L).click();
601
511
  }
602
- async getExpandedRowContent({ testId: t, headerName: e, rowValue: o }) {
603
- await this.isRowExpanded({
604
- testId: t,
605
- headerName: e,
606
- rowValue: o
607
- }) || await this.expandRow({ testId: t, headerName: e, rowValue: o });
608
- const g = await this.getRowIndicesByRowValue({
512
+ isRowExpanded({ testId: t, rowValue: e }) {
513
+ return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(y, { hasText: e }).locator(L).isVisible();
514
+ }
515
+ async getExpandedRowContent({ testId: t, rowValue: e }) {
516
+ return await this.isRowExpanded({
609
517
  testId: t,
610
- rowHeader: e,
611
- rowValue: o
612
- });
613
- return this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(g[0]).locator(".icon-wrapper").textContent();
518
+ rowValue: e
519
+ }) || await this.expandRow({ testId: t, rowValue: e }), this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(y, { hasText: e }).locator(L).textContent();
614
520
  }
615
521
  isEmptyStateVisible({ testId: t }) {
616
522
  return this.page.getByTestId(n(t, r.TABLE)).locator(".empty-state").isVisible();
@@ -621,27 +527,26 @@ class v {
621
527
  getEmptyStateSubtitle({ testId: t }) {
622
528
  return this.page.getByTestId(n(t, r.TABLE)).locator(".font-body-1.subtitle").textContent();
623
529
  }
624
- async clickOnRowCheckboxByIndex({ testId: t, index: e }) {
625
- await this.page.getByTestId(n(t, r.BODY_WRAPPER)).locator(".table-row").nth(e).locator(".states").click();
626
- }
627
- async clickOnRowCheckboxByRowValue({ testId: t, rowHeader: e, rowValue: o }) {
628
- const i = await this.getRowIndicesByRowValue({
629
- testId: t,
630
- rowHeader: e,
631
- rowValue: o
632
- });
633
- await this.clickOnRowCheckboxByIndex({ testId: t, index: i });
530
+ async clickOnRowCheckboxByRowValue({ testId: t, rowValue: e }) {
531
+ await this.page.getByTestId(n(t, r.TABLE)).locator(y, {
532
+ hasText: e
533
+ }).locator(N).click();
634
534
  }
635
535
  getCheckedRowsNumber({ testId: t }) {
636
- return this.page.getByTestId(n(t, r.TABLE)).locator(".table-row").locator(".icon.checked").count();
536
+ return this.page.getByTestId(n(t, r.TABLE)).locator(y).locator(".icon.checked").count();
637
537
  }
638
538
  async clickOnSelectAllCheckbox({ testId: t }) {
639
- await this.page.getByTestId(n(t, r.TABLE)).locator(".states").nth(0).click();
539
+ await this.page.getByTestId(n(t, r.TABLE)).locator(N).nth(0).click();
540
+ }
541
+ getTableLocator({ testId: t }) {
542
+ return this.page.getByTestId(
543
+ n(t, r.CONTAINER)
544
+ );
640
545
  }
641
546
  }
642
547
  class U {
643
548
  constructor(t) {
644
- c(this, "page");
549
+ s(this, "page");
645
550
  this.page = t;
646
551
  }
647
552
  async waitForComponent({ testId: t }) {
@@ -651,10 +556,19 @@ class U {
651
556
  async clickOnButton({ testId: t }) {
652
557
  await this.page.click(`[data-testid='${t}']`);
653
558
  }
559
+ async isButtonLoading({ testId: t }) {
560
+ return (await this.page.getByTestId(t).getAttribute("class")).includes("loading");
561
+ }
562
+ async getButtonText({ testId: t }) {
563
+ return this.page.getByTestId(t).locator(".font-button").textContent();
564
+ }
565
+ isButtonDisabled({ testId: t }) {
566
+ return this.page.getByTestId(t).isDisabled();
567
+ }
654
568
  }
655
- class Y {
569
+ class tt {
656
570
  constructor(t) {
657
- c(this, "page");
571
+ s(this, "page");
658
572
  this.page = t;
659
573
  }
660
574
  async waitForComponent({ testId: t }) {
@@ -678,8 +592,8 @@ class Y {
678
592
  const o = await this.getActionButtonIndex({
679
593
  testId: t,
680
594
  buttonName: e
681
- }), i = `[data-testid='${t}-${h.ACTION_BUTTON}-${o}']`;
682
- await this.page.click(i);
595
+ }), p = `[data-testid='${t}-${h.ACTION_BUTTON}-${o}']`;
596
+ await this.page.click(p);
683
597
  }
684
598
  async getActionButtonIndex({
685
599
  testId: t,
@@ -688,47 +602,246 @@ class Y {
688
602
  return (await this.page.getByTestId(n(t, h.CONTAINER)).locator(".font-button").allTextContents()).indexOf(e);
689
603
  }
690
604
  }
691
- class f {
605
+ class et {
692
606
  constructor(t) {
693
- c(this, "page");
607
+ s(this, "page");
694
608
  this.page = t;
695
609
  }
696
610
  async waitForComponent({ testId: t }) {
697
- const e = `[data-testid='${t}-${y.WRAPPER}']`;
611
+ const e = `[data-testid='${t}-${C.WRAPPER}']`;
698
612
  await this.page.waitForSelector(e);
699
613
  }
700
614
  async closeMultiBar({ testId: t }) {
701
- await this.page.getByTestId(n(t, y.CLOSE_BTN)).locator(".icon-wrapper").click();
615
+ await this.page.getByTestId(n(t, C.CLOSE_BTN)).locator(".icon-wrapper").click();
702
616
  }
703
617
  getMultiBarCountText({ testId: t }) {
704
- return this.page.getByTestId(n(t, y.WRAPPER)).locator(".count-text").textContent();
618
+ return this.page.getByTestId(n(t, C.WRAPPER)).locator(".count-text").textContent();
705
619
  }
706
620
  async isMultiBarVisible({ testId: t }) {
707
- return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, y.WRAPPER)).locator(".multi-bar-panel").isVisible();
621
+ return await this.page.waitForTimeout(1e3), this.page.getByTestId(n(t, C.WRAPPER)).locator(".multi-bar-panel").isVisible();
708
622
  }
709
623
  async clickOnActionButton({ testId: t, actionButtonId: e }) {
710
624
  await this.page.getByTestId(
711
625
  n(
712
626
  t,
713
- `${y.ACTION}-${e}`
627
+ `${C.ACTION}-${e}`
714
628
  )
715
629
  ).locator(".start-icon").click();
716
630
  }
717
631
  }
632
+ class at {
633
+ constructor(t) {
634
+ s(this, "page");
635
+ this.page = t;
636
+ }
637
+ async waitForComponent({ testId: t }) {
638
+ const e = `[data-testid='${t}-${w.TEXT}']`;
639
+ await this.page.waitForSelector(e);
640
+ }
641
+ getFormRowTitle({ testId: t }) {
642
+ return new A(this.page).getLabelText({ testId: t });
643
+ }
644
+ isFormRowMandatory({ testId: t }) {
645
+ return new A(this.page).isMandatory({ testId: t });
646
+ }
647
+ getIconText({ testId: t }) {
648
+ return new S(this.page).getExtraText({ testId: t });
649
+ }
650
+ }
651
+ class nt {
652
+ constructor(t) {
653
+ s(this, "page");
654
+ this.page = t;
655
+ }
656
+ async waitForComponent({ testId: t }) {
657
+ const e = `[data-testid='${t}-${u.CONTENT}']`;
658
+ await this.page.waitForSelector(e);
659
+ }
660
+ getCardTitle({ testId: t }) {
661
+ return this.page.getByTestId(n(t, u.TITLE)).textContent();
662
+ }
663
+ getCardContentText({ testId: t }) {
664
+ return this.page.getByTestId(n(t, u.CONTENT)).textContent();
665
+ }
666
+ getCardLabelText({ testId: t }) {
667
+ return new A(this.page).getLabelText({ testId: t });
668
+ }
669
+ async clickOnSaveButton({ testId: t }) {
670
+ await this.page.getByTestId(n(t, u.SAVE_BUTTON)).click();
671
+ }
672
+ async clickOnCancelButton({ testId: t }) {
673
+ await this.page.getByTestId(n(t, u.CANCEL_BUTTON)).click();
674
+ }
675
+ isSaveButtonLoading({ testId: t }) {
676
+ return new U(this.page).isButtonLoading({ testId: t });
677
+ }
678
+ async clearForm({
679
+ testId: t,
680
+ inputType: e
681
+ }) {
682
+ (await this.page.getByTestId(n(t, u.CONTENT)).locator(
683
+ `[data-testid='ad-units-form-card-form-card-content'] input[type='${e}']`
684
+ ).all()).forEach((p) => p.clear());
685
+ }
686
+ }
687
+ class E extends k {
688
+ constructor(t) {
689
+ super(t);
690
+ }
691
+ async waitForComponent({ testId: t }) {
692
+ const e = `[data-testid='${t}-${i.WRAPPER}']`;
693
+ await this.page.waitForSelector(e);
694
+ }
695
+ async isViewOnly({ testId: t }) {
696
+ return await this.page.getByTestId(n(t, i.WRAPPER)).locator(".view-only.input-type").count() > 0;
697
+ }
698
+ getLabel({ testId: t }) {
699
+ return this.page.getByTestId(n(t, i.LABEL_TEXT)).textContent();
700
+ }
701
+ isInputMandatory({ testId: t }) {
702
+ return this.page.getByTestId(n(t, i.MANDATORY)).isVisible();
703
+ }
704
+ hasInputExtraHelpText({ testId: t }) {
705
+ return this.page.getByTestId(n(t, i.EXTRA_TEXT)).isVisible();
706
+ }
707
+ async getHelpIconText({ testId: t }) {
708
+ const e = await this.page.getByTestId(n(t, i.LABEL_CONTAINER)).locator(".v-popper.v-popper--theme-default");
709
+ return await e.hover(), e.getAttribute("text");
710
+ }
711
+ getInputExtraText({ testId: t }) {
712
+ return this.page.getByTestId(n(t, i.EXTRA_TEXT)).textContent();
713
+ }
714
+ getErrorExtraText({ testId: t }) {
715
+ return this.page.getByTestId(n(t, i.EXTRA_TEXT)).locator(".error").textContent();
716
+ }
717
+ async showPassword({ testId: t }) {
718
+ await this.isPasswordHidden({ testId: t }) && await this.clickOnPasswordButton({ testId: t });
719
+ }
720
+ async isPasswordHidden({ testId: t }) {
721
+ return await this.page.getByTestId(n(t, i.WRAPPER)).getAttribute("type") === "password";
722
+ }
723
+ async clickOnPasswordButton({ testId: t }) {
724
+ await (await this.page.getByTestId(n(t, i.WRAPPER)).locator(".password-visibility")).click();
725
+ }
726
+ }
727
+ class ot {
728
+ constructor(t) {
729
+ s(this, "page");
730
+ this.page = t;
731
+ }
732
+ async waitForComponent({ testId: t }) {
733
+ const e = `[data-testid='${t}-${R.CONTAINER}']`;
734
+ await this.page.waitForSelector(e);
735
+ }
736
+ async searchInput({ testId: t, searchTerm: e }) {
737
+ await new E(this.page).addInput({ testId: t, text: e });
738
+ }
739
+ async clearInput({ testId: t }) {
740
+ await new E(this.page).clearInput({ testId: t });
741
+ }
742
+ async clickOnXButton({ testId: t }) {
743
+ await this.page.getByTestId(n(t, R.CLEAR)).locator(".icon-name--x-circle").click();
744
+ }
745
+ isDisabled({ testId: t }) {
746
+ return new E(this.page).isDisabled({ testId: t });
747
+ }
748
+ getSearchPlaceholder({ testId: t }) {
749
+ return new E(this.page).getPlaceholderText({ testId: t });
750
+ }
751
+ getSearchInputValue({ testId: t }) {
752
+ return new E(this.page).getInputsFieldText({ testId: t });
753
+ }
754
+ }
755
+ class V {
756
+ constructor(t) {
757
+ s(this, "page");
758
+ this.page = t;
759
+ }
760
+ async waitForComponent({ testId: t }) {
761
+ const e = `[data-testid='${t}-${b.TEXT}']`;
762
+ await this.page.waitForSelector(e);
763
+ }
764
+ getInlineCopyText({ testId: t }) {
765
+ return this.page.getByTestId(`${t}-${b.TEXT}`).textContent();
766
+ }
767
+ }
768
+ class it {
769
+ constructor(t) {
770
+ s(this, "page");
771
+ this.page = t;
772
+ }
773
+ async waitForComponent({ testId: t }) {
774
+ const e = `[data-testid='${t}-${m.TITLE}']`;
775
+ await this.page.waitForSelector(e);
776
+ }
777
+ getHeaderTitle({ testId: t }) {
778
+ return this.page.getByTestId(`${t}-${m.TITLE}`).textContent();
779
+ }
780
+ getInlineCopyText({ testId: t }) {
781
+ return new V(this.page).getInlineCopyText({
782
+ testId: t
783
+ });
784
+ }
785
+ async isIconPresent({
786
+ testId: t,
787
+ iconName: e
788
+ }) {
789
+ return await this.page.getByTestId(`${t}-${m.APP_PLATFORM}`).getAttribute("data-platform") === e;
790
+ }
791
+ }
792
+ class st {
793
+ constructor(t) {
794
+ s(this, "page");
795
+ this.page = t;
796
+ }
797
+ async waitForComponent({ testId: t }) {
798
+ const e = `[data-testid='${t}-${T.WRAPPER}']`;
799
+ await this.page.waitForSelector(e);
800
+ }
801
+ getAlertText({ testId: t }) {
802
+ return this.page.getByTestId(n(t, T.MESSAGE)).textContent();
803
+ }
804
+ getAlertTitle({ testId: t }) {
805
+ return this.page.getByTestId(n(t, T.TITLE)).textContent();
806
+ }
807
+ async clickOnActionButton({ testId: t }) {
808
+ await this.page.click(
809
+ n(t, T.ACTION_BUTTON)
810
+ );
811
+ }
812
+ getActionButtonText({ testId: t }) {
813
+ return this.page.getByTestId(n(t, T.ACTION_BUTTON)).textContent();
814
+ }
815
+ async closeAlert({ testId: t }) {
816
+ await this.page.getByTestId(n(t, T.CLOSE_BUTTON)).click();
817
+ }
818
+ async isAlertVisible({ testId: t }) {
819
+ return await this.page.getByTestId(n(t, T.WRAPPER)).count() > 0;
820
+ }
821
+ getAlertIconType({ testId: t }) {
822
+ return this.page.getByTestId(n(t, T.WRAPPER)).getAttribute("class");
823
+ }
824
+ }
718
825
  export {
719
- k as BannerComponent,
826
+ st as AlertComponent,
827
+ it as AppHeaderComponent,
828
+ Y as BannerComponent,
720
829
  U as ButtonComponent,
721
- _ as ComponentBasePage,
722
- F as DialogComponent,
723
- D as DropdownComponent,
724
- H as DropdownComponentV3,
725
- m as FieldHelpTextComponent,
726
- I as FieldLabelComponent,
727
- $ as IncludeExcludeComponent,
728
- G as InputsComponent,
729
- f as MultiBarComponent,
730
- Y as SnackbarComponent,
731
- v as TableComponent,
732
- W as TabsComponent,
733
- V as TooltipComponent
830
+ f as ComponentBasePage,
831
+ j as DialogComponent,
832
+ K as DropdownComponent,
833
+ q as DropdownComponentV3,
834
+ S as FieldHelpTextComponent,
835
+ A as FieldLabelComponent,
836
+ nt as FormCardComponent,
837
+ at as FormRowComponent,
838
+ z as IncludeExcludeComponent,
839
+ V as InlineCopyComponent,
840
+ J as InputsComponent,
841
+ et as MultiBarComponent,
842
+ ot as SearchComponent,
843
+ tt as SnackbarComponent,
844
+ M as TableComponent,
845
+ Q as TabsComponent,
846
+ Z as TooltipComponent
734
847
  };