@ironsource/shared-ui-e2e 2.1.1-rc.3 → 2.1.1-test.4
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 +17 -18
- package/shared-e2e-commands.js +638 -0
- package/shared-e2e-commands.umd.cjs +2 -0
- package/tests/components/autocompleteDropdown/autocompleteDropdown-component.d.ts +16 -0
- package/tests/components/autocompleteDropdown/autocompleteDropdown-page.d.ts +16 -0
- package/tests/components/autocompleteDropdown/consts.d.ts +4 -0
- package/tests/components/autocompleteDropdown/types.d.ts +25 -0
- package/tests/components/banner/banner-component.d.ts +13 -0
- package/tests/components/banner/banner-page.d.ts +10 -0
- package/tests/components/banner/consts.d.ts +6 -0
- package/tests/components/banner/types.d.ts +4 -0
- package/tests/components/base-page/component-base-page.d.ts +10 -0
- package/tests/components/base-page/types.d.ts +11 -0
- package/tests/components/dialog/consts.d.ts +4 -0
- package/tests/components/dialog/dialog-component.d.ts +32 -0
- package/tests/components/dialog/dialog-page.d.ts +19 -0
- package/tests/components/dropdown/base-dropdown.d.ts +22 -0
- package/tests/components/dropdown/dropdown-v3/consts.d.ts +3 -0
- package/tests/components/dropdown/dropdown-v3/dropdown-component.d.ts +17 -0
- package/tests/components/dropdown/dropdown-v3/dropdown-page.d.ts +18 -0
- package/tests/components/dropdown/dropdown-v4/consts.d.ts +3 -0
- package/tests/components/dropdown/dropdown-v4/dropdown-component.d.ts +51 -0
- package/tests/components/dropdown/dropdown-v4/dropdown-page.d.ts +24 -0
- package/tests/components/dropdown/types.d.ts +16 -0
- package/tests/components/fieldHelpText/field-help-text-component.d.ts +12 -0
- package/tests/components/fieldHelpText/types.d.ts +4 -0
- package/tests/components/fieldLabel/field-label-component.d.ts +14 -0
- package/tests/components/includeExclude/consts.d.ts +3 -0
- package/tests/components/includeExclude/include-exclude-component.d.ts +31 -0
- package/tests/components/includeExclude/include-exclude-page.d.ts +21 -0
- package/tests/components/includeExclude/types.d.ts +18 -0
- package/tests/components/inputs/base-input.d.ts +22 -0
- package/tests/components/inputs/input-v3/consts.d.ts +13 -0
- package/tests/components/inputs/input-v3/input-component.d.ts +38 -0
- package/tests/components/inputs/input-v3/input-page.d.ts +25 -0
- package/tests/components/inputs/input-v4/consts.d.ts +3 -0
- package/tests/components/inputs/input-v4/inputs-component.d.ts +66 -0
- package/tests/components/inputs/input-v4/inputs-page.d.ts +32 -0
- package/tests/components/inputs/inputs-v3/checkbox/checkbox-component.d.ts +20 -0
- package/tests/components/inputs/inputs-v3/checkbox/checkbox-page.d.ts +12 -0
- package/tests/components/inputs/inputs-v3/checkbox/consts.d.ts +5 -0
- package/tests/components/inputs/inputs-v3/radio/consts.d.ts +6 -0
- package/tests/components/inputs/inputs-v3/radio/radio-component.d.ts +19 -0
- package/tests/components/inputs/inputs-v3/radio/radio-page.d.ts +15 -0
- package/tests/components/inputs/inputs-v3/radio/types.d.ts +4 -0
- package/tests/components/inputs/inputs-v3/switch/consts.d.ts +3 -0
- package/tests/components/inputs/inputs-v3/switch/switch-component.d.ts +14 -0
- package/tests/components/inputs/inputs-v3/switch/switch-page.d.ts +11 -0
- package/tests/components/inputs/inputs-v3/switch/types.d.ts +4 -0
- package/tests/components/inputs/inputs-v3/text-area/consts.d.ts +8 -0
- package/tests/components/inputs/inputs-v3/text-area/text-area-component.d.ts +37 -0
- package/tests/components/inputs/inputs-v3/text-area/text-area-page.d.ts +20 -0
- package/tests/components/inputs/inputs-v3/text-area/types.d.ts +4 -0
- package/tests/components/inputs/types.d.ts +4 -0
- package/tests/components/table/consts.d.ts +6 -0
- package/tests/components/table/table-component.d.ts +70 -0
- package/tests/components/table/table-page.d.ts +35 -0
- package/tests/components/table/types.d.ts +8 -0
- package/tests/components/tabs/consts.d.ts +3 -0
- package/tests/components/tabs/tabs-component.d.ts +15 -0
- package/tests/components/tabs/tabs-page.d.ts +15 -0
- package/tests/components/tabs/types.d.ts +4 -0
- package/tests/components/tooltip/consts.d.ts +3 -0
- package/tests/components/tooltip/tooltip-component.d.ts +14 -0
- package/tests/components/tooltip/tooltip-page.d.ts +13 -0
- package/tests/global/types.d.ts +3 -0
- package/tests/global/utils.d.ts +4 -0
- package/tests/index.d.ts +13 -0
- package/tests/testids/index.d.ts +197 -0
- package/tsconfig.tsbuildinfo +1 -1
- package/vite.config.d.ts +2 -0
- package/components/banner/banner-component.ts +0 -21
- package/components/base-page/component-base-page.ts +0 -25
- package/components/dialog/dialog-component.ts +0 -49
- package/components/dropdown/base-dropdown.ts +0 -44
- package/components/dropdown/dropdown-v3/dropdown-component.ts +0 -20
- package/components/dropdown/dropdown-v4/dropdown-component.ts +0 -57
- package/components/fieldHelpText/field-help-text-component.ts +0 -20
- package/components/fieldLabel/field-label-component.ts +0 -23
- package/components/includeExclude/include-exclude-component.ts +0 -71
- package/components/inputs/base-input.ts +0 -29
- package/components/inputs/input-v4/inputs-component.ts +0 -84
- package/components/table/table-component.ts +0 -184
- package/components/tabs/tabs-component.ts +0 -31
- package/components/tooltip/tooltip-component.ts +0 -20
- package/global/utils.ts +0 -20
- package/index.ts +0 -26
- package/testids/index.ts +0 -14
package/package.json
CHANGED
|
@@ -1,7 +1,9 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ironsource/shared-ui-e2e",
|
|
3
|
-
"
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "2.1.1-test.4",
|
|
4
5
|
"description": "",
|
|
6
|
+
"type": "module",
|
|
5
7
|
"engines": {
|
|
6
8
|
"npm": ">=7.0.0",
|
|
7
9
|
"node": ">=16.0.0"
|
|
@@ -15,28 +17,25 @@
|
|
|
15
17
|
"build": "vite build && tsc --declaration --project tsconfig.json"
|
|
16
18
|
},
|
|
17
19
|
"keywords": [],
|
|
18
|
-
"author": "",
|
|
19
|
-
"license": "
|
|
20
|
-
"main": "./
|
|
21
|
-
"module": "./
|
|
20
|
+
"author": "Alex Ilin",
|
|
21
|
+
"license": "MIT",
|
|
22
|
+
"main": "./shared-e2e-commands.js",
|
|
23
|
+
"module": "./shared-e2e-commands.js",
|
|
24
|
+
"types": "./tests/index.d.ts",
|
|
25
|
+
"exports": {
|
|
26
|
+
".": {
|
|
27
|
+
"import": "./shared-e2e-commands.js",
|
|
28
|
+
"require": "./shared-e2e-commands.umd.cjs"
|
|
29
|
+
},
|
|
30
|
+
"./commands": "./tests/index.d.ts"
|
|
31
|
+
},
|
|
22
32
|
"devDependencies": {
|
|
23
33
|
"@playwright/test": "1.37.1",
|
|
24
34
|
"typescript": "^5.0.2",
|
|
25
35
|
"vite": "^4.4.5",
|
|
26
36
|
"vite-plugin-static-copy": "^0.17.0"
|
|
27
37
|
},
|
|
28
|
-
"
|
|
29
|
-
"
|
|
30
|
-
".": {
|
|
31
|
-
"import": "./index.ts",
|
|
32
|
-
"require": "./index.ts"
|
|
33
|
-
}
|
|
34
|
-
},
|
|
35
|
-
"typesVersions": {
|
|
36
|
-
"*": {
|
|
37
|
-
"includeExclude": [
|
|
38
|
-
".tests/components/includeExclude/include-exclude-component.d.ts"
|
|
39
|
-
]
|
|
40
|
-
}
|
|
38
|
+
"dependencies": {
|
|
39
|
+
"vite-plugin-dts": "^3.7.1"
|
|
41
40
|
}
|
|
42
41
|
}
|
|
@@ -0,0 +1,638 @@
|
|
|
1
|
+
var A = Object.defineProperty;
|
|
2
|
+
var m = (a, t, e) => t in a ? A(a, t, { enumerable: !0, configurable: !0, writable: !0, value: e }) : a[t] = e;
|
|
3
|
+
var l = (a, t, e) => (m(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 || {}), 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 || {}), y = /* @__PURE__ */ ((a) => (a.WRAPPER = "banner-wrapper", a.CONTENT = "banner-content", a))(y || {}), 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 || {}), C = /* @__PURE__ */ ((a) => (a.CONTAINER = "search-container", a.FIELD = "search-field", a.CLOSE = "search-close", a.CLEAR = "search-clear", a))(C || {}), s = /* @__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))(s || {}), d = /* @__PURE__ */ ((a) => (a.TEXT = "tt-text", a.TRIGGER = "tt-trigger", a.HEADER = "tt-header", a))(d || {}), h = /* @__PURE__ */ ((a) => (a.WRAPPER = "tabs-wrapper", a.TAB = "tabs-tab", a))(h || {}), u = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-label-container", a.TEXT = "field-label-text", a.MANDATORY = "field-label-mandatory", a.TOOLTIP = "field-label-help-tooltip", a))(u || {}), w = /* @__PURE__ */ ((a) => (a.CONTAINER = "field-help-text-container", a.TEXT = "field-help-text-text", a.ICON = "field-help-text-icon", a))(w || {});
|
|
5
|
+
const L = (a, t) => {
|
|
6
|
+
const e = new URLSearchParams(a).toString();
|
|
7
|
+
return t.includes("?") ? `${t}${e}` : `${t}?${e}`;
|
|
8
|
+
}, b = (a, t = {}) => {
|
|
9
|
+
const e = [];
|
|
10
|
+
Object.entries(t).forEach(([T, E]) => {
|
|
11
|
+
e.push(`${T}:${E}`);
|
|
12
|
+
});
|
|
13
|
+
const o = {
|
|
14
|
+
id: a,
|
|
15
|
+
viewMode: "story",
|
|
16
|
+
args: e.join(";")
|
|
17
|
+
};
|
|
18
|
+
return L(o, "iframe.html");
|
|
19
|
+
}, n = (a, t) => `${a}-${t}`;
|
|
20
|
+
class S {
|
|
21
|
+
constructor(t) {
|
|
22
|
+
l(this, "page");
|
|
23
|
+
this.page = t;
|
|
24
|
+
}
|
|
25
|
+
async waitForComponent({ testId: t }) {
|
|
26
|
+
const e = `[data-testid='${t}-${y.WRAPPER}']`;
|
|
27
|
+
await this.page.waitForSelector(e);
|
|
28
|
+
}
|
|
29
|
+
getBannerText({ testId: t }) {
|
|
30
|
+
return this.page.getByTestId(n(t, y.CONTENT)).textContent();
|
|
31
|
+
}
|
|
32
|
+
hasBannerType({ testId: t, type: e }) {
|
|
33
|
+
return this.page.getByTestId(n(t, y.WRAPPER)).locator(`.icon.icon-name--${e}`) !== null;
|
|
34
|
+
}
|
|
35
|
+
}
|
|
36
|
+
class N {
|
|
37
|
+
constructor(t) {
|
|
38
|
+
l(this, "page");
|
|
39
|
+
l(this, "testId");
|
|
40
|
+
l(this, "componentId");
|
|
41
|
+
l(this, "loadedPageSelector");
|
|
42
|
+
this.page = t.page, this.testId = t.testId, this.componentId = t.componentId, this.loadedPageSelector = t.loadedPageSelector;
|
|
43
|
+
}
|
|
44
|
+
async goto(t = {}) {
|
|
45
|
+
const e = {
|
|
46
|
+
testId: this.testId,
|
|
47
|
+
...t.additionalComponentParams
|
|
48
|
+
};
|
|
49
|
+
await this.page.goto(
|
|
50
|
+
b(
|
|
51
|
+
t.storyId || this.componentId,
|
|
52
|
+
e
|
|
53
|
+
)
|
|
54
|
+
), await this.page.waitForSelector(this.loadedPageSelector);
|
|
55
|
+
}
|
|
56
|
+
}
|
|
57
|
+
class k {
|
|
58
|
+
constructor(t) {
|
|
59
|
+
l(this, "page");
|
|
60
|
+
this.page = t;
|
|
61
|
+
}
|
|
62
|
+
async waitForComponent({ testId: t }) {
|
|
63
|
+
const e = `[data-testid='${t}-${g.WRAPPER}']`;
|
|
64
|
+
await this.page.waitForSelector(e);
|
|
65
|
+
}
|
|
66
|
+
getDialogTitle({ testId: t }) {
|
|
67
|
+
return this.page.getByTestId(n(t, g.HEADER)).locator(".font-heading-3").textContent();
|
|
68
|
+
}
|
|
69
|
+
getDialogText({ testId: t }) {
|
|
70
|
+
return this.page.getByTestId(n(t, g.CONTENT)).textContent();
|
|
71
|
+
}
|
|
72
|
+
async closeDialog({ testId: t }) {
|
|
73
|
+
await (await this.page.getByTestId(
|
|
74
|
+
n(t, g.ACTION_CLOSE)
|
|
75
|
+
)).click();
|
|
76
|
+
}
|
|
77
|
+
async clickOnPrimaryButton({ testId: t }) {
|
|
78
|
+
await (await this.page.getByTestId(
|
|
79
|
+
n(t, g.ACTION_BUTTONS_WRAPPER)
|
|
80
|
+
).locator(".primary")).click();
|
|
81
|
+
}
|
|
82
|
+
async clickOnDefaultButton({ testId: t }) {
|
|
83
|
+
await (await this.page.getByTestId(
|
|
84
|
+
n(t, g.ACTION_BUTTONS_WRAPPER)
|
|
85
|
+
).locator(".default")).click();
|
|
86
|
+
}
|
|
87
|
+
async clickOnDeleteButton({ testId: t }) {
|
|
88
|
+
await (await this.page.getByTestId(
|
|
89
|
+
n(t, g.ACTION_BUTTONS_WRAPPER)
|
|
90
|
+
).locator(".danger")).click();
|
|
91
|
+
}
|
|
92
|
+
getDialogSubtitle({ testId: t }) {
|
|
93
|
+
return this.page.getByTestId(n(t, g.HEADER)).locator(".subtitle").textContent();
|
|
94
|
+
}
|
|
95
|
+
async isDialogVisible({ testId: t }) {
|
|
96
|
+
return await this.page.waitForTimeout(1e3), (await this.page.getByTestId(
|
|
97
|
+
n(t, g.WRAPPER)
|
|
98
|
+
)).isVisible();
|
|
99
|
+
}
|
|
100
|
+
}
|
|
101
|
+
class x {
|
|
102
|
+
constructor(t) {
|
|
103
|
+
l(this, "page");
|
|
104
|
+
this.page = t;
|
|
105
|
+
}
|
|
106
|
+
async waitForComponent({ testId: t }) {
|
|
107
|
+
await this.page.getByTestId(
|
|
108
|
+
n(t, c.WRAPPER)
|
|
109
|
+
);
|
|
110
|
+
}
|
|
111
|
+
async selectDropdownOptionByIndex({ testId: t, index: e }) {
|
|
112
|
+
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(e).click();
|
|
113
|
+
}
|
|
114
|
+
async openDropdownComponent({ testId: t }) {
|
|
115
|
+
await this.page.getByTestId(n(t, c.TRIGGER)).click({ position: { x: 10, y: 10 } });
|
|
116
|
+
}
|
|
117
|
+
async selectDropdownOptionByName({ testId: t, name: e }) {
|
|
118
|
+
await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span", { hasText: e }).click();
|
|
119
|
+
}
|
|
120
|
+
async selectMultipleItemsByIndex({ testId: t, itemsToSelect: e }) {
|
|
121
|
+
await this.openDropdownComponent({ testId: t });
|
|
122
|
+
for (const o of e)
|
|
123
|
+
await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li").nth(o).click();
|
|
124
|
+
}
|
|
125
|
+
async selectMultipleItemsByName({
|
|
126
|
+
testId: t,
|
|
127
|
+
itemsToSelect: e
|
|
128
|
+
}) {
|
|
129
|
+
await this.openDropdownComponent({ testId: t });
|
|
130
|
+
for (const o of e)
|
|
131
|
+
await this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span", { hasText: o }).first().click();
|
|
132
|
+
}
|
|
133
|
+
async clickOnApply({ testId: t }) {
|
|
134
|
+
await this.page.getByTestId(n(t, c.ACTION_APPLY)).click();
|
|
135
|
+
}
|
|
136
|
+
async clickOnCancel({ testId: t }) {
|
|
137
|
+
await this.page.getByTestId(n(t, c.ACTION_CANCEL)).click();
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
class B {
|
|
141
|
+
constructor(t) {
|
|
142
|
+
l(this, "page");
|
|
143
|
+
this.page = t;
|
|
144
|
+
}
|
|
145
|
+
getLabelText({ testId: t }) {
|
|
146
|
+
return this.page.getByTestId(n(t, u.TEXT)).textContent();
|
|
147
|
+
}
|
|
148
|
+
isMandatory({ testId: t }) {
|
|
149
|
+
return this.page.getByTestId(n(t, u.MANDATORY)).isVisible();
|
|
150
|
+
}
|
|
151
|
+
async getHelpIconText({ testId: t }) {
|
|
152
|
+
const e = await this.page.getByTestId(
|
|
153
|
+
n(t, u.TOOLTIP)
|
|
154
|
+
);
|
|
155
|
+
return await e.hover(), e.getAttribute("text");
|
|
156
|
+
}
|
|
157
|
+
}
|
|
158
|
+
class R {
|
|
159
|
+
constructor(t) {
|
|
160
|
+
l(this, "page");
|
|
161
|
+
this.page = t;
|
|
162
|
+
}
|
|
163
|
+
hasExtraText({ testId: t }) {
|
|
164
|
+
return this.page.getByTestId(n(t, w.TEXT)).isVisible();
|
|
165
|
+
}
|
|
166
|
+
getExtraText({ testId: t }) {
|
|
167
|
+
return this.page.getByTestId(n(t, w.TEXT)).textContent();
|
|
168
|
+
}
|
|
169
|
+
async hasExtraTextIconType({ testId: t, type: e }) {
|
|
170
|
+
return await (await this.page.getByTestId(n(t, w.CONTAINER)).locator(`.icon.icon-name--${e}`)).count() !== 0;
|
|
171
|
+
}
|
|
172
|
+
}
|
|
173
|
+
class _ extends x {
|
|
174
|
+
constructor(e) {
|
|
175
|
+
super(e);
|
|
176
|
+
l(this, "fieldLabelComponent");
|
|
177
|
+
l(this, "fieldHelpTextComponent");
|
|
178
|
+
this.fieldLabelComponent = new B(e), this.fieldHelpTextComponent = new R(e);
|
|
179
|
+
}
|
|
180
|
+
getDropdownTitle({ testId: e }) {
|
|
181
|
+
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
182
|
+
}
|
|
183
|
+
isMandatory({ testId: e }) {
|
|
184
|
+
return this.fieldLabelComponent.isMandatory({ testId: e });
|
|
185
|
+
}
|
|
186
|
+
getHelpIconText({ testId: e }) {
|
|
187
|
+
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
188
|
+
}
|
|
189
|
+
hasExtraText({ testId: e }) {
|
|
190
|
+
return this.fieldHelpTextComponent.hasExtraText({ testId: e });
|
|
191
|
+
}
|
|
192
|
+
getExtraText({ testId: e }) {
|
|
193
|
+
return this.fieldHelpTextComponent.getExtraText({ testId: e });
|
|
194
|
+
}
|
|
195
|
+
hasExtraTextIconType({ testId: e, type: o }) {
|
|
196
|
+
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
|
|
197
|
+
}
|
|
198
|
+
getSelectedLabel({ testId: e }) {
|
|
199
|
+
return this.page.getByTestId(n(e, c.BUTTON_CONTENT)).textContent();
|
|
200
|
+
}
|
|
201
|
+
async searchForItem({ testId: e, searchTerm: o }) {
|
|
202
|
+
return await this.openDropdownComponent({ testId: e }), await this.page.getByTestId(n(e, i.FIELD)).fill(o), this.page.getByTestId(n(e, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
203
|
+
}
|
|
204
|
+
isErrorText({ testId: e }) {
|
|
205
|
+
return this.page.getByTestId(n(e, c.TRIGGER)).locator(".state-error").isVisible();
|
|
206
|
+
}
|
|
207
|
+
async isDisabled({ testId: e }) {
|
|
208
|
+
return (await this.page.getByTestId(n(e, c.TRIGGER)).locator(".button__container--disabled")).isVisible();
|
|
209
|
+
}
|
|
210
|
+
async clearAllOptions({ testId: e }) {
|
|
211
|
+
await this.page.getByTestId(n(e, c.ACTION_CLEAR_ALL)).click();
|
|
212
|
+
}
|
|
213
|
+
isSelectAllChecked({ testId: e }) {
|
|
214
|
+
return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".checkbox.input").isChecked();
|
|
215
|
+
}
|
|
216
|
+
isSelectAllIndeterminate({ testId: e }) {
|
|
217
|
+
return this.page.getByTestId(n(e, c.SELECT_ALL)).locator(".icon.indeterminate").isVisible();
|
|
218
|
+
}
|
|
219
|
+
async removeChipSelection({ testId: e }) {
|
|
220
|
+
await this.page.getByTestId(n(e, c.BUTTON_CLEAR)).click();
|
|
221
|
+
}
|
|
222
|
+
}
|
|
223
|
+
class H extends x {
|
|
224
|
+
constructor(t) {
|
|
225
|
+
super(t);
|
|
226
|
+
}
|
|
227
|
+
getDropdownTitle({ testId: t }) {
|
|
228
|
+
return this.page.getByTestId(n(t, c.WRAPPER)).locator("label > span").textContent();
|
|
229
|
+
}
|
|
230
|
+
getSelectedItem({ testId: t }) {
|
|
231
|
+
return this.page.getByTestId(n(t, c.TRIGGER)).locator("button > span").textContent();
|
|
232
|
+
}
|
|
233
|
+
async searchForItem({ testId: t, searchTerm: e }) {
|
|
234
|
+
return await this.openDropdownComponent({ testId: t }), await this.page.getByTestId(n(t, C.FIELD)).fill(e), this.page.getByTestId(n(t, c.LIST_CONTAINER)).locator("ul > li span").first().textContent();
|
|
235
|
+
}
|
|
236
|
+
}
|
|
237
|
+
class D {
|
|
238
|
+
constructor(t) {
|
|
239
|
+
l(this, "page");
|
|
240
|
+
this.page = t;
|
|
241
|
+
}
|
|
242
|
+
async waitForComponent({ testId: t }) {
|
|
243
|
+
const e = `[data-testid='${t}-${p.TRIGGER}']`;
|
|
244
|
+
await this.page.waitForSelector(e);
|
|
245
|
+
}
|
|
246
|
+
async clickOnApply(t) {
|
|
247
|
+
await this.page.getByTestId(
|
|
248
|
+
n(t, p.ACTION_APPLY)
|
|
249
|
+
).click();
|
|
250
|
+
}
|
|
251
|
+
async clickOnCancel(t) {
|
|
252
|
+
await this.page.getByTestId(
|
|
253
|
+
n(t, p.ACTION_CANCEL)
|
|
254
|
+
).click();
|
|
255
|
+
}
|
|
256
|
+
async openIncludeExcludeComponent(t) {
|
|
257
|
+
await this.page.getByTestId(n(t, p.TRIGGER)).click();
|
|
258
|
+
}
|
|
259
|
+
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();
|
|
261
|
+
}
|
|
262
|
+
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);
|
|
264
|
+
}
|
|
265
|
+
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", {
|
|
267
|
+
state: "hidden"
|
|
268
|
+
}), o && await this.clickOnApply(t);
|
|
269
|
+
}
|
|
270
|
+
async selectMultipleItems({ testId: t, itemsToSelect: e }) {
|
|
271
|
+
await this.clearAll({ testId: t }), await this.openIncludeExcludeComponent(t);
|
|
272
|
+
for (const o of e)
|
|
273
|
+
await this.page.getByTestId(n(t, p.LIST)).locator(".include-exclude-list ul > li").nth(o).click();
|
|
274
|
+
}
|
|
275
|
+
async unselectItemByName({ testId: t, entityName: e }) {
|
|
276
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(
|
|
277
|
+
n(t, p.LIST_SELECTED)
|
|
278
|
+
).locator("ul > li", { hasText: e }).locator(".clear-button").click(), await this.clickOnApply(t);
|
|
279
|
+
}
|
|
280
|
+
async unselectByIndex({ testId: t, index: e, applyChanges: o }) {
|
|
281
|
+
await this.page.getByTestId(
|
|
282
|
+
n(t, p.LIST_SELECTED)
|
|
283
|
+
).locator("ul li button").nth(e).click(), o && await this.clickOnApply(t);
|
|
284
|
+
}
|
|
285
|
+
async getSelectedCounter(t) {
|
|
286
|
+
return await this.page.getByTestId(
|
|
287
|
+
n(t, p.LIST_SELECTED)
|
|
288
|
+
).locator(".include-exclude-selected-header-left span").textContent();
|
|
289
|
+
}
|
|
290
|
+
async clearAll({ testId: t }) {
|
|
291
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.CLEAR_ALL)).click(), await this.clickOnApply(t);
|
|
292
|
+
}
|
|
293
|
+
getTriggerText({ testId: t }) {
|
|
294
|
+
return this.page.getByTestId(n(t, p.TRIGGER)).locator(".include-exclude-trigger-middle-section .container span").first().textContent();
|
|
295
|
+
}
|
|
296
|
+
getTriggerDescription({ testId: t }) {
|
|
297
|
+
return this.page.getByTestId(n(t, p.TRIGGER)).locator("div span.include-exclude-trigger-description").first().textContent();
|
|
298
|
+
}
|
|
299
|
+
async selectAll({ testId: t }) {
|
|
300
|
+
await this.openIncludeExcludeComponent(t), await this.page.getByTestId(n(t, p.SELECT_ALL)).click(), await this.clickOnApply(t);
|
|
301
|
+
}
|
|
302
|
+
}
|
|
303
|
+
class O {
|
|
304
|
+
constructor(t) {
|
|
305
|
+
l(this, "page");
|
|
306
|
+
this.page = t;
|
|
307
|
+
}
|
|
308
|
+
getInputsFieldText({ testId: t }) {
|
|
309
|
+
return this.page.getByTestId(n(t, i.FIELD)).inputValue();
|
|
310
|
+
}
|
|
311
|
+
getPlaceholderText({ testId: t }) {
|
|
312
|
+
return this.page.getByTestId(n(t, i.FIELD)).getAttribute("placeholder");
|
|
313
|
+
}
|
|
314
|
+
getInputsType({ testId: t }) {
|
|
315
|
+
return this.page.getByTestId(n(t, i.FIELD)).getAttribute("type");
|
|
316
|
+
}
|
|
317
|
+
async addInput({ testId: t, text: e }) {
|
|
318
|
+
await this.page.getByTestId(n(t, i.FIELD)).type(e);
|
|
319
|
+
}
|
|
320
|
+
async clearInput({ testId: t }) {
|
|
321
|
+
await this.page.getByTestId(n(t, i.FIELD)).clear();
|
|
322
|
+
}
|
|
323
|
+
isDisabled({ testId: t }) {
|
|
324
|
+
return this.page.getByTestId(n(t, i.FIELD)).isDisabled();
|
|
325
|
+
}
|
|
326
|
+
}
|
|
327
|
+
class F extends O {
|
|
328
|
+
constructor(e) {
|
|
329
|
+
super(e);
|
|
330
|
+
l(this, "fieldLabelComponent");
|
|
331
|
+
l(this, "fieldHelpTextComponent");
|
|
332
|
+
this.fieldLabelComponent = new B(e), this.fieldHelpTextComponent = new R(e);
|
|
333
|
+
}
|
|
334
|
+
getInputsLabelText({ testId: e }) {
|
|
335
|
+
return this.fieldLabelComponent.getLabelText({ testId: e });
|
|
336
|
+
}
|
|
337
|
+
async waitForComponent({ testId: e }) {
|
|
338
|
+
const o = `[data-testid='${e}-${i.WRAPPER}']`;
|
|
339
|
+
await this.page.waitForSelector(o);
|
|
340
|
+
}
|
|
341
|
+
isInputMandatory({ testId: e }) {
|
|
342
|
+
return this.fieldLabelComponent.isMandatory({ testId: e });
|
|
343
|
+
}
|
|
344
|
+
hasInputExtraText({ testId: e }) {
|
|
345
|
+
return this.fieldHelpTextComponent.hasExtraText({ testId: e });
|
|
346
|
+
}
|
|
347
|
+
getInputExtraText({ testId: e }) {
|
|
348
|
+
return this.fieldHelpTextComponent.getExtraText({ testId: e });
|
|
349
|
+
}
|
|
350
|
+
async clickOnApplyButton({ testId: e }) {
|
|
351
|
+
await (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".icon.icon-name--check")).click();
|
|
352
|
+
}
|
|
353
|
+
hasInlineErrorText({ testId: e }) {
|
|
354
|
+
return this.page.getByTestId(n(e, i.TOOLTIP)).isVisible();
|
|
355
|
+
}
|
|
356
|
+
async getInlineErrorText({ testId: e }) {
|
|
357
|
+
const o = await this.page.getByTestId(
|
|
358
|
+
n(e, i.TOOLTIP)
|
|
359
|
+
);
|
|
360
|
+
return await o.hover(), o.getAttribute("text");
|
|
361
|
+
}
|
|
362
|
+
async clickOnShowPassword({ testId: e }) {
|
|
363
|
+
await this.isPasswordHidden({ testId: e }) && await this.clickOnPasswordIcon({ testId: e });
|
|
364
|
+
}
|
|
365
|
+
async clickOnPasswordIcon({ testId: e }) {
|
|
366
|
+
await this.page.getByTestId(n(e, i.TOGGLE_PASSWORD)).click();
|
|
367
|
+
}
|
|
368
|
+
async clickOnHidePassword({ testId: e }) {
|
|
369
|
+
await this.isPasswordHidden({ testId: e }) || await this.clickOnPasswordIcon({ testId: e });
|
|
370
|
+
}
|
|
371
|
+
isPasswordHidden({ testId: e }) {
|
|
372
|
+
return this.page.getByTestId(n(e, i.TOGGLE_PASSWORD)).locator(".icon.icon-name--eye-slash").isVisible();
|
|
373
|
+
}
|
|
374
|
+
async clearInput({ testId: e }) {
|
|
375
|
+
const o = await this.page.getByTestId(
|
|
376
|
+
n(e, i.FIELD)
|
|
377
|
+
);
|
|
378
|
+
await o.click({ clickCount: 2 }), await o.type("");
|
|
379
|
+
}
|
|
380
|
+
hasExtraTextIconType({ testId: e, type: o }) {
|
|
381
|
+
return this.fieldHelpTextComponent.hasExtraTextIconType({ testId: e, type: o });
|
|
382
|
+
}
|
|
383
|
+
async isDisabled({ testId: e }) {
|
|
384
|
+
return (await this.page.getByTestId(
|
|
385
|
+
n(e, i.FIELD)
|
|
386
|
+
)).isDisabled();
|
|
387
|
+
}
|
|
388
|
+
hasApplyButton({ testId: e }) {
|
|
389
|
+
return this.page.getByTestId(n(e, i.WRAPPER)).locator(".icon.icon-name--check").isVisible();
|
|
390
|
+
}
|
|
391
|
+
async getMaxLengthNumber({ testId: e }) {
|
|
392
|
+
return (await this.getFontCaptionText({ testId: e }))[1];
|
|
393
|
+
}
|
|
394
|
+
async getActualNumberLength({ testId: e }) {
|
|
395
|
+
return (await this.getFontCaptionText({ testId: e }))[0];
|
|
396
|
+
}
|
|
397
|
+
async getFontCaptionText({ testId: e }) {
|
|
398
|
+
return (await this.page.getByTestId(n(e, i.WRAPPER)).locator(".font-caption").textContent()).split("/").map((r) => parseInt(r.trim(), 10));
|
|
399
|
+
}
|
|
400
|
+
getHelpIconText({ testId: e }) {
|
|
401
|
+
return this.fieldLabelComponent.getHelpIconText({ testId: e });
|
|
402
|
+
}
|
|
403
|
+
}
|
|
404
|
+
class G {
|
|
405
|
+
constructor(t) {
|
|
406
|
+
l(this, "page");
|
|
407
|
+
this.page = t;
|
|
408
|
+
}
|
|
409
|
+
async waitForComponent({ testId: t }) {
|
|
410
|
+
const e = `[data-testid='${t}-${h.WRAPPER}']`;
|
|
411
|
+
await this.page.waitForSelector(e);
|
|
412
|
+
}
|
|
413
|
+
getSelectedTabText({ testId: t }) {
|
|
414
|
+
return this.page.getByTestId(n(t, h.WRAPPER)).locator(".tab-item--active").textContent();
|
|
415
|
+
}
|
|
416
|
+
async selectTab({ testId: t, tabName: e }) {
|
|
417
|
+
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
418
|
+
await this.page.getByTestId(
|
|
419
|
+
n(t, `${h.TAB}-${o + 1}`)
|
|
420
|
+
).click();
|
|
421
|
+
}
|
|
422
|
+
async getTabIndex({ testId: t, tabName: e }) {
|
|
423
|
+
return (await this.page.getByTestId(n(t, h.WRAPPER)).locator(".tab-item").allTextContents()).indexOf(e);
|
|
424
|
+
}
|
|
425
|
+
async isTabDisabled({ testId: t, tabName: e }) {
|
|
426
|
+
const o = await this.getTabIndex({ testId: t, tabName: e });
|
|
427
|
+
return this.page.getByTestId(n(t, `${h.TAB}-${o}`)).locator(".tab-item--disabled").isVisible();
|
|
428
|
+
}
|
|
429
|
+
}
|
|
430
|
+
class $ {
|
|
431
|
+
constructor(t) {
|
|
432
|
+
l(this, "page");
|
|
433
|
+
this.page = t;
|
|
434
|
+
}
|
|
435
|
+
async waitForComponent({ testId: t }) {
|
|
436
|
+
const e = `[data-testid='${t}-${d.TRIGGER}']`;
|
|
437
|
+
await this.page.waitForSelector(e);
|
|
438
|
+
}
|
|
439
|
+
getTooltipText({ testId: t }) {
|
|
440
|
+
return this.page.getByTestId(`${t}-${d.TRIGGER}`).getAttribute("text");
|
|
441
|
+
}
|
|
442
|
+
getTooltipHeaderText({ testId: t }) {
|
|
443
|
+
return this.page.getByTestId(`${t}-${d.TRIGGER}`).getAttribute("header");
|
|
444
|
+
}
|
|
445
|
+
}
|
|
446
|
+
class V {
|
|
447
|
+
constructor(t) {
|
|
448
|
+
l(this, "page");
|
|
449
|
+
this.page = t;
|
|
450
|
+
}
|
|
451
|
+
async waitForComponent({ testId: t }) {
|
|
452
|
+
const e = `[data-testid='${t}-${s.CONTAINER}']`;
|
|
453
|
+
await this.page.waitForSelector(e);
|
|
454
|
+
}
|
|
455
|
+
getTableRowCount({ testId: t }) {
|
|
456
|
+
return this.page.getByTestId(n(t, s.BODY_WRAPPER)).locator(".table-row").count();
|
|
457
|
+
}
|
|
458
|
+
getTableRowContentByIndex({
|
|
459
|
+
testId: t,
|
|
460
|
+
index: e
|
|
461
|
+
}) {
|
|
462
|
+
return this.page.getByTestId(`${t}-${s.BODY_WRAPPER}`).locator(".table-row").nth(e).innerText();
|
|
463
|
+
}
|
|
464
|
+
async getTableRowByRowValue({
|
|
465
|
+
testId: t,
|
|
466
|
+
rowHeader: e,
|
|
467
|
+
rowValue: o
|
|
468
|
+
}) {
|
|
469
|
+
const r = await this.getRowIndexByRowValue({
|
|
470
|
+
testId: t,
|
|
471
|
+
rowHeader: e,
|
|
472
|
+
rowValue: o
|
|
473
|
+
});
|
|
474
|
+
return this.getTableRowContentByIndex({ testId: t, index: r });
|
|
475
|
+
}
|
|
476
|
+
async getRowIndexByRowValue({
|
|
477
|
+
testId: t,
|
|
478
|
+
rowHeader: e,
|
|
479
|
+
rowValue: o
|
|
480
|
+
}) {
|
|
481
|
+
return (await this.getColumnValuesByHeader({
|
|
482
|
+
testId: t,
|
|
483
|
+
header: e
|
|
484
|
+
})).indexOf(o);
|
|
485
|
+
}
|
|
486
|
+
async getColumnValuesByHeader({
|
|
487
|
+
header: t,
|
|
488
|
+
testId: e
|
|
489
|
+
}) {
|
|
490
|
+
const o = await this.getColumnIndexByHeader({
|
|
491
|
+
testId: e,
|
|
492
|
+
header: t
|
|
493
|
+
});
|
|
494
|
+
return this.getColumnValuesByIndex({ testId: e, index: o });
|
|
495
|
+
}
|
|
496
|
+
async getColumnIndexByHeader({
|
|
497
|
+
header: t,
|
|
498
|
+
testId: e
|
|
499
|
+
}) {
|
|
500
|
+
return (await this.getColumnHeaders({ testId: e })).indexOf(t);
|
|
501
|
+
}
|
|
502
|
+
async getColumnValuesByIndex({
|
|
503
|
+
index: t,
|
|
504
|
+
testId: e
|
|
505
|
+
}) {
|
|
506
|
+
const o = [], r = await this.getTableRowCount({ testId: e });
|
|
507
|
+
for (let T = 0; T < r; T++) {
|
|
508
|
+
const I = (await this.getTableRowContentByIndex({
|
|
509
|
+
testId: e,
|
|
510
|
+
index: T
|
|
511
|
+
})).split(`
|
|
512
|
+
`)[t];
|
|
513
|
+
o.push(I);
|
|
514
|
+
}
|
|
515
|
+
return o;
|
|
516
|
+
}
|
|
517
|
+
async getColumnHeaders({ testId: t }) {
|
|
518
|
+
return this.page.getByTestId(n(t, s.TABLE)).locator(".table-head-container").allTextContents();
|
|
519
|
+
}
|
|
520
|
+
getTableLabel({ testId: t }) {
|
|
521
|
+
return this.page.getByTestId(n(t, s.HEADER)).innerText();
|
|
522
|
+
}
|
|
523
|
+
getTableFooter({ testId: t }) {
|
|
524
|
+
return this.page.getByTestId(n(t, s.CONTAINER)).locator(".table-footer").innerText();
|
|
525
|
+
}
|
|
526
|
+
async clickOnSortByHeaderName({ testId: t, headerName: e }) {
|
|
527
|
+
await this.clickOnHeaderByName({ testId: t, headerName: e });
|
|
528
|
+
}
|
|
529
|
+
async clickOnHeaderByName({ testId: t, headerName: e }) {
|
|
530
|
+
const o = await this.getColumnIndexByHeader({
|
|
531
|
+
testId: t,
|
|
532
|
+
header: e
|
|
533
|
+
});
|
|
534
|
+
await this.page.getByTestId(n(t, s.TABLE)).locator(".table-head-container").nth(o).click();
|
|
535
|
+
}
|
|
536
|
+
// not sure if I should have an instance of input component and call its function
|
|
537
|
+
async searchForItems({ testId: t, searchTerm: e }) {
|
|
538
|
+
await this.clearSearchText({ testId: t }), await this.page.getByTestId(n(t, i.FIELD)).fill(e);
|
|
539
|
+
}
|
|
540
|
+
async clearSearchText({ testId: t }) {
|
|
541
|
+
await this.page.getByTestId(n(t, i.FIELD)).clear();
|
|
542
|
+
}
|
|
543
|
+
async isArrowVisible({ testId: t, headerName: e }) {
|
|
544
|
+
const o = await this.getColumnIndexByHeader({
|
|
545
|
+
header: e,
|
|
546
|
+
testId: t
|
|
547
|
+
});
|
|
548
|
+
return this.page.getByTestId(n(t, s.TABLE)).locator(".table-head-container").nth(o).locator(".table-sort-icon").isVisible();
|
|
549
|
+
}
|
|
550
|
+
async scrollDownTableRows({ testId: t }) {
|
|
551
|
+
const e = `[data-testid=${n(
|
|
552
|
+
t,
|
|
553
|
+
s.TABLE
|
|
554
|
+
)}]`;
|
|
555
|
+
await this.page.focus(e), await this.page.evaluate((o) => {
|
|
556
|
+
const r = document.querySelector(o);
|
|
557
|
+
r && (r.scrollTop = r.scrollHeight);
|
|
558
|
+
}, e), await this.waitForTableToLoad();
|
|
559
|
+
}
|
|
560
|
+
async waitForTableToLoad() {
|
|
561
|
+
await this.page.waitForSelector(".table-row.loading", {
|
|
562
|
+
state: "hidden"
|
|
563
|
+
});
|
|
564
|
+
}
|
|
565
|
+
async expandRow({
|
|
566
|
+
testId: t,
|
|
567
|
+
headerName: e,
|
|
568
|
+
rowValue: o
|
|
569
|
+
}) {
|
|
570
|
+
const r = await this.getRowIndexByRowValue({
|
|
571
|
+
testId: t,
|
|
572
|
+
rowHeader: e,
|
|
573
|
+
rowValue: o
|
|
574
|
+
});
|
|
575
|
+
await this.page.getByTestId(n(t, s.BODY_WRAPPER)).locator(".table-row").nth(r).locator(".icon-wrapper").click();
|
|
576
|
+
}
|
|
577
|
+
async isRowExpanded({ testId: t, headerName: e, rowValue: o }) {
|
|
578
|
+
const r = await this.getRowIndexByRowValue({
|
|
579
|
+
testId: t,
|
|
580
|
+
rowHeader: e,
|
|
581
|
+
rowValue: o
|
|
582
|
+
});
|
|
583
|
+
return this.page.getByTestId(n(t, s.BODY_WRAPPER)).locator(".table-row").nth(r).locator(".icon-wrapper").isVisible();
|
|
584
|
+
}
|
|
585
|
+
async getExpandedRowContent({ testId: t, headerName: e, rowValue: o }) {
|
|
586
|
+
await this.isRowExpanded({
|
|
587
|
+
testId: t,
|
|
588
|
+
headerName: e,
|
|
589
|
+
rowValue: o
|
|
590
|
+
}) || await this.expandRow({ testId: t, headerName: e, rowValue: o });
|
|
591
|
+
const T = await this.getRowIndexByRowValue({
|
|
592
|
+
testId: t,
|
|
593
|
+
rowHeader: e,
|
|
594
|
+
rowValue: o
|
|
595
|
+
});
|
|
596
|
+
return this.page.getByTestId(n(t, s.BODY_WRAPPER)).locator(".table-row").nth(T).locator(".icon-wrapper").textContent();
|
|
597
|
+
}
|
|
598
|
+
isEmptyStateVisible({ testId: t }) {
|
|
599
|
+
return this.page.getByTestId(n(t, s.TABLE)).locator(".empty-state").isVisible();
|
|
600
|
+
}
|
|
601
|
+
getEmptyStateTitle({ testId: t }) {
|
|
602
|
+
return this.page.getByTestId(n(t, s.TABLE)).locator(".font-heading-4.title").textContent();
|
|
603
|
+
}
|
|
604
|
+
getEmptyStateSubtitle({ testId: t }) {
|
|
605
|
+
return this.page.getByTestId(n(t, s.TABLE)).locator(".font-body-1.subtitle").textContent();
|
|
606
|
+
}
|
|
607
|
+
async clickOnRowCheckboxByIndex({ testId: t, index: e }) {
|
|
608
|
+
await this.page.getByTestId(n(t, s.BODY_WRAPPER)).locator(".table-row").nth(e).locator(".states").click();
|
|
609
|
+
}
|
|
610
|
+
async clickOnRowCheckboxByRowValue({ testId: t, rowHeader: e, rowValue: o }) {
|
|
611
|
+
const r = await this.getRowIndexByRowValue({
|
|
612
|
+
testId: t,
|
|
613
|
+
rowHeader: e,
|
|
614
|
+
rowValue: o
|
|
615
|
+
});
|
|
616
|
+
await this.clickOnRowCheckboxByIndex({ testId: t, index: r });
|
|
617
|
+
}
|
|
618
|
+
getCheckedRowsNumber({ testId: t }) {
|
|
619
|
+
return this.page.getByTestId(n(t, s.TABLE)).locator(".table-row").locator(".icon.checked").count();
|
|
620
|
+
}
|
|
621
|
+
async clickOnSelectAllCheckbox({ testId: t }) {
|
|
622
|
+
await this.page.getByTestId(n(t, s.TABLE)).locator(".states").nth(0).click();
|
|
623
|
+
}
|
|
624
|
+
}
|
|
625
|
+
export {
|
|
626
|
+
S as BannerComponent,
|
|
627
|
+
N as ComponentBasePage,
|
|
628
|
+
k as DialogComponent,
|
|
629
|
+
_ as DropdownComponent,
|
|
630
|
+
H as DropdownComponentV3,
|
|
631
|
+
R as FieldHelpTextComponent,
|
|
632
|
+
B as FieldLabelComponent,
|
|
633
|
+
D as IncludeExcludeComponent,
|
|
634
|
+
F as InputsComponent,
|
|
635
|
+
V as TableComponent,
|
|
636
|
+
G as TabsComponent,
|
|
637
|
+
$ as TooltipComponent
|
|
638
|
+
};
|