@agnos-ui/page-objects 0.4.0-next.0 → 0.4.0
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/.eslintrc.json +3 -0
- package/lib/accordion.po.ts +93 -0
- package/lib/alert.po.ts +34 -0
- package/lib/index.ts +9 -0
- package/lib/modal.po.ts +63 -0
- package/lib/pagination.po.ts +157 -0
- package/lib/progressbar.po.ts +53 -0
- package/lib/rating.po.ts +46 -0
- package/lib/select.po.ts +94 -0
- package/lib/slider.po.ts +73 -0
- package/lib/toast.po.ts +35 -0
- package/package.json +24 -36
- package/tsconfig.build.json +10 -0
- package/tsconfig.json +8 -0
- package/vite.config.ts +17 -0
- package/dist/lib/index.d.ts +0 -358
- package/dist/lib/index.js +0 -1
- package/dist/lib/index.mjs +0 -501
package/package.json
CHANGED
|
@@ -1,79 +1,67 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@agnos-ui/page-objects",
|
|
3
3
|
"description": "Page objects to be used when testing AgnosUI-based applications with Playwright.",
|
|
4
|
-
"version": "0.4.0
|
|
4
|
+
"version": "0.4.0",
|
|
5
5
|
"keywords": [
|
|
6
|
-
"AgnosUI",
|
|
7
|
-
"components",
|
|
8
6
|
"e2e",
|
|
9
7
|
"page-object",
|
|
10
8
|
"playwright",
|
|
11
|
-
"testing"
|
|
12
|
-
"widgets"
|
|
9
|
+
"testing"
|
|
13
10
|
],
|
|
14
|
-
"
|
|
15
|
-
"
|
|
16
|
-
"
|
|
11
|
+
"type": "module",
|
|
12
|
+
"main": "./dist/index.cjs",
|
|
13
|
+
"module": "./dist/index.js",
|
|
14
|
+
"types": "./dist/index.d.ts",
|
|
17
15
|
"scripts": {
|
|
18
16
|
"build": "wireit"
|
|
19
17
|
},
|
|
20
18
|
"wireit": {
|
|
21
19
|
"build:src": {
|
|
22
|
-
"command": "vite build",
|
|
20
|
+
"command": "vite build && tsc -p tsconfig.build.json",
|
|
23
21
|
"dependencies": [
|
|
24
22
|
"../base-po:build"
|
|
25
23
|
],
|
|
26
24
|
"files": [
|
|
27
25
|
"lib/**",
|
|
26
|
+
"tsconfig.json",
|
|
27
|
+
"../tsconfig.json",
|
|
28
28
|
"vite.config.ts"
|
|
29
29
|
],
|
|
30
30
|
"output": [
|
|
31
|
-
"dist
|
|
32
|
-
"dist/
|
|
31
|
+
"dist/**",
|
|
32
|
+
"!dist/package.json",
|
|
33
|
+
"!dist/README.md"
|
|
33
34
|
]
|
|
34
35
|
},
|
|
35
|
-
"build:
|
|
36
|
-
"command": "
|
|
36
|
+
"build:pkg": {
|
|
37
|
+
"command": "node ../scripts/buildPackageJson.js . dist",
|
|
37
38
|
"dependencies": [
|
|
38
|
-
"
|
|
39
|
+
"build:src"
|
|
39
40
|
],
|
|
40
41
|
"files": [
|
|
41
|
-
"
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
"
|
|
42
|
+
"../scripts/buildPackageJson.js",
|
|
43
|
+
"../package.json",
|
|
44
|
+
"package.json",
|
|
45
|
+
"README.md"
|
|
45
46
|
],
|
|
46
47
|
"output": [
|
|
47
|
-
"dist/
|
|
48
|
+
"dist/README.md",
|
|
49
|
+
"dist/package.json"
|
|
48
50
|
]
|
|
49
51
|
},
|
|
50
52
|
"build": {
|
|
51
|
-
"command": "api-extractor run",
|
|
52
53
|
"dependencies": [
|
|
53
54
|
"build:src",
|
|
54
|
-
"build:
|
|
55
|
-
],
|
|
56
|
-
"files": [
|
|
57
|
-
"api-extractor.json",
|
|
58
|
-
"../api-extractor.json",
|
|
59
|
-
"tsconfig.json",
|
|
60
|
-
"tsconfig.d.json",
|
|
61
|
-
"../tsconfig.json"
|
|
62
|
-
],
|
|
63
|
-
"output": [
|
|
64
|
-
"dist/lib/index.d.ts"
|
|
55
|
+
"build:pkg"
|
|
65
56
|
]
|
|
66
57
|
}
|
|
67
58
|
},
|
|
68
59
|
"dependencies": {
|
|
69
|
-
"@agnos-ui/base-po": "0.4.0
|
|
60
|
+
"@agnos-ui/base-po": "0.4.0"
|
|
70
61
|
},
|
|
71
62
|
"peerDependencies": {
|
|
72
|
-
"@playwright/test": "^1.
|
|
63
|
+
"@playwright/test": "^1.45.2"
|
|
73
64
|
},
|
|
74
|
-
"files": [
|
|
75
|
-
"dist/lib"
|
|
76
|
-
],
|
|
77
65
|
"license": "MIT",
|
|
78
66
|
"bugs": "https://github.com/AmadeusITGroup/AgnosUI/issues",
|
|
79
67
|
"repository": {
|
package/tsconfig.json
ADDED
package/vite.config.ts
ADDED
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import {peerDependencies, dependencies} from './package.json';
|
|
2
|
+
import {defineConfig} from 'vite';
|
|
3
|
+
|
|
4
|
+
// https://vitejs.dev/config/
|
|
5
|
+
export default defineConfig({
|
|
6
|
+
build: {
|
|
7
|
+
lib: {
|
|
8
|
+
entry: 'lib/index',
|
|
9
|
+
fileName: 'index',
|
|
10
|
+
formats: ['es', 'cjs'],
|
|
11
|
+
},
|
|
12
|
+
rollupOptions: {
|
|
13
|
+
external: [...Object.keys(peerDependencies), ...Object.keys(dependencies)],
|
|
14
|
+
},
|
|
15
|
+
emptyOutDir: true,
|
|
16
|
+
},
|
|
17
|
+
});
|
package/dist/lib/index.d.ts
DELETED
|
@@ -1,358 +0,0 @@
|
|
|
1
|
-
import { BasePO } from '@agnos-ui/base-po';
|
|
2
|
-
import type { Locator } from '@playwright/test';
|
|
3
|
-
import { Locator as Locator_2 } from 'playwright-core';
|
|
4
|
-
|
|
5
|
-
export declare class AccordionPO extends BasePO {
|
|
6
|
-
private readonly selectors;
|
|
7
|
-
getComponentSelector(): string;
|
|
8
|
-
/**
|
|
9
|
-
* Gets the locators of the items containing the header and the body-container inside
|
|
10
|
-
* the accordion
|
|
11
|
-
*/
|
|
12
|
-
get locatorAccordionItems(): Locator;
|
|
13
|
-
/**
|
|
14
|
-
* Gets the locators of the item specified by the itemIndex containing the header and the body-container inside
|
|
15
|
-
* the accordion
|
|
16
|
-
*/
|
|
17
|
-
locatorAccordionItem(itemIndex: number): Locator;
|
|
18
|
-
get locatorAccordionCBodyContainers(): Locator;
|
|
19
|
-
locatorAccordionBodyContainer(bodyContainerIndex: number): Locator;
|
|
20
|
-
/**
|
|
21
|
-
* Gets the locator of the bodies of the accordion.
|
|
22
|
-
*/
|
|
23
|
-
get locatorAccordionBodies(): Locator;
|
|
24
|
-
locatorAccordionBody(bodyIndex: number): Locator;
|
|
25
|
-
get locatorAccordionHeaders(): Locator;
|
|
26
|
-
locatorAccordionHeader(headerIndex: number): Locator;
|
|
27
|
-
/**
|
|
28
|
-
* Gets the locators of the buttons that handle the accordion, present in the accordion header.
|
|
29
|
-
* It does not get the locators of the buttons present in the body, added by the developer.
|
|
30
|
-
*/
|
|
31
|
-
get locatorAccordionButtons(): Locator;
|
|
32
|
-
locatorAccordionButton(buttonIndex: number): Locator;
|
|
33
|
-
state(): Promise<{
|
|
34
|
-
rootClasses: string[];
|
|
35
|
-
items: {
|
|
36
|
-
classes: string[];
|
|
37
|
-
id: string;
|
|
38
|
-
isInDOM: boolean;
|
|
39
|
-
bodyContainerId: string | undefined;
|
|
40
|
-
buttonId: string | undefined;
|
|
41
|
-
expanded: string | null | undefined;
|
|
42
|
-
disabled: string | null | undefined;
|
|
43
|
-
labeledBy: string | null | undefined;
|
|
44
|
-
buttonControls: string | null | undefined;
|
|
45
|
-
}[];
|
|
46
|
-
}>;
|
|
47
|
-
}
|
|
48
|
-
|
|
49
|
-
export declare class AlertPO extends BasePO {
|
|
50
|
-
selectors: {
|
|
51
|
-
rootComponent: string;
|
|
52
|
-
body: string;
|
|
53
|
-
closeButton: string;
|
|
54
|
-
};
|
|
55
|
-
getComponentSelector(): string;
|
|
56
|
-
get locatorCloseButton(): Locator;
|
|
57
|
-
state(): Promise<{
|
|
58
|
-
rootClasses: string[];
|
|
59
|
-
body: string | undefined;
|
|
60
|
-
closeButton: string | null | undefined;
|
|
61
|
-
}>;
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
export declare const alertSelectors: {
|
|
65
|
-
rootComponent: string;
|
|
66
|
-
body: string;
|
|
67
|
-
closeButton: string;
|
|
68
|
-
};
|
|
69
|
-
|
|
70
|
-
/** Pagination navigation buttons hrefs */
|
|
71
|
-
export declare interface HrefsNavigation {
|
|
72
|
-
first?: string;
|
|
73
|
-
previous?: string;
|
|
74
|
-
next?: string;
|
|
75
|
-
last?: string;
|
|
76
|
-
}
|
|
77
|
-
|
|
78
|
-
export declare class ModalPO extends BasePO {
|
|
79
|
-
selectors: {
|
|
80
|
-
rootComponent: string;
|
|
81
|
-
closeButton: string;
|
|
82
|
-
backdrop: string;
|
|
83
|
-
header: string;
|
|
84
|
-
title: string;
|
|
85
|
-
body: string;
|
|
86
|
-
footer: string;
|
|
87
|
-
};
|
|
88
|
-
getComponentSelector(): string;
|
|
89
|
-
get locatorHeader(): Locator;
|
|
90
|
-
get locatorTitle(): Locator;
|
|
91
|
-
get locatorBody(): Locator;
|
|
92
|
-
get locatorFooter(): Locator;
|
|
93
|
-
get locatorCloseButton(): Locator;
|
|
94
|
-
get locatorBackdrop(): Locator;
|
|
95
|
-
state(): Promise<{
|
|
96
|
-
rootClasses: string[];
|
|
97
|
-
header: string | undefined;
|
|
98
|
-
title: string | undefined;
|
|
99
|
-
body: string | undefined;
|
|
100
|
-
footer: string | undefined;
|
|
101
|
-
closeButton: string | null | undefined;
|
|
102
|
-
}>;
|
|
103
|
-
}
|
|
104
|
-
|
|
105
|
-
export declare const modalSelectors: {
|
|
106
|
-
rootComponent: string;
|
|
107
|
-
closeButton: string;
|
|
108
|
-
backdrop: string;
|
|
109
|
-
header: string;
|
|
110
|
-
title: string;
|
|
111
|
-
body: string;
|
|
112
|
-
footer: string;
|
|
113
|
-
};
|
|
114
|
-
|
|
115
|
-
export declare class PaginationPO extends BasePO {
|
|
116
|
-
selectors: {
|
|
117
|
-
rootComponent: string;
|
|
118
|
-
activePage: string;
|
|
119
|
-
previousPage: string;
|
|
120
|
-
nextPage: string;
|
|
121
|
-
firstPage: string;
|
|
122
|
-
lastPage: string;
|
|
123
|
-
pages: string;
|
|
124
|
-
ellipses: string;
|
|
125
|
-
};
|
|
126
|
-
getComponentSelector(): string;
|
|
127
|
-
/**
|
|
128
|
-
* Gets the locator of the button is the current page in the pagination component.
|
|
129
|
-
*/
|
|
130
|
-
get locatorActivePage(): Locator;
|
|
131
|
-
/**
|
|
132
|
-
* Gets the locator of the button that once clicked moves to the previous page in the pagination component.
|
|
133
|
-
*/
|
|
134
|
-
get locatorPreviousButton(): Locator;
|
|
135
|
-
/**
|
|
136
|
-
* Gets the locator of the button that once clicked moves to the next page in the pagination component.
|
|
137
|
-
*/
|
|
138
|
-
get locatorNextButton(): Locator;
|
|
139
|
-
/**
|
|
140
|
-
* Gets the locator of the button that once clicked moves to the first page in the pagination component.
|
|
141
|
-
*/
|
|
142
|
-
get locatorFirstButton(): Locator;
|
|
143
|
-
/**
|
|
144
|
-
* Gets the locator of the button that once clicked moves to the last page in the pagination component.
|
|
145
|
-
*/
|
|
146
|
-
get locatorLastButton(): Locator;
|
|
147
|
-
/**
|
|
148
|
-
* Gets the locators of the pages
|
|
149
|
-
*/
|
|
150
|
-
get locatorPages(): Locator;
|
|
151
|
-
/**
|
|
152
|
-
* Gets the locator of a page button in the pagination component given his position.
|
|
153
|
-
* @param pageNumber - The number of the page in the pagination object.
|
|
154
|
-
*/
|
|
155
|
-
locatorNthPage(pageNumber: number): Locator;
|
|
156
|
-
/**
|
|
157
|
-
* Gets the locator of a page button in the pagination component given a string.
|
|
158
|
-
* @param pageString - The string of the page in the pagination object.
|
|
159
|
-
*/
|
|
160
|
-
locatorPage(pageString: string): Locator;
|
|
161
|
-
get locatorEllipses(): Locator;
|
|
162
|
-
state(): Promise<PaginationPOState>;
|
|
163
|
-
}
|
|
164
|
-
|
|
165
|
-
/** Pagination page object */
|
|
166
|
-
export declare interface PaginationPOState {
|
|
167
|
-
rootClasses: string[];
|
|
168
|
-
disabled: string | null;
|
|
169
|
-
pages: string[];
|
|
170
|
-
hrefs: string[];
|
|
171
|
-
hrefsNavigation?: HrefsNavigation;
|
|
172
|
-
isFirstDisabled?: boolean;
|
|
173
|
-
isPreviousDisabled?: boolean;
|
|
174
|
-
isNextDisabled?: boolean;
|
|
175
|
-
isLastDisabled?: boolean;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
export declare const paginationSelectors: {
|
|
179
|
-
rootComponent: string;
|
|
180
|
-
activePage: string;
|
|
181
|
-
previousPage: string;
|
|
182
|
-
nextPage: string;
|
|
183
|
-
firstPage: string;
|
|
184
|
-
lastPage: string;
|
|
185
|
-
pages: string;
|
|
186
|
-
ellipses: string;
|
|
187
|
-
};
|
|
188
|
-
|
|
189
|
-
export declare class ProgressbarPO extends BasePO {
|
|
190
|
-
selectors: {
|
|
191
|
-
rootComponent: string;
|
|
192
|
-
outerBar: string;
|
|
193
|
-
innerBar: string;
|
|
194
|
-
};
|
|
195
|
-
getComponentSelector(): string;
|
|
196
|
-
get locatorOuterBar(): Locator;
|
|
197
|
-
get locatorInnerBar(): Locator;
|
|
198
|
-
state(): Promise<State>;
|
|
199
|
-
}
|
|
200
|
-
|
|
201
|
-
export declare const progressbarSelectors: {
|
|
202
|
-
rootComponent: string;
|
|
203
|
-
outerBar: string;
|
|
204
|
-
innerBar: string;
|
|
205
|
-
};
|
|
206
|
-
|
|
207
|
-
export declare class RatingPO extends BasePO {
|
|
208
|
-
selectors: {
|
|
209
|
-
rootComponent: string;
|
|
210
|
-
star: string;
|
|
211
|
-
};
|
|
212
|
-
getComponentSelector(): string;
|
|
213
|
-
/**
|
|
214
|
-
* Get the main title locator of the feature page
|
|
215
|
-
*/
|
|
216
|
-
locatorStar(index: number): Locator_2;
|
|
217
|
-
state(): Promise<{
|
|
218
|
-
rootClasses: string[];
|
|
219
|
-
value: string | null;
|
|
220
|
-
min: string | null;
|
|
221
|
-
max: string | null;
|
|
222
|
-
text: string | null;
|
|
223
|
-
disabled: string | null;
|
|
224
|
-
readonly: string | null;
|
|
225
|
-
stars: string[];
|
|
226
|
-
classes: string[][];
|
|
227
|
-
}>;
|
|
228
|
-
}
|
|
229
|
-
|
|
230
|
-
export declare const ratingSelectors: {
|
|
231
|
-
rootComponent: string;
|
|
232
|
-
star: string;
|
|
233
|
-
};
|
|
234
|
-
|
|
235
|
-
export declare class SelectPO extends BasePO {
|
|
236
|
-
selectors: {
|
|
237
|
-
rootComponent: string;
|
|
238
|
-
};
|
|
239
|
-
getComponentSelector(): string;
|
|
240
|
-
/**
|
|
241
|
-
* Get the main title locator of the feature page
|
|
242
|
-
*/
|
|
243
|
-
get locatorInput(): Locator_2;
|
|
244
|
-
/**
|
|
245
|
-
* Menu container
|
|
246
|
-
*/
|
|
247
|
-
get locatorMenu(): Locator_2;
|
|
248
|
-
/**
|
|
249
|
-
* Return the first menu item locator including the text
|
|
250
|
-
*/
|
|
251
|
-
get locatorMenuItems(): Locator_2;
|
|
252
|
-
/**
|
|
253
|
-
* Return the first menu item locator including the text
|
|
254
|
-
*/
|
|
255
|
-
locatorMenuItem(text: string): Locator_2;
|
|
256
|
-
/**
|
|
257
|
-
* Bages container
|
|
258
|
-
*/
|
|
259
|
-
get locatorBadges(): Locator_2;
|
|
260
|
-
/**
|
|
261
|
-
* Return the first badge locator including the text
|
|
262
|
-
*/
|
|
263
|
-
locatorBadgeItem(text: string): Locator_2;
|
|
264
|
-
state(): Promise<{
|
|
265
|
-
text: string;
|
|
266
|
-
badges: (string | undefined)[];
|
|
267
|
-
isOpen: boolean;
|
|
268
|
-
list: (string | undefined)[];
|
|
269
|
-
checked: (string | undefined)[];
|
|
270
|
-
}>;
|
|
271
|
-
}
|
|
272
|
-
|
|
273
|
-
export declare const selectSelectors: {
|
|
274
|
-
rootComponent: string;
|
|
275
|
-
};
|
|
276
|
-
|
|
277
|
-
export declare class SliderPO extends BasePO {
|
|
278
|
-
selectors: {
|
|
279
|
-
rootComponent: string;
|
|
280
|
-
clickableArea: string;
|
|
281
|
-
handle: string;
|
|
282
|
-
minLabelHorizontal: string;
|
|
283
|
-
maxLabelHorizontal: string;
|
|
284
|
-
minLabelVertical: string;
|
|
285
|
-
maxLabelVertical: string;
|
|
286
|
-
valueLabel: string;
|
|
287
|
-
progress: string;
|
|
288
|
-
};
|
|
289
|
-
getComponentSelector(): string;
|
|
290
|
-
get locatorHandle(): Locator;
|
|
291
|
-
get locatorMinLabelHorizontal(): Locator;
|
|
292
|
-
get locatorMaxLabelHorizontal(): Locator;
|
|
293
|
-
get locatorMinLabelVertical(): Locator;
|
|
294
|
-
get locatorMaxLabelVertical(): Locator;
|
|
295
|
-
get locatorProgress(): Locator;
|
|
296
|
-
get locatorValueLabel(): Locator;
|
|
297
|
-
sliderHandleState(): Promise<{
|
|
298
|
-
style: string | null;
|
|
299
|
-
value: string | null;
|
|
300
|
-
min: string | null;
|
|
301
|
-
max: string | null;
|
|
302
|
-
disabled: string | null;
|
|
303
|
-
readonly: string | null;
|
|
304
|
-
ariaLabel: string | null;
|
|
305
|
-
ariaValueText: string | null;
|
|
306
|
-
}[]>;
|
|
307
|
-
sliderProgressState(): Promise<(string | null)[]>;
|
|
308
|
-
}
|
|
309
|
-
|
|
310
|
-
export declare const sliderSelectors: {
|
|
311
|
-
rootComponent: string;
|
|
312
|
-
clickableArea: string;
|
|
313
|
-
handle: string;
|
|
314
|
-
minLabelHorizontal: string;
|
|
315
|
-
maxLabelHorizontal: string;
|
|
316
|
-
minLabelVertical: string;
|
|
317
|
-
maxLabelVertical: string;
|
|
318
|
-
valueLabel: string;
|
|
319
|
-
progress: string;
|
|
320
|
-
};
|
|
321
|
-
|
|
322
|
-
export declare interface State {
|
|
323
|
-
ariaLabel: string | null;
|
|
324
|
-
ariaValueNow: string | null;
|
|
325
|
-
ariaValueMin: string | null;
|
|
326
|
-
ariaValueMax: string | null;
|
|
327
|
-
ariaValueText: string | null;
|
|
328
|
-
label: string | null | undefined;
|
|
329
|
-
innerClasses: string[];
|
|
330
|
-
outerHeight: string | undefined;
|
|
331
|
-
innerWidth: string | undefined;
|
|
332
|
-
}
|
|
333
|
-
|
|
334
|
-
export declare class ToastPO extends BasePO {
|
|
335
|
-
selectors: {
|
|
336
|
-
rootComponent: string;
|
|
337
|
-
closeButton: string;
|
|
338
|
-
header: string;
|
|
339
|
-
body: string;
|
|
340
|
-
};
|
|
341
|
-
getComponentSelector(): string;
|
|
342
|
-
get locatorCloseButton(): Locator;
|
|
343
|
-
state(): Promise<{
|
|
344
|
-
rootClasses: string[];
|
|
345
|
-
body: string | undefined;
|
|
346
|
-
header: string | undefined;
|
|
347
|
-
closeButton: string | null | undefined;
|
|
348
|
-
}>;
|
|
349
|
-
}
|
|
350
|
-
|
|
351
|
-
export declare const toastSelectors: {
|
|
352
|
-
rootComponent: string;
|
|
353
|
-
closeButton: string;
|
|
354
|
-
header: string;
|
|
355
|
-
body: string;
|
|
356
|
-
};
|
|
357
|
-
|
|
358
|
-
export { }
|
package/dist/lib/index.js
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
"use strict";var O=Object.defineProperty;var L=(n,c,t)=>c in n?O(n,c,{enumerable:!0,configurable:!0,writable:!0,value:t}):n[c]=t;var b=(n,c,t)=>L(n,typeof c!="symbol"?c+"":c,t);Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const p=require("@agnos-ui/base-po"),A={rootComponent:".modal",closeButton:".btn-close",backdrop:"xpath=./preceding-sibling::div[contains(@class,'modal-backdrop')]",header:".modal-header",title:".modal-title",body:".modal-body",footer:".modal-footer"};class H extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(A))}getComponentSelector(){return this.selectors.rootComponent}get locatorHeader(){return this.locatorRoot.locator(this.selectors.header)}get locatorTitle(){return this.locatorHeader.locator(this.selectors.title)}get locatorBody(){return this.locatorRoot.locator(this.selectors.body)}get locatorFooter(){return this.locatorRoot.locator(this.selectors.footer)}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}get locatorBackdrop(){return this.locatorRoot.locator(this.selectors.backdrop)}async state(){return this.locatorRoot.evaluate(async(t,e)=>{var i,u,m,g,h,d,y,S,x;const a=(i=t.querySelector(e.closeButton))==null?void 0:i.getAttribute("aria-label"),s=(m=(u=t.querySelector(e.header))==null?void 0:u.innerText)==null?void 0:m.trim(),r=(h=(g=t.querySelector(e.title))==null?void 0:g.innerText)==null?void 0:h.trim(),o=(y=(d=t.querySelector(e.body))==null?void 0:d.innerText)==null?void 0:y.trim(),l=(x=(S=t.querySelector(e.footer))==null?void 0:S.innerText)==null?void 0:x.trim();return{rootClasses:t.className.trim().split(" ").sort(),header:s,title:r,body:o,footer:l,closeButton:a}},this.selectors)}}const C={rootComponent:".au-pagination",activePage:".active",previousPage:".au-previous",nextPage:".au-next",firstPage:".au-first",lastPage:".au-last",pages:".au-page",ellipses:".au-ellipsis"};class T extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(C))}getComponentSelector(){return this.selectors.rootComponent}get locatorActivePage(){return this.locatorRoot.locator(this.selectors.activePage)}get locatorPreviousButton(){return this.locatorRoot.locator(this.selectors.previousPage)}get locatorNextButton(){return this.locatorRoot.locator(this.selectors.nextPage)}get locatorFirstButton(){return this.locatorRoot.locator(this.selectors.firstPage)}get locatorLastButton(){return this.locatorRoot.locator(this.selectors.lastPage)}get locatorPages(){return this.locatorRoot.locator(this.selectors.pages)}locatorNthPage(t){return this.locatorRoot.locator(this.selectors.pages).nth(t-1)}locatorPage(t){return this.locatorRoot.locator(this.selectors.pages,{hasText:t})}get locatorEllipses(){return this.locatorRoot.locator(this.selectors.ellipses)}async state(){return this.locatorRoot.evaluate(t=>{const e={rootClasses:[],disabled:null,pages:[],hrefs:[]},a=[...t.querySelectorAll(".au-page")],s=[],r=[],o={},l=d=>d==null?void 0:d.getAttribute("href"),i=t.querySelector("a.au-first"),u=t.querySelector("a.au-previous"),m=t.querySelector("a.au-next"),g=t.querySelector("a.au-last");i&&(o.first=l(i)),u&&(o.previous=l(u)),m&&(o.next=l(m)),g&&(o.last=l(g));for(const d of a)r.push(d.getAttribute("href")||""),s.push((d.textContent||"").trim());const h=[...t.querySelectorAll("a.au-page[aria-disabled]")];return e.pages=s,e.hrefs=r,e.hrefsNavigation=o,e.rootClasses=t.className.trim().split(" "),e.disabled=h.length===a.length?"true":null,t.querySelector("a.au-previous[aria-disabled]")?e.isPreviousDisabled=!0:u&&(e.isPreviousDisabled=!1),t.querySelector("a.au-next[aria-disabled]")?e.isNextDisabled=!0:m&&(e.isNextDisabled=!1),t.querySelector("a.au-first[aria-disabled]")?e.isFirstDisabled=!0:i&&(e.isFirstDisabled=!1),t.querySelector("a.au-last[aria-disabled]")?e.isLastDisabled=!0:g&&(e.isLastDisabled=!1),e})}}const P={rootComponent:".au-rating",star:".au-rating-star"};class M extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(P))}getComponentSelector(){return this.selectors.rootComponent}locatorStar(t){return this.locatorRoot.locator(this.selectors.star).nth(t)}async state(){return await this.locatorRoot.evaluate((t,e)=>{const a=[...t.querySelectorAll(e.star)],s=[],r=[];for(const o of a)s.push((o.textContent||"").trim()),r.push(o.className.split(" "));return{rootClasses:t.className.trim().split(" ").sort(),value:t.getAttribute("aria-valuenow"),min:t.getAttribute("aria-valuemin"),max:t.getAttribute("aria-valuemax"),text:t.getAttribute("aria-valuetext"),disabled:t.getAttribute("aria-disabled"),readonly:t.getAttribute("aria-readonly"),stars:s,classes:r}},this.selectors)}}const v={rootComponent:".au-select"};class I extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(v))}getComponentSelector(){return this.selectors.rootComponent}get locatorInput(){return this.locatorRoot.locator('input[type="text"]').nth(0)}get locatorMenu(){return this.locatorRoot.locator(".dropdown-menu")}get locatorMenuItems(){return this.locatorMenu.locator(".au-select-item")}locatorMenuItem(t){return this.locatorMenu.getByText(t).nth(0)}get locatorBadges(){return this.locatorRoot.locator("div.au-select-badge")}locatorBadgeItem(t){return this.locatorBadges.filter({hasText:t}).nth(0)}async state(){return await this.locatorRoot.evaluate(t=>{var u,m;const e=t.querySelector('div[role="combobox"]'),a=t.querySelector('input[type="text"]'),s=[];if(e){const g=e.querySelectorAll("div.au-select-badge");for(const h of g)s.push((u=h==null?void 0:h.textContent)==null?void 0:u.trim())}const r=t.querySelector("ul.dropdown-menu"),o=r!=null,l=[],i=[];if(r!=null){const g=r.querySelectorAll("li.dropdown-item");for(const h of g){const d=(m=h.textContent)==null?void 0:m.trim();l.push(d),h.classList.contains("selected")&&i.push(d)}}return{text:a.value,badges:s,isOpen:o,list:l,checked:i}})}}const f={rootComponent:".alert",body:".alert-body",closeButton:".btn-close"};class w extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(f))}getComponentSelector(){return this.selectors.rootComponent}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}async state(){return this.locatorRoot.evaluate((t,e)=>{var r,o,l;const a=(o=(r=t.querySelector(e.body))==null?void 0:r.innerText)==null?void 0:o.replace(/[^\x20-\x7E]/g,""),s=(l=t.querySelector(e.closeButton))==null?void 0:l.getAttribute("aria-label");return{rootClasses:t.className.trim().split(" ").sort(),body:a,closeButton:s}},this.selectors)}}class V extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",{item:".accordion-item",bodyContainer:".accordion-collapse",body:".accordion-body",header:".accordion-header",buttons:".accordion-button"})}getComponentSelector(){return".au-accordion"}get locatorAccordionItems(){return this.locatorRoot.locator(this.selectors.item)}locatorAccordionItem(t){return this.locatorRoot.locator(this.selectors.item).nth(t)}get locatorAccordionCBodyContainers(){return this.locatorAccordionItems.locator(this.selectors.bodyContainer)}locatorAccordionBodyContainer(t){return this.locatorAccordionItem(t).locator(this.selectors.bodyContainer)}get locatorAccordionBodies(){return this.locatorAccordionCBodyContainers.locator(this.selectors.body)}locatorAccordionBody(t){return this.locatorAccordionBodyContainer(t).locator(this.selectors.body)}get locatorAccordionHeaders(){return this.locatorAccordionItems.locator(this.selectors.header)}locatorAccordionHeader(t){return this.locatorAccordionItem(t).locator(this.selectors.header)}get locatorAccordionButtons(){return this.locatorAccordionHeaders.locator(this.selectors.buttons)}locatorAccordionButton(t){return this.locatorAccordionHeader(t).locator(this.selectors.buttons)}async state(){return await this.locatorRoot.evaluate(t=>{const e=[...t.querySelectorAll(".accordion-item")],a=[];for(const s of e){const r=s.querySelector(".accordion-collapse"),o=s.querySelector(".accordion-button");a.push({classes:s.className.trim().split(" "),id:s.id,isInDOM:r!==null,bodyContainerId:r==null?void 0:r.id,buttonId:o==null?void 0:o.id,expanded:o==null?void 0:o.getAttribute("aria-expanded"),disabled:o==null?void 0:o.getAttribute("aria-disabled"),labeledBy:r==null?void 0:r.getAttribute("aria-labelledby"),buttonControls:o==null?void 0:o.getAttribute("aria-controls")})}return{rootClasses:t.className.trim().split(" "),items:a}})}}const B={rootComponent:'[role="progressbar"]',outerBar:".progress",innerBar:".progress-bar"};class E extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(B))}getComponentSelector(){return this.selectors.rootComponent}get locatorOuterBar(){return this.locatorRoot.locator(this.selectors.outerBar)}get locatorInnerBar(){return this.locatorRoot.locator(this.selectors.innerBar)}async state(){return this.locatorRoot.evaluate(t=>{var s,r,o,l,i,u;const e=t.querySelector(".progress-bar"),a=t.querySelector(".progress");return{ariaLabel:t.getAttribute("aria-label"),ariaValueNow:t.getAttribute("aria-valuenow"),ariaValueMin:t.getAttribute("aria-valuemin"),ariaValueMax:t.getAttribute("aria-valuemax"),ariaValueText:t.getAttribute("aria-valuetext"),label:(s=e==null?void 0:e.textContent)==null?void 0:s.trim(),innerClasses:((l=(o=(r=e==null?void 0:e.className)==null?void 0:r.trim())==null?void 0:o.split(" "))==null?void 0:l.sort())??[],outerHeight:(i=a==null?void 0:a.style)==null?void 0:i.height,innerWidth:(u=e==null?void 0:e.style)==null?void 0:u.width}})}}const R={rootComponent:".au-slider",clickableArea:".au-slider-clickable-area",handle:".au-slider-handle",minLabelHorizontal:".au-slider-label-min",maxLabelHorizontal:".au-slider-label-max",minLabelVertical:".au-slider-label-vertical-min",maxLabelVertical:".au-slider-label-vertical-max",valueLabel:".au-slider-label-now",progress:".au-slider-progress"};class D extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(R))}getComponentSelector(){return this.selectors.rootComponent}get locatorHandle(){return this.locatorRoot.locator(this.selectors.handle)}get locatorMinLabelHorizontal(){return this.locatorRoot.locator(this.selectors.minLabelHorizontal)}get locatorMaxLabelHorizontal(){return this.locatorRoot.locator(this.selectors.maxLabelHorizontal)}get locatorMinLabelVertical(){return this.locatorRoot.locator(this.selectors.minLabelVertical)}get locatorMaxLabelVertical(){return this.locatorRoot.locator(this.selectors.maxLabelVertical)}get locatorProgress(){return this.locatorRoot.locator(this.selectors.progress)}get locatorValueLabel(){return this.locatorRoot.locator(this.selectors.valueLabel)}async sliderHandleState(){return this.locatorRoot.locator(this.selectors.handle).evaluateAll(t=>t.map(e=>({style:e.getAttribute("style"),value:e.getAttribute("aria-valuenow"),min:e.getAttribute("aria-valuemin"),max:e.getAttribute("aria-valuemax"),disabled:e.getAttribute("aria-disabled"),readonly:e.getAttribute("aria-readonly"),ariaLabel:e.getAttribute("aria-label"),ariaValueText:e.getAttribute("aria-valuetext")})))}async sliderProgressState(){return this.locatorRoot.locator(this.selectors.progress).evaluateAll(t=>t.map(e=>e.getAttribute("style")))}}const q={rootComponent:".toast",closeButton:".btn-close",header:".toast-header",body:".toast-body"};class k extends p.BasePO{constructor(){super(...arguments);b(this,"selectors",structuredClone(q))}getComponentSelector(){return this.selectors.rootComponent}get locatorCloseButton(){return this.locatorRoot.locator(this.selectors.closeButton)}async state(){return await this.locatorRoot.evaluate((t,e)=>{var o,l,i;const a=(o=t.querySelector(e.body))==null?void 0:o.innerText,s=(l=t.querySelector(e.header))==null?void 0:l.innerText,r=(i=t.querySelector(e.closeButton))==null?void 0:i.getAttribute("aria-label");return{rootClasses:t.className.trim().split(" ").sort(),body:a,header:s,closeButton:r}},this.selectors)}}exports.AccordionPO=V;exports.AlertPO=w;exports.ModalPO=H;exports.PaginationPO=T;exports.ProgressbarPO=E;exports.RatingPO=M;exports.SelectPO=I;exports.SliderPO=D;exports.ToastPO=k;exports.alertSelectors=f;exports.modalSelectors=A;exports.paginationSelectors=C;exports.progressbarSelectors=B;exports.ratingSelectors=P;exports.selectSelectors=v;exports.sliderSelectors=R;exports.toastSelectors=q;
|