@ghentcdh/ui 2.0.0 → 3.0.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/ControlWrapper-DejmeYzV.js +1 -0
- package/ControlWrapper-DqO2d36v.js +152 -0
- package/Markdown-DcpBYoNe.js +1 -0
- package/Markdown-Dj1gzJJq.js +59 -0
- package/filter/filter.vue.d.ts +1 -1
- package/form/Checkbox.vue.d.ts +7 -7
- package/form/Input.vue.d.ts +7 -7
- package/form/InputNumber.vue.d.ts +7 -7
- package/form/Textarea.vue.d.ts +8 -8
- package/form/core/ControlWrapper.vue.d.ts +7 -7
- package/form/index.d.ts +8 -8
- package/form/select/AutoComplete.vue.d.ts +11 -11
- package/form/select/MultiSelect.vue.d.ts +10 -10
- package/form/select/SelectComponent.vue.d.ts +10 -10
- package/form/select/SelectWrapper.vue.d.ts +10 -10
- package/form/text/Markdown.vue.d.ts +8 -8
- package/form/text/MarkdownFallback.vue.d.ts +8 -8
- package/index.css +3 -1
- package/index.js +2 -1
- package/index.mjs +2330 -67
- package/package.json +1 -1
- package/table/table.component.vue.d.ts +1 -1
- package/testing.js +1 -1
- package/testing.mjs +338 -419
- package/Markdown-C7ZNnPQB.js +0 -1
- package/Markdown-OZGmR-pI.js +0 -76
- package/index-NGeplssl.js +0 -2
- package/index-WrdKkd9c.js +0 -2633
package/testing.mjs
CHANGED
|
@@ -1,420 +1,339 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
}
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
}
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
}
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
}
|
|
338
|
-
/** The title text element. */
|
|
339
|
-
title() {
|
|
340
|
-
return this.locator.locator(".collapse-title span").first();
|
|
341
|
-
}
|
|
342
|
-
/** The content wrapper. */
|
|
343
|
-
content() {
|
|
344
|
-
return this.locator.locator(".collapse-content");
|
|
345
|
-
}
|
|
346
|
-
checkbox() {
|
|
347
|
-
return this.locator.locator('input[type="checkbox"]');
|
|
348
|
-
}
|
|
349
|
-
}
|
|
350
|
-
class w extends r {
|
|
351
|
-
/** Resolve the alert by its message text. */
|
|
352
|
-
static byMessage(t, a) {
|
|
353
|
-
return new w(
|
|
354
|
-
t.getByRole("alert").filter({ hasText: a })
|
|
355
|
-
);
|
|
356
|
-
}
|
|
357
|
-
/** Resolve the first (or only) alert on the page. */
|
|
358
|
-
static first(t) {
|
|
359
|
-
return new w(t.getByRole("alert").first());
|
|
360
|
-
}
|
|
361
|
-
static for(t) {
|
|
362
|
-
return new w(t);
|
|
363
|
-
}
|
|
364
|
-
async message() {
|
|
365
|
-
return await this.locator.locator("span").textContent() ?? "";
|
|
366
|
-
}
|
|
367
|
-
async hasClass(t) {
|
|
368
|
-
return (await this.locator.getAttribute("class") ?? "").includes(t);
|
|
369
|
-
}
|
|
370
|
-
}
|
|
371
|
-
class g extends r {
|
|
372
|
-
/** Resolve the drawer as the `<main>` containing the panels. */
|
|
373
|
-
static root(t) {
|
|
374
|
-
return new g(t.locator("main").first());
|
|
375
|
-
}
|
|
376
|
-
static for(t) {
|
|
377
|
-
return new g(t);
|
|
378
|
-
}
|
|
379
|
-
async toggleLeft() {
|
|
380
|
-
return await this.leftButton().click(), this;
|
|
381
|
-
}
|
|
382
|
-
async toggleRight() {
|
|
383
|
-
return await this.rightButton().click(), this;
|
|
384
|
-
}
|
|
385
|
-
async isLeftOpen() {
|
|
386
|
-
return await this.leftButton().getAttribute("aria-expanded") === "true";
|
|
387
|
-
}
|
|
388
|
-
async isRightOpen() {
|
|
389
|
-
return await this.rightButton().getAttribute("aria-expanded") === "true";
|
|
390
|
-
}
|
|
391
|
-
leftPanel() {
|
|
392
|
-
return this.locator.locator("#drawer-left-panel");
|
|
393
|
-
}
|
|
394
|
-
rightPanel() {
|
|
395
|
-
return this.locator.locator("#drawer-right-panel");
|
|
396
|
-
}
|
|
397
|
-
leftButton() {
|
|
398
|
-
return this.locator.locator('button[aria-controls="drawer-left-panel"]');
|
|
399
|
-
}
|
|
400
|
-
rightButton() {
|
|
401
|
-
return this.locator.locator('button[aria-controls="drawer-right-panel"]');
|
|
402
|
-
}
|
|
403
|
-
}
|
|
404
|
-
export {
|
|
405
|
-
w as AlertHarness,
|
|
406
|
-
n as AutocompleteHarness,
|
|
407
|
-
s as BooleanHarness,
|
|
408
|
-
b as ButtonHarness,
|
|
409
|
-
p as CollapseHarness,
|
|
410
|
-
g as DrawerHarness,
|
|
411
|
-
r as Harness,
|
|
412
|
-
h as MarkdownHarness,
|
|
413
|
-
y as ModalHarness,
|
|
414
|
-
u as MultiSelectHarness,
|
|
415
|
-
o as NumberHarness,
|
|
416
|
-
l as SelectHarness,
|
|
417
|
-
c as TextAreaHarness,
|
|
418
|
-
i as TextHarness,
|
|
419
|
-
e as byRole
|
|
1
|
+
//#region src/testing/Harness.ts
|
|
2
|
+
var e = class {
|
|
3
|
+
constructor(e) {
|
|
4
|
+
this.locator = e;
|
|
5
|
+
}
|
|
6
|
+
page() {
|
|
7
|
+
return this.locator.page();
|
|
8
|
+
}
|
|
9
|
+
asLocator() {
|
|
10
|
+
return this.locator;
|
|
11
|
+
}
|
|
12
|
+
}, t = (e, t, n) => e.getByRole(t, { name: n }), n = class n extends e {
|
|
13
|
+
static byId(e, r) {
|
|
14
|
+
return new n(t(e, "textbox", r));
|
|
15
|
+
}
|
|
16
|
+
static byLabel(e, r) {
|
|
17
|
+
return new n(t(e, "textbox", r));
|
|
18
|
+
}
|
|
19
|
+
static for(e) {
|
|
20
|
+
return new n(e);
|
|
21
|
+
}
|
|
22
|
+
async fill(e) {
|
|
23
|
+
return await this.locator.click(), await this.locator.fill(e), this;
|
|
24
|
+
}
|
|
25
|
+
async type(e) {
|
|
26
|
+
return await this.locator.click(), await this.locator.pressSequentially(e), this;
|
|
27
|
+
}
|
|
28
|
+
async clear() {
|
|
29
|
+
return await this.locator.fill(""), this;
|
|
30
|
+
}
|
|
31
|
+
async value() {
|
|
32
|
+
return this.locator.inputValue();
|
|
33
|
+
}
|
|
34
|
+
async blur() {
|
|
35
|
+
return await this.locator.press("Tab"), this;
|
|
36
|
+
}
|
|
37
|
+
}, r = class n extends e {
|
|
38
|
+
static byId(e, r) {
|
|
39
|
+
return new n(t(e, "spinbutton", r));
|
|
40
|
+
}
|
|
41
|
+
static byLabel(e, r) {
|
|
42
|
+
return new n(t(e, "spinbutton", r));
|
|
43
|
+
}
|
|
44
|
+
static for(e) {
|
|
45
|
+
return new n(e);
|
|
46
|
+
}
|
|
47
|
+
async fill(e) {
|
|
48
|
+
return await this.locator.click(), await this.locator.fill(String(e)), await this.locator.press("Tab"), this;
|
|
49
|
+
}
|
|
50
|
+
async clear() {
|
|
51
|
+
return await this.locator.fill(""), this;
|
|
52
|
+
}
|
|
53
|
+
async value() {
|
|
54
|
+
let e = await this.locator.inputValue();
|
|
55
|
+
return e === "" ? null : Number(e);
|
|
56
|
+
}
|
|
57
|
+
}, i = class n extends e {
|
|
58
|
+
static byId(e, r) {
|
|
59
|
+
return new n(t(e, "textbox", r));
|
|
60
|
+
}
|
|
61
|
+
static byLabel(e, r) {
|
|
62
|
+
return new n(t(e, "textbox", r));
|
|
63
|
+
}
|
|
64
|
+
static for(e) {
|
|
65
|
+
return new n(e);
|
|
66
|
+
}
|
|
67
|
+
async fill(e) {
|
|
68
|
+
return await this.locator.click(), await this.locator.fill(e), this;
|
|
69
|
+
}
|
|
70
|
+
async clear() {
|
|
71
|
+
return await this.locator.fill(""), this;
|
|
72
|
+
}
|
|
73
|
+
async value() {
|
|
74
|
+
return this.locator.inputValue();
|
|
75
|
+
}
|
|
76
|
+
}, a = class n extends e {
|
|
77
|
+
static byId(e, r) {
|
|
78
|
+
return new n(t(e, "checkbox", r));
|
|
79
|
+
}
|
|
80
|
+
static byLabel(e, r) {
|
|
81
|
+
return new n(t(e, "checkbox", r));
|
|
82
|
+
}
|
|
83
|
+
static for(e) {
|
|
84
|
+
return new n(e);
|
|
85
|
+
}
|
|
86
|
+
async fill(e) {
|
|
87
|
+
return e ? await this.locator.check() : await this.locator.uncheck(), this;
|
|
88
|
+
}
|
|
89
|
+
async toggle() {
|
|
90
|
+
return await this.locator.click(), this;
|
|
91
|
+
}
|
|
92
|
+
async value() {
|
|
93
|
+
return this.locator.isChecked();
|
|
94
|
+
}
|
|
95
|
+
}, o = class n extends e {
|
|
96
|
+
static byId(e, r) {
|
|
97
|
+
return new n(t(e, "combobox", r));
|
|
98
|
+
}
|
|
99
|
+
static byLabel(e, r) {
|
|
100
|
+
return new n(t(e, "combobox", r));
|
|
101
|
+
}
|
|
102
|
+
static for(e) {
|
|
103
|
+
return new n(e);
|
|
104
|
+
}
|
|
105
|
+
async open() {
|
|
106
|
+
return await this.locator.click(), this;
|
|
107
|
+
}
|
|
108
|
+
async fill(e) {
|
|
109
|
+
return this.select(e);
|
|
110
|
+
}
|
|
111
|
+
async select(e) {
|
|
112
|
+
return await this.open(), await this.page().getByRole("option", { name: e }).locator("a").click(), this;
|
|
113
|
+
}
|
|
114
|
+
async value() {
|
|
115
|
+
return (await this.locator.textContent())?.trim() ?? "";
|
|
116
|
+
}
|
|
117
|
+
async clear() {
|
|
118
|
+
return await this.locator.locator("xpath=ancestor::*[@role=\"select\"][1]").getByRole("button", { name: "Clear" }).click(), this;
|
|
119
|
+
}
|
|
120
|
+
async clickCreateNew() {
|
|
121
|
+
await this.locator.locator("xpath=ancestor::*[@role=\"select\"][1]").getByRole("button", { name: "create" }).click();
|
|
122
|
+
}
|
|
123
|
+
}, s = class n extends e {
|
|
124
|
+
static byId(e, r) {
|
|
125
|
+
return new n(t(e, "combobox", r));
|
|
126
|
+
}
|
|
127
|
+
static byLabel(e, r) {
|
|
128
|
+
return new n(t(e, "combobox", r));
|
|
129
|
+
}
|
|
130
|
+
static for(e) {
|
|
131
|
+
return new n(e);
|
|
132
|
+
}
|
|
133
|
+
async fill(e) {
|
|
134
|
+
return await this.locator.click(), await this.locator.fill(e), await this.page().getByRole("option", { name: e }).locator("a").click(), this;
|
|
135
|
+
}
|
|
136
|
+
async query(e) {
|
|
137
|
+
return await this.locator.click(), await this.locator.fill(e), this;
|
|
138
|
+
}
|
|
139
|
+
async pickOption(e) {
|
|
140
|
+
return await this.page().getByRole("option", { name: e }).locator("a").click(), this;
|
|
141
|
+
}
|
|
142
|
+
async press(e) {
|
|
143
|
+
return await this.locator.press(e), this;
|
|
144
|
+
}
|
|
145
|
+
async clickCreateNew() {
|
|
146
|
+
await this.locator.locator("xpath=ancestor::*[@role=\"select\"][1]").getByRole("button", { name: "create" }).click();
|
|
147
|
+
}
|
|
148
|
+
async clear() {
|
|
149
|
+
return await this.locator.locator("xpath=ancestor::*[@role=\"select\"][1]").getByRole("button", { name: "Clear" }).click(), this;
|
|
150
|
+
}
|
|
151
|
+
async value() {
|
|
152
|
+
return this.locator.inputValue();
|
|
153
|
+
}
|
|
154
|
+
listbox() {
|
|
155
|
+
return this.page().getByRole("listbox");
|
|
156
|
+
}
|
|
157
|
+
options() {
|
|
158
|
+
return this.page().getByRole("option");
|
|
159
|
+
}
|
|
160
|
+
}, c = class n extends e {
|
|
161
|
+
static byId(e, r) {
|
|
162
|
+
return new n(t(e, "combobox", r));
|
|
163
|
+
}
|
|
164
|
+
static byLabel(e, r) {
|
|
165
|
+
return new n(t(e, "combobox", r));
|
|
166
|
+
}
|
|
167
|
+
static for(e) {
|
|
168
|
+
return new n(e);
|
|
169
|
+
}
|
|
170
|
+
async open() {
|
|
171
|
+
return await this.locator.click(), this;
|
|
172
|
+
}
|
|
173
|
+
async fill(e) {
|
|
174
|
+
await this.open();
|
|
175
|
+
for (let t of e) await this.page().getByRole("option", { name: t }).locator("a").click();
|
|
176
|
+
return await this.locator.click(), this;
|
|
177
|
+
}
|
|
178
|
+
async select(e) {
|
|
179
|
+
return await this.open(), await this.page().getByRole("option", { name: e }).locator("a").click(), this;
|
|
180
|
+
}
|
|
181
|
+
async removeChip(e) {
|
|
182
|
+
return await this.locator.locator("xpath=ancestor::*[@role=\"select\"][1]").getByText(e, { exact: !0 }).getByRole("button").click(), this;
|
|
183
|
+
}
|
|
184
|
+
}, l = class n extends e {
|
|
185
|
+
static byId(e, r) {
|
|
186
|
+
return new n(t(e, "textbox", r));
|
|
187
|
+
}
|
|
188
|
+
static byLabel(e, r) {
|
|
189
|
+
return new n(t(e, "textbox", r));
|
|
190
|
+
}
|
|
191
|
+
static for(e) {
|
|
192
|
+
return new n(e);
|
|
193
|
+
}
|
|
194
|
+
get editor() {
|
|
195
|
+
return this.locator.getByRole("textbox");
|
|
196
|
+
}
|
|
197
|
+
async fill(e) {
|
|
198
|
+
return await this.editor.fill(e), this;
|
|
199
|
+
}
|
|
200
|
+
async clear() {
|
|
201
|
+
return await this.editor.fill(""), this;
|
|
202
|
+
}
|
|
203
|
+
async typeBold(e) {
|
|
204
|
+
return await this.toolbar("B").click(), await this.editor.pressSequentially(e), await this.toolbar("B").click(), this;
|
|
205
|
+
}
|
|
206
|
+
async typeItalic(e) {
|
|
207
|
+
return await this.toolbar("I").click(), await this.editor.pressSequentially(e), await this.toolbar("I").click(), this;
|
|
208
|
+
}
|
|
209
|
+
async type(e) {
|
|
210
|
+
return await this.editor.pressSequentially(e), this;
|
|
211
|
+
}
|
|
212
|
+
toolbar(e) {
|
|
213
|
+
return this.locator.getByRole("button", { name: e });
|
|
214
|
+
}
|
|
215
|
+
async isMarkActive(e) {
|
|
216
|
+
return (await this.toolbar(e).getAttribute("class") ?? "").includes("btn-active");
|
|
217
|
+
}
|
|
218
|
+
}, u = class t extends e {
|
|
219
|
+
static byTitle(e, n) {
|
|
220
|
+
return new t(e.getByRole("dialog", { name: n }));
|
|
221
|
+
}
|
|
222
|
+
static current(e) {
|
|
223
|
+
return new t(e.getByRole("dialog"));
|
|
224
|
+
}
|
|
225
|
+
static for(e) {
|
|
226
|
+
return new t(e);
|
|
227
|
+
}
|
|
228
|
+
async clickClose() {
|
|
229
|
+
return await this.locator.getByRole("button", { name: "Close" }).click(), this;
|
|
230
|
+
}
|
|
231
|
+
async pressEscape() {
|
|
232
|
+
return await this.locator.press("Escape"), this;
|
|
233
|
+
}
|
|
234
|
+
async clickBackdrop() {
|
|
235
|
+
return await this.locator.click({ position: {
|
|
236
|
+
x: 5,
|
|
237
|
+
y: 5
|
|
238
|
+
} }), this;
|
|
239
|
+
}
|
|
240
|
+
async clickAction(e) {
|
|
241
|
+
return await this.locator.getByRole("button", { name: e }).click(), this;
|
|
242
|
+
}
|
|
243
|
+
title() {
|
|
244
|
+
return this.locator.locator("h3").first();
|
|
245
|
+
}
|
|
246
|
+
content() {
|
|
247
|
+
return this.locator.locator("[id$=\"_content\"]").first();
|
|
248
|
+
}
|
|
249
|
+
asLocator() {
|
|
250
|
+
return this.locator;
|
|
251
|
+
}
|
|
252
|
+
}, d = class n extends e {
|
|
253
|
+
static byName(e, r) {
|
|
254
|
+
return new n(t(e, "button", r));
|
|
255
|
+
}
|
|
256
|
+
static for(e) {
|
|
257
|
+
return new n(e);
|
|
258
|
+
}
|
|
259
|
+
async click() {
|
|
260
|
+
return await this.locator.click(), this;
|
|
261
|
+
}
|
|
262
|
+
async isDisabled() {
|
|
263
|
+
return this.locator.isDisabled();
|
|
264
|
+
}
|
|
265
|
+
async text() {
|
|
266
|
+
return await this.locator.textContent() ?? "";
|
|
267
|
+
}
|
|
268
|
+
}, f = class t extends e {
|
|
269
|
+
static byTitle(e, n) {
|
|
270
|
+
return new t(e.getByLabel(`Toggle ${n}`).locator(".."));
|
|
271
|
+
}
|
|
272
|
+
static for(e) {
|
|
273
|
+
return new t(e);
|
|
274
|
+
}
|
|
275
|
+
async toggle() {
|
|
276
|
+
return await this.checkbox().click(), this;
|
|
277
|
+
}
|
|
278
|
+
async isOpen() {
|
|
279
|
+
return this.checkbox().isChecked();
|
|
280
|
+
}
|
|
281
|
+
title() {
|
|
282
|
+
return this.locator.locator(".collapse-title span").first();
|
|
283
|
+
}
|
|
284
|
+
content() {
|
|
285
|
+
return this.locator.locator(".collapse-content");
|
|
286
|
+
}
|
|
287
|
+
checkbox() {
|
|
288
|
+
return this.locator.locator("input[type=\"checkbox\"]");
|
|
289
|
+
}
|
|
290
|
+
}, p = class t extends e {
|
|
291
|
+
static byMessage(e, n) {
|
|
292
|
+
return new t(e.getByRole("alert").filter({ hasText: n }));
|
|
293
|
+
}
|
|
294
|
+
static first(e) {
|
|
295
|
+
return new t(e.getByRole("alert").first());
|
|
296
|
+
}
|
|
297
|
+
static for(e) {
|
|
298
|
+
return new t(e);
|
|
299
|
+
}
|
|
300
|
+
async message() {
|
|
301
|
+
return await this.locator.locator("span").textContent() ?? "";
|
|
302
|
+
}
|
|
303
|
+
async hasClass(e) {
|
|
304
|
+
return (await this.locator.getAttribute("class") ?? "").includes(e);
|
|
305
|
+
}
|
|
306
|
+
}, m = class t extends e {
|
|
307
|
+
static root(e) {
|
|
308
|
+
return new t(e.locator("main").first());
|
|
309
|
+
}
|
|
310
|
+
static for(e) {
|
|
311
|
+
return new t(e);
|
|
312
|
+
}
|
|
313
|
+
async toggleLeft() {
|
|
314
|
+
return await this.leftButton().click(), this;
|
|
315
|
+
}
|
|
316
|
+
async toggleRight() {
|
|
317
|
+
return await this.rightButton().click(), this;
|
|
318
|
+
}
|
|
319
|
+
async isLeftOpen() {
|
|
320
|
+
return await this.leftButton().getAttribute("aria-expanded") === "true";
|
|
321
|
+
}
|
|
322
|
+
async isRightOpen() {
|
|
323
|
+
return await this.rightButton().getAttribute("aria-expanded") === "true";
|
|
324
|
+
}
|
|
325
|
+
leftPanel() {
|
|
326
|
+
return this.locator.locator("#drawer-left-panel");
|
|
327
|
+
}
|
|
328
|
+
rightPanel() {
|
|
329
|
+
return this.locator.locator("#drawer-right-panel");
|
|
330
|
+
}
|
|
331
|
+
leftButton() {
|
|
332
|
+
return this.locator.locator("button[aria-controls=\"drawer-left-panel\"]");
|
|
333
|
+
}
|
|
334
|
+
rightButton() {
|
|
335
|
+
return this.locator.locator("button[aria-controls=\"drawer-right-panel\"]");
|
|
336
|
+
}
|
|
420
337
|
};
|
|
338
|
+
//#endregion
|
|
339
|
+
export { p as AlertHarness, s as AutocompleteHarness, a as BooleanHarness, d as ButtonHarness, f as CollapseHarness, m as DrawerHarness, e as Harness, l as MarkdownHarness, u as ModalHarness, c as MultiSelectHarness, r as NumberHarness, o as SelectHarness, i as TextAreaHarness, n as TextHarness, t as byRole };
|