xmlui 0.10.25 → 0.11.1

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 (67) hide show
  1. package/dist/lib/{index-CCEPGw_x.mjs → index-CEq6OdjV.js} +6186 -6523
  2. package/dist/lib/index.css +1 -1
  3. package/dist/lib/{initMock-DFcCR7ey.mjs → initMock-DhUnLKrR.js} +1 -1
  4. package/dist/lib/{language-server-web-worker.mjs → language-server-web-worker.js} +1 -1
  5. package/dist/lib/{language-server.mjs → language-server.js} +1 -1
  6. package/dist/lib/{metadata-utils-Dx-2qZBh.mjs → metadata-utils-D27cn-XB.js} +7 -7
  7. package/dist/lib/{server-common--BHVvP1o.mjs → server-common-2DaoOOL5.js} +625 -616
  8. package/dist/lib/testing.d.ts +2011 -0
  9. package/dist/lib/testing.js +2386 -0
  10. package/dist/lib/vite-xmlui-plugin/index.js +13968 -0
  11. package/dist/lib/vite-xmlui-plugin/package.json +3 -0
  12. package/dist/lib/xmlui-parser-BZZ430Wm.js +523 -0
  13. package/dist/lib/xmlui-parser.d.ts +2 -1
  14. package/dist/lib/{xmlui-parser.mjs → xmlui-parser.js} +2 -2
  15. package/dist/lib/{xmlui-serializer-uCYa8_tZ.mjs → xmlui-serializer-D9D2mQ8m.js} +1 -1
  16. package/dist/lib/xmlui.d.ts +1 -0
  17. package/dist/lib/{xmlui.mjs → xmlui.js} +24 -23
  18. package/dist/metadata/{collectedComponentMetadata-mwkNkxN_.mjs → collectedComponentMetadata-BAI5eK2v.js} +13057 -12883
  19. package/dist/metadata/{initMock-BVxHA6wu.mjs → initMock-CekNG5Ax.js} +1 -1
  20. package/dist/metadata/style.css +1 -1
  21. package/dist/metadata/{xmlui-metadata.mjs → xmlui-metadata.js} +1 -1
  22. package/dist/metadata/xmlui-metadata.umd.cjs +207 -0
  23. package/dist/scripts/bin/bootstrap.cjs +4 -0
  24. package/dist/scripts/bin/index.js +85 -13
  25. package/dist/scripts/package.json +30 -22
  26. package/dist/scripts/src/components/App/App.spec.js +127 -15
  27. package/dist/scripts/src/components/App/AppNative.js +13 -2
  28. package/dist/scripts/src/components/AppHeader/AppHeader.js +1 -6
  29. package/dist/scripts/src/components/AppHeader/AppHeaderNative.js +6 -7
  30. package/dist/scripts/src/components/Avatar/Avatar.spec.js +0 -29
  31. package/dist/scripts/src/components/Button/Button.spec.js +0 -29
  32. package/dist/scripts/src/components/Charts/BarChart/BarChartNative.js +2 -0
  33. package/dist/scripts/src/components/Charts/LineChart/LineChartNative.js +2 -2
  34. package/dist/scripts/src/components/Charts/Tooltip/TooltipContent.spec.js +8 -6
  35. package/dist/scripts/src/components/Form/Form.js +19 -0
  36. package/dist/scripts/src/components/Form/Form.spec.js +444 -0
  37. package/dist/scripts/src/components/Form/FormNative.js +46 -15
  38. package/dist/scripts/src/components/Form/formActions.js +3 -2
  39. package/dist/scripts/src/components/FormItem/FormItem.js +10 -2
  40. package/dist/scripts/src/components/FormItem/FormItem.spec.js +159 -0
  41. package/dist/scripts/src/components/FormItem/FormItemNative.js +6 -5
  42. package/dist/scripts/src/components/Heading/Heading.js +45 -5
  43. package/dist/scripts/src/components/Heading/Heading.spec.js +116 -47
  44. package/dist/scripts/src/components/Queue/Queue.js +1 -16
  45. package/dist/scripts/src/components/Queue/QueueNative.js +60 -2
  46. package/dist/scripts/src/components/TableOfContents/TableOfContents.js +7 -5
  47. package/dist/scripts/src/components-core/appContext/misc-utils.js +2 -1
  48. package/dist/scripts/src/components-core/devtools/InspectorDialog.js +2 -2
  49. package/dist/scripts/src/components-core/rendering/valueExtractor.js +9 -1
  50. package/dist/scripts/src/components-core/script-runner/eval-tree-async.js +2 -0
  51. package/dist/scripts/src/components-core/utils/base64-utils.js +2 -0
  52. package/dist/scripts/src/components-core/utils/extractParam.js +2 -1
  53. package/dist/scripts/src/components-core/utils/misc.js +44 -0
  54. package/dist/scripts/src/language-server/server-common.js +2 -2
  55. package/dist/scripts/src/language-server/{xmlui-metadata-generated.mjs → xmlui-metadata-generated.js} +625 -615
  56. package/dist/scripts/src/testing/drivers/index.js +9 -0
  57. package/dist/scripts/src/testing/index.js +69 -0
  58. package/dist/standalone/xmlui-standalone.es.d.ts +32 -16
  59. package/dist/standalone/xmlui-standalone.umd.js +36 -36
  60. package/package.json +45 -37
  61. package/dist/metadata/xmlui-metadata.umd.js +0 -207
  62. package/dist/scripts/bin/bootstrap.js +0 -11
  63. /package/dist/lib/{apiInterceptorWorker-QiltRtq1.mjs → apiInterceptorWorker-QiltRtq1.js} +0 -0
  64. /package/dist/lib/{syntax-monaco.mjs → syntax-monaco.js} +0 -0
  65. /package/dist/lib/{syntax-textmate.mjs → syntax-textmate.js} +0 -0
  66. /package/dist/lib/{transform-Tooy42EB.mjs → transform-Tooy42EB.js} +0 -0
  67. /package/dist/metadata/{apiInterceptorWorker-Dql7QGw2.mjs → apiInterceptorWorker-Dql7QGw2.js} +0 -0
@@ -0,0 +1,2011 @@
1
+ import { BrowserContext } from '@playwright/test';
2
+ import { Color } from 'chroma-js';
3
+ import { default as default_2 } from 'chroma-js';
4
+ import { DelayMode } from 'msw';
5
+ import { Expect } from 'playwright/test';
6
+ import { ExpectMatcherState } from 'playwright/test';
7
+ import { Locator } from '@playwright/test';
8
+ import { Locator as Locator_2 } from 'playwright-core';
9
+ import { Page } from 'playwright-core';
10
+ import { Page as Page_2 } from '@playwright/test';
11
+ import { PlaywrightTestArgs } from 'playwright/test';
12
+ import { PlaywrightTestOptions } from 'playwright/test';
13
+ import { PlaywrightWorkerArgs } from 'playwright/test';
14
+ import { PlaywrightWorkerOptions } from 'playwright/test';
15
+ import { Request as Request_2 } from 'playwright-core';
16
+ import { Response as Response_2 } from 'playwright-core';
17
+ import { TestType } from 'playwright/test';
18
+
19
+ declare class AccordionDriver extends ComponentDriver {
20
+ }
21
+
22
+ declare type ApiInterceptorDefinition = {
23
+ type?: string;
24
+ config?: Record<string, any>;
25
+ artificialDelay?: number | DelayMode;
26
+ schemaDescriptor?: SchemaDescriptor;
27
+ apiUrl?: string;
28
+ initialData?: Record<string, any[]> | (() => Promise<Record<string, any[]>>);
29
+ helpers?: Record<string, any>;
30
+ initialize?: string;
31
+ operations?: Record<string, InterceptorOperationDef>;
32
+ auth?: AuthDefinition;
33
+ useWorker?: boolean;
34
+ };
35
+
36
+ declare class AppFooterDriver extends ComponentDriver {
37
+ }
38
+
39
+ declare class AppHeaderDriver extends ComponentDriver {
40
+ }
41
+
42
+ declare type ARRAY_DESTRUCTURE = typeof T_ARRAY_DESTRUCTURE;
43
+
44
+ declare type ARRAY_LITERAL = typeof T_ARRAY_LITERAL;
45
+
46
+ declare interface ArrayDestructure extends DestructureBase {
47
+ type: ARRAY_DESTRUCTURE;
48
+ }
49
+
50
+ declare interface ArrayLiteral extends ExpressionBase {
51
+ type: ARRAY_LITERAL;
52
+ items: Expression[];
53
+ loose?: boolean;
54
+ }
55
+
56
+ declare type ARROW_EXPRESSION = typeof T_ARROW_EXPRESSION;
57
+
58
+ declare type ARROW_EXPRESSION_STATEMENT = typeof T_ARROW_EXPRESSION_STATEMENT;
59
+
60
+ declare interface ArrowExpression extends ExpressionBase {
61
+ type: ARROW_EXPRESSION;
62
+ name?: string;
63
+ args: Expression[];
64
+ statement: Statement;
65
+ }
66
+
67
+ declare interface ArrowExpressionStatement extends ScripNodeBase {
68
+ type: ARROW_EXPRESSION_STATEMENT;
69
+ expr: ArrowExpression;
70
+ }
71
+
72
+ declare type ASSIGNMENT_EXPRESSION = typeof T_ASSIGNMENT_EXPRESSION;
73
+
74
+ declare interface AssignmentExpression extends ExpressionBase {
75
+ type: ASSIGNMENT_EXPRESSION;
76
+ leftValue: Expression;
77
+ op: AssignmentSymbols;
78
+ expr: Expression;
79
+ }
80
+
81
+ declare type AssignmentSymbols = "=" | "+=" | "-=" | "**=" | "*=" | "/=" | "%=" | "<<=" | ">>=" | ">>>=" | "&=" | "^=" | "|=" | "&&=" | "||=" | "??=";
82
+
83
+ declare type AuthDefinition = {
84
+ defaultLoggedInUser?: any;
85
+ };
86
+
87
+ declare class AutoCompleteDriver extends ComponentDriver {
88
+ toggleOptionsVisibility(): Promise<void>;
89
+ selectLabel(value: string): Promise<void>;
90
+ searchFor(value: string): Promise<void>;
91
+ chooseIndex(index: number): Promise<void>;
92
+ }
93
+
94
+ declare class AvatarDriver extends ComponentDriver {
95
+ }
96
+
97
+ declare class BackdropDriver extends ComponentDriver {
98
+ getBackdrop(): Locator;
99
+ getOverlay(): Locator;
100
+ getDefaultBackgroundColor(): string;
101
+ getDefaultOpacity(): string;
102
+ }
103
+
104
+ declare class BadgeDriver extends ComponentDriver {
105
+ }
106
+
107
+ declare type BINARY_EXPRESSION = typeof T_BINARY_EXPRESSION;
108
+
109
+ declare interface BinaryExpression extends ExpressionBase {
110
+ type: BINARY_EXPRESSION;
111
+ op: BinaryOpSymbols;
112
+ left: Expression;
113
+ right: Expression;
114
+ }
115
+
116
+ declare type BinaryOpSymbols = "**" | "*" | "/" | "%" | "+" | "-" | "<<" | ">>" | ">>>" | "<" | "<=" | ">" | ">=" | "==" | "===" | "!=" | "!==" | "&" | "|" | "^" | "&&" | "||" | "??" | "in";
117
+
118
+ declare type BLOCK_STATEMENT = typeof T_BLOCK_STATEMENT;
119
+
120
+ declare interface BlockStatement extends ScripNodeBase {
121
+ type: BLOCK_STATEMENT;
122
+ stmts: Statement[];
123
+ }
124
+
125
+ export declare type BorderSide = (typeof BorderSideValues)[number];
126
+
127
+ declare const BorderSideValues: readonly ["top", "bottom", "left", "right"];
128
+
129
+ declare type BREAK_STATEMENT = typeof T_BREAK_STATEMENT;
130
+
131
+ declare interface BreakStatement extends ScripNodeBase {
132
+ type: BREAK_STATEMENT;
133
+ }
134
+
135
+ declare class ButtonDriver extends ComponentDriver {
136
+ getFirstNonTextNode(): Locator;
137
+ getIcons(): Locator;
138
+ }
139
+
140
+ declare type CALCULATED_MEMBER_ACCESS_EXPRESSION = typeof T_CALCULATED_MEMBER_ACCESS_EXPRESSION;
141
+
142
+ declare interface CalculatedMemberAccessExpression extends ExpressionBase {
143
+ type: CALCULATED_MEMBER_ACCESS_EXPRESSION;
144
+ obj: Expression;
145
+ member: Expression;
146
+ }
147
+
148
+ declare class CardDriver extends ComponentDriver {
149
+ get avatar(): Locator;
150
+ }
151
+
152
+ declare class CheckboxDriver extends InputComponentDriver {
153
+ getIndicatorColor(): Promise<string>;
154
+ }
155
+
156
+ declare type ClickOption = {
157
+ button?: "left" | "right" | "middle";
158
+ clickCount?: number;
159
+ delay?: number;
160
+ force?: boolean;
161
+ modifiers?: Array<"Alt" | "Control" | "ControlOrMeta" | "Meta" | "Shift">;
162
+ noWaitAfter?: boolean;
163
+ position?: {
164
+ x: number;
165
+ y: number;
166
+ };
167
+ timeout?: number;
168
+ trial?: boolean;
169
+ };
170
+
171
+ declare class Clipboard_2 {
172
+ private page;
173
+ private content;
174
+ constructor(page: Page);
175
+ init(): () => void;
176
+ /**
177
+ * Reads the text from the clipboard.
178
+ *
179
+ * @returns The text from the clipboard.
180
+ */
181
+ read(): Promise<string>;
182
+ /**
183
+ * Writes the text to the clipboard.
184
+ *
185
+ * @param text - The text to write to the clipboard.
186
+ */
187
+ write(text: string): Promise<void>;
188
+ clear(): Promise<void>;
189
+ /**
190
+ * Copies the text from the given locator to the clipboard.
191
+ *
192
+ * Steps:
193
+ * 1. Focus the locator.
194
+ * 2. Select the text.
195
+ * 3. Copy the text to the clipboard. (ControlOrMeta+C)
196
+ *
197
+ * @param locator - a Locator to focus and copy from
198
+ */
199
+ copy(locator: Locator_2): Promise<void>;
200
+ /**
201
+ * Pastes the text from the clipboard to the given locator.
202
+ *
203
+ * Steps:
204
+ * 1. Focus the locator.
205
+ * 2. Paste the text from the clipboard. (ControlOrMeta+V)
206
+ *
207
+ * @param locator - a Locator to focus and paste to
208
+ */
209
+ paste(locator: Locator_2): Promise<void>;
210
+ }
211
+
212
+ declare class CodeBlockDriver extends ComponentDriver {
213
+ getHeader(): Locator;
214
+ getContent(): Locator;
215
+ getCopyButton(): Locator;
216
+ getFilename(): Locator;
217
+ isCopyButtonVisible(): Promise<boolean>;
218
+ hasHeader(): Promise<boolean>;
219
+ getCodeText(): Promise<string>;
220
+ clickCopyButton(): Promise<void>;
221
+ hoverContent(): Promise<void>;
222
+ }
223
+
224
+ declare type CodeDeclaration = {
225
+ source?: string;
226
+ tree: Expression;
227
+ [x: string]: unknown;
228
+ };
229
+
230
+ declare type CollectedDeclarations = {
231
+ vars: Record<string, CodeDeclaration>;
232
+ functions: Record<string, CodeDeclaration>;
233
+ moduleErrors?: ModuleErrors;
234
+ };
235
+
236
+ declare type ComponentApiMetadata = {
237
+ readonly description: string;
238
+ readonly signature?: string;
239
+ readonly parameters?: Record<string, string>;
240
+ };
241
+
242
+ declare interface ComponentDef<TMd extends ComponentMetadata = ComponentMetadata> extends ComponentDefCore, Scriptable {
243
+ props?: Record<keyof TMd["props"], any>;
244
+ events?: Record<keyof TMd["events"], any>;
245
+ api?: Record<keyof TMd["apis"], any>;
246
+ contextVars?: Record<keyof TMd["contextVars"], string>;
247
+ }
248
+
249
+ /**
250
+ * This interface represents the core properties of a component definition
251
+ * (independent of component metadata).
252
+ */
253
+ declare interface ComponentDefCore {
254
+ /**
255
+ * The type discriminator field of the component; it defines the unique ID of the component type.
256
+ */
257
+ type: string;
258
+ /**
259
+ * Unique identifier of a component-like object
260
+ */
261
+ uid?: string;
262
+ /**
263
+ * An optional identifier we use for e2e tests; it does not influence the rendering of a component.
264
+ */
265
+ testId?: string;
266
+ /**
267
+ * Though components manage their state internally, the app logic may require user
268
+ * state management. Components may have user *variables*, which the UI logic uses to
269
+ * manage the application state. This property holds the variables (name and value
270
+ * pairs) associated with this component definition.
271
+ */
272
+ vars?: Record<string, any>;
273
+ /**
274
+ * Each component may have child components to constitute a hierarchy of components.
275
+ * This property holds the definition of these nested children.
276
+ */
277
+ children?: ComponentDef[];
278
+ /**
279
+ * Components may have slots that can be filled with other components. This property
280
+ * holds the contents of the slots.
281
+ */
282
+ slots?: Record<string, ComponentDef[]>;
283
+ /**
284
+ * This property is evaluated to a Boolean value during run time. When this value is
285
+ * `true`, the component with its children chain is rendered; otherwise, the entire
286
+ * component hierarchy is omitted from the rendered tree.
287
+ */
288
+ when?: string | boolean;
289
+ /**
290
+ * Some components work with data obtained asynchronously. Fetching this data requires
291
+ * some state management handling the complexity (including error handling) of data
292
+ * access. A *loader* is responsible for managing this logic. This property holds the
293
+ * loaders associated with this component definition.
294
+ */
295
+ loaders?: ComponentDef[];
296
+ /**
297
+ * Components may have functions that are used to perform some logic. This property
298
+ * holds the functions (name and function body) associated with this component
299
+ * definition.
300
+ */
301
+ functions?: Record<string, any>;
302
+ /**
303
+ * Components managing state through variables or loaders are wrapped with containers
304
+ * responsible for this job. Just as components, containers form a hierarchy. While
305
+ * working with this hierarchy, parent components may flow state values (key and value
306
+ * pairs) to their child containers. This property holds the name of state values to
307
+ * flow down to the direct child containers.
308
+ */
309
+ uses?: string[];
310
+ /**
311
+ * Arbitrary debug information that can be attached to a component definition.
312
+ * Current usage:
313
+ * - `debug: { source: { start: number, end: number } }` The start and end
314
+ * positions of the source belonging to the particular component definition.
315
+ */
316
+ debug?: Record<string, any>;
317
+ }
318
+
319
+ export declare class ComponentDriver {
320
+ protected readonly locator: Locator;
321
+ protected readonly page: Page_2;
322
+ constructor({ locator, page }: ComponentDriverParams);
323
+ get component(): Locator;
324
+ getByTestId(testId: string): Locator;
325
+ getByPartName(part: string): Locator;
326
+ getIcons(): Locator;
327
+ getIconsByName(name: string): Locator;
328
+ getIconByName(name: string): Locator;
329
+ /**
330
+ * Gets the html tag name of the final rendered component
331
+ */
332
+ getComponentTagName(): Promise<string>;
333
+ click: (options?: ClickOption) => Promise<void>;
334
+ dblclick: (options?: {
335
+ timeout?: number;
336
+ }) => Promise<void>;
337
+ focus: (options?: {
338
+ timeout?: number;
339
+ }) => Promise<void>;
340
+ blur: (options?: {
341
+ timeout?: number;
342
+ }) => Promise<void>;
343
+ hover: (options?: {
344
+ timeout?: number;
345
+ }) => Promise<void>;
346
+ }
347
+
348
+ declare type ComponentDriverMethod<T extends ComponentDriver> = (testIdOrLocator?: string | Locator_2) => Promise<T>;
349
+
350
+ declare type ComponentDriverParams = {
351
+ locator: Locator;
352
+ page: Page_2;
353
+ };
354
+
355
+ declare type ComponentLike = ComponentDef | CompoundComponentDef;
356
+
357
+ declare type ComponentMetadata<TProps extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TEvents extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TContextValues extends Record<string, ComponentPropertyMetadata> = Record<string, any>, TApis extends Record<string, ComponentApiMetadata> = Record<string, any>> = {
358
+ status?: "stable" | "experimental" | "deprecated" | "in progress" | "internal";
359
+ description?: string;
360
+ shortDescription?: string;
361
+ props?: TProps;
362
+ events?: TEvents;
363
+ contextVars?: TContextValues;
364
+ apis?: TApis;
365
+ nonVisual?: boolean;
366
+ childrenAsTemplate?: string;
367
+ opaque?: boolean;
368
+ themeVars?: Record<string, string>;
369
+ themeVarDescriptions?: Record<string, string>;
370
+ defaultThemeVars?: DefaultThemeVars;
371
+ toneSpecificThemeVars?: Record<string, Record<string, string>>;
372
+ limitThemeVarsToComponent?: boolean;
373
+ allowArbitraryProps?: boolean;
374
+ specializedFrom?: string;
375
+ docFolder?: string;
376
+ isHtmlTag?: boolean;
377
+ parts?: Record<string, ComponentPartMetadata>;
378
+ defaultPart?: string;
379
+ };
380
+
381
+ declare type ComponentPartMetadata = {
382
+ description: string;
383
+ };
384
+
385
+ declare type ComponentPropertyMetadata = {
386
+ readonly description: string;
387
+ readonly valueType?: PropertyValueType;
388
+ readonly availableValues?: readonly PropertyValueDescription[];
389
+ defaultValue?: any;
390
+ isValid?: IsValidFunction<any>;
391
+ isInternal?: boolean;
392
+ isRequired?: boolean;
393
+ };
394
+
395
+ declare interface CompoundComponentDef extends Scriptable {
396
+ name: string;
397
+ component: ComponentDef;
398
+ api?: Record<string, any>;
399
+ vars?: Record<string, any>;
400
+ namespaces?: Record<string, string>;
401
+ debug?: Record<string, any>;
402
+ codeBehind?: string;
403
+ }
404
+
405
+ declare type CONDITIONAL_EXPRESSION = typeof T_CONDITIONAL_EXPRESSION;
406
+
407
+ declare interface ConditionalExpression extends ExpressionBase {
408
+ type: CONDITIONAL_EXPRESSION;
409
+ cond: Expression;
410
+ thenE: Expression;
411
+ elseE: Expression;
412
+ }
413
+
414
+ declare type CONST_STATEMENT = typeof T_CONST_STATEMENT;
415
+
416
+ declare interface ConstStatement extends ScripNodeBase {
417
+ type: CONST_STATEMENT;
418
+ decls: VarDeclaration[];
419
+ }
420
+
421
+ declare class ContentSeparatorDriver extends ComponentDriver {
422
+ get separator(): Locator;
423
+ getOrientation(): Promise<"unknown" | "vertical" | "horizontal">;
424
+ getComputedHeight(): Promise<string>;
425
+ getComputedWidth(): Promise<string>;
426
+ getBackgroundColor(): Promise<string>;
427
+ }
428
+
429
+ declare type CONTINUE_STATEMENT = typeof T_CONTINUE_STATEMENT;
430
+
431
+ declare interface ContinueStatement extends ScripNodeBase {
432
+ type: CONTINUE_STATEMENT;
433
+ }
434
+
435
+ export declare type CSSBorder = {
436
+ width?: NumericCSS;
437
+ style?: CSSBorderStyle;
438
+ color?: Color;
439
+ };
440
+
441
+ export declare type CSSBorderStyle = (typeof CSSBorderStyleValues)[number];
442
+
443
+ declare const CSSBorderStyleValues: readonly ["solid", "dotted", "dashed", "double", "none", "hidden", "groove", "ridge", "inset", "outset"];
444
+
445
+ export declare type CSSColor = default_2.Color;
446
+
447
+ declare type CSSUnit = (typeof CSSUnitValues)[number];
448
+
449
+ declare const CSSUnitValues: readonly ["px", "em", "rem", "vh", "vw", "%", "cm", "mm", "in", "pt", "pc", "ex", "ch", "vmin", "vmax"];
450
+
451
+ export declare class DateInputDriver extends InputComponentDriver {
452
+ get dayInput(): Locator_2;
453
+ get monthInput(): Locator_2;
454
+ get yearInput(): Locator_2;
455
+ get clearButton(): Locator_2;
456
+ }
457
+
458
+ declare class DatePickerDriver extends ComponentDriver {
459
+ toggleDropdownVisibility(): Promise<void>;
460
+ pickADay(value: string): Promise<void>;
461
+ }
462
+
463
+ declare type DefaultThemeVars = Record<string | ThemeTone, string | Record<string, string>>;
464
+
465
+ declare type DESTRUCTURE = typeof T_DESTRUCTURE;
466
+
467
+ declare interface Destructure extends DestructureBase {
468
+ type: DESTRUCTURE;
469
+ aDestr?: ArrayDestructure[];
470
+ oDestr?: ObjectDestructure[];
471
+ }
472
+
473
+ declare interface DestructureBase extends ExpressionBase {
474
+ id?: string;
475
+ aDestr?: ArrayDestructure[];
476
+ oDestr?: ObjectDestructure[];
477
+ }
478
+
479
+ declare enum DiagnosticCategory {
480
+ Error = 1,
481
+ Warning = 2,
482
+ Information = 3,
483
+ Hint = 4
484
+ }
485
+
486
+ declare type DO_WHILE_STATEMENT = typeof T_DO_WHILE_STATEMENT;
487
+
488
+ declare interface DoWhileStatement extends ScripNodeBase {
489
+ type: DO_WHILE_STATEMENT;
490
+ cond: Expression;
491
+ body: Statement;
492
+ }
493
+
494
+ declare class DropdownMenuDriver extends ComponentDriver {
495
+ /**
496
+ * Get the trigger button element
497
+ * For DropdownMenu, we'll look for the button on the page level since Radix UI may render it separately
498
+ */
499
+ getTrigger(): Locator;
500
+ /**
501
+ * Open the dropdown menu
502
+ */
503
+ open(): Promise<void>;
504
+ /**
505
+ * Close the dropdown menu by clicking outside
506
+ */
507
+ close(): Promise<void>;
508
+ /**
509
+ * Get all menu items
510
+ */
511
+ getMenuItems(): Locator;
512
+ /**
513
+ * Get a specific menu item by text
514
+ */
515
+ getMenuItem(text: string): Locator;
516
+ /**
517
+ * Click a menu item by text
518
+ */
519
+ clickMenuItem(text: string): Promise<void>;
520
+ /**
521
+ * Get submenu items
522
+ */
523
+ getSubMenuItems(parentText: string): Locator;
524
+ /**
525
+ * Open a submenu by hovering over it
526
+ */
527
+ openSubMenu(submenuText: string): Promise<void>;
528
+ /**
529
+ * Get menu separators
530
+ */
531
+ getMenuSeparators(): Locator;
532
+ /**
533
+ * Get the menu content container
534
+ */
535
+ getMenuContent(): Locator;
536
+ /**
537
+ * Check if the menu is open
538
+ */
539
+ isOpen(): Promise<boolean>;
540
+ /**
541
+ * Wait for menu to open
542
+ */
543
+ waitForOpen(): Promise<void>;
544
+ /**
545
+ * Wait for menu to close
546
+ */
547
+ waitForClose(): Promise<void>;
548
+ }
549
+
550
+ declare type EMPTY_STATEMENT = typeof T_EMPTY_STATEMENT;
551
+
552
+ declare interface EmptyStatement extends ScripNodeBase {
553
+ type: EMPTY_STATEMENT;
554
+ }
555
+
556
+ declare type EntryPoint = string | Record<string, any>;
557
+
558
+ declare enum ErrCodes {
559
+ onlyOneElem = "U002",
560
+ expTagOpen = "U003",
561
+ expTagName = "U004",
562
+ expCloseStart = "U005",
563
+ expEndOrClose = "U006",
564
+ tagNameMismatch = "U007",
565
+ expEnd = "U008",
566
+ expAttrName = "U009",
567
+ expEq = "U010",
568
+ expAttrValue = "U011",
569
+ duplAttr = "U012",
570
+ uppercaseAttr = "U013",
571
+ expTagNameAfterNamespace = "U014",
572
+ expCloseStartWithName = "U015",
573
+ expAttrNameAfterNamespace = "U016",
574
+ unexpectedCloseTag = "U017",
575
+ expTagNameAfterCloseStart = "U019",
576
+ expAttrNameBeforeEq = "U020",
577
+ invalidChar = "W001",
578
+ untermStr = "W002",
579
+ untermComment = "W007",
580
+ untermCData = "W008",
581
+ untermScript = "W009"
582
+ }
583
+
584
+ declare interface Error_2 {
585
+ readonly category: DiagnosticCategory;
586
+ readonly code: ErrCodes;
587
+ readonly message: string;
588
+ readonly pos: number;
589
+ readonly end: number;
590
+ readonly contextPos: number;
591
+ readonly contextEnd: number;
592
+ }
593
+
594
+ declare interface ErrorForDisplay extends Error_2 {
595
+ contextStartLine: number;
596
+ contextSource: string;
597
+ errPosLine: number;
598
+ errPosCol: number;
599
+ }
600
+
601
+ declare class ExpandableItemDriver extends ComponentDriver {
602
+ getSummary(): Locator;
603
+ getSummaryContent(): Locator;
604
+ getContent(): Locator;
605
+ getIcon(): Locator;
606
+ getSwitch(): Locator;
607
+ isExpanded(): Promise<boolean>;
608
+ isDisabled(): Promise<any>;
609
+ expand(): Promise<void>;
610
+ collapse(): Promise<void>;
611
+ toggle(): Promise<void>;
612
+ }
613
+
614
+ export declare const expect: Expect< {
615
+ /**
616
+ * Asserts whether the Button component has the expected label either through the `label` property
617
+ * or as a text node child.
618
+ *
619
+ * **Usage**
620
+ *
621
+ * ```js
622
+ * await initTestBed(`<Button label="hello" />`);
623
+ * const driver = await createButtonDriver();
624
+ * await expect(driver.component).toHaveLabel("hello"); // <- resolves to true
625
+ * ```
626
+ *
627
+ * @param expected Expected string label
628
+ */
629
+ toHaveExplicitLabel(this: ExpectMatcherState, locator: Locator_2, expected: string): Promise<{
630
+ message: () => string;
631
+ pass: boolean;
632
+ name: string;
633
+ expected: string;
634
+ actual: any;
635
+ }>;
636
+ /**
637
+ * Compares two numbers with an optional tolerance value. If the tolerance is set to 0 the comparator acts as `toEqual`.
638
+ * Used to compare element dimensions on different platforms because of half pixel rendering.
639
+ *
640
+ * **Usage**
641
+ *
642
+ * ```js
643
+ * const value = 8;
644
+ * expect(value).toEqualWithTolerance(10, 2); // true
645
+ * ```
646
+ *
647
+ * @param expected Expected value
648
+ * @param tolerance Tolerance value, **default is 1**
649
+ */
650
+ toEqualWithTolerance(this: ExpectMatcherState, provided: number, expected: number, tolerance?: number): {
651
+ message: () => string;
652
+ pass: boolean;
653
+ name: string;
654
+ expected: number;
655
+ actual: any;
656
+ };
657
+ /**
658
+ * Asserts whether a component has the correct CSS `border-color` styling.
659
+ *
660
+ * @param expected Expected CSS color
661
+ * @param border Border side(s), Default: **"all"**
662
+ *
663
+ * ---
664
+ * **Usage**
665
+ *
666
+ * ```js
667
+ * await initTestBed(`<Button label="hello" />`, {
668
+ * testThemeVars: { "borderLeftColor-Button": "rgb(0, 0, 0)" },
669
+ * });
670
+ * const driver = await createButtonDriver();
671
+ * await expect(driver.component).toHaveBorderColor("rgb(0, 0, 0)", "left");
672
+ * ```
673
+ */
674
+ toHaveBorderColor(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
675
+ message: () => string;
676
+ pass: boolean;
677
+ name: string;
678
+ expected: string;
679
+ actual: any;
680
+ }>;
681
+ /**
682
+ * Asserts whether a component has the correct CSS `border-width` styling.
683
+ *
684
+ * @param expected Expected CSS size
685
+ * @param border Border side(s), Default: **"all"**
686
+ *
687
+ * ---
688
+ * **Usage**
689
+ *
690
+ * ```js
691
+ * await initTestBed(`<Button label="hello" />`, {
692
+ * testThemeVars: { "borderLeftWidth-Button": "12px" },
693
+ * });
694
+ * const driver = await createButtonDriver();
695
+ * await expect(driver.component).toHaveBorderWidth("12px", "left");
696
+ * ```
697
+ */
698
+ toHaveBorderWidth(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
699
+ message: () => string;
700
+ pass: boolean;
701
+ name: string;
702
+ expected: string;
703
+ actual: any;
704
+ }>;
705
+ /**
706
+ * Asserts whether a component has the correct CSS `border-style` styling.
707
+ *
708
+ * @param expected Expected CSS border style
709
+ * @param border Border side(s), default: **"all"**
710
+ *
711
+ * ---
712
+ * **Usage**
713
+ *
714
+ * ```js
715
+ * await initTestBed(`<Button label="hello" />`, {
716
+ * testThemeVars: { "borderLeftStyle-Button": "dotted" },
717
+ * });
718
+ * const driver = await createButtonDriver();
719
+ * await expect(driver.component).toHaveBorderStyle("dotted", "left");
720
+ * ```
721
+ */
722
+ toHaveBorderStyle(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
723
+ message: () => string;
724
+ pass: boolean;
725
+ name: string;
726
+ expected: string;
727
+ actual: any;
728
+ }>;
729
+ /**
730
+ * Asserts whether a component has the correct CSS `border` shorthand set:
731
+ * `color`, `width`, `style`.
732
+ *
733
+ * @param expected Expected string label
734
+ * @param border Border side(s), Default: **"all"**
735
+ *
736
+ * ---
737
+ * **Usage**
738
+ *
739
+ * ```js
740
+ * await initTestBed(`<Button label="hello" />`, {
741
+ * testThemeVars: { "borderLeft-Button": "1px solid black" },
742
+ * });
743
+ * const driver = await createButtonDriver();
744
+ * await expect(driver.component).toHaveBorder("1px solid black", "left");
745
+ * ```
746
+ */
747
+ toHaveBorder(this: ExpectMatcherState, locator: Locator_2, expected: string, border?: "all" | BorderSide | BorderSide[]): Promise<{
748
+ message: () => string;
749
+ pass: boolean;
750
+ name: string;
751
+ expected: string;
752
+ actual: any;
753
+ }>;
754
+ }>;
755
+
756
+ declare type Expression = UnaryExpression | BinaryExpression | SequenceExpression | ConditionalExpression | FunctionInvocationExpression | MemberAccessExpression | CalculatedMemberAccessExpression | Identifier | TemplateLiteralExpression | Literal | ArrayLiteral | ObjectLiteral | SpreadExpression | AssignmentExpression | NoArgExpression | ArrowExpression | PrefixOpExpression | PostfixOpExpression | ReactiveVarDeclaration | VarDeclaration | Destructure | ObjectDestructure | ArrayDestructure | SwitchCase;
757
+
758
+ declare type EXPRESSION_STATEMENT = typeof T_EXPRESSION_STATEMENT;
759
+
760
+ declare interface ExpressionBase extends ScripNodeBase {
761
+ parenthesized?: number;
762
+ }
763
+
764
+ declare interface ExpressionStatement extends ScripNodeBase {
765
+ type: EXPRESSION_STATEMENT;
766
+ expr: Expression;
767
+ }
768
+
769
+ declare class FileInputDriver extends ComponentDriver {
770
+ getTextBox(): Locator;
771
+ getHiddenInput(): Locator;
772
+ getBrowseButton(): Locator;
773
+ getContainer(): Locator;
774
+ isEnabled(): Promise<boolean>;
775
+ getSelectedFiles(): Promise<string>;
776
+ openFileDialog(): Promise<void>;
777
+ getPlaceholder(): Promise<string>;
778
+ focusButton(): Promise<void>;
779
+ hasReadOnlyAttribute(): Promise<boolean>;
780
+ getAcceptedFileTypes(): Promise<string>;
781
+ isMultiple(): Promise<boolean>;
782
+ isDirectory(): Promise<boolean>;
783
+ }
784
+
785
+ declare class FileUploadDropZoneDriver extends ComponentDriver {
786
+ getWrapper(): Locator;
787
+ getHiddenInput(): Locator;
788
+ getDropPlaceholder(): Locator;
789
+ getDropIcon(): Locator;
790
+ isDropPlaceholderVisible(): Promise<boolean>;
791
+ isEnabled(): Promise<boolean>;
792
+ getDropText(): Promise<string>;
793
+ triggerDragEnter(): Promise<void>;
794
+ triggerDragLeave(): Promise<void>;
795
+ triggerDrop(files?: string[]): Promise<void>;
796
+ triggerPaste(): Promise<void>;
797
+ hasChildren(): Promise<boolean>;
798
+ }
799
+
800
+ declare type FontDef = {
801
+ fontFamily: string;
802
+ fontStyle?: string;
803
+ fontWeight?: string;
804
+ fontDisplay?: string;
805
+ format?: string;
806
+ src: string;
807
+ } | string;
808
+
809
+ declare type FOR_IN_STATEMENT = typeof T_FOR_IN_STATEMENT;
810
+
811
+ declare type FOR_OF_STATEMENT = typeof T_FOR_OF_STATEMENT;
812
+
813
+ declare type FOR_STATEMENT = typeof T_FOR_STATEMENT;
814
+
815
+ declare interface ForInStatement extends ScripNodeBase {
816
+ type: FOR_IN_STATEMENT;
817
+ varB: ForVarBinding;
818
+ id: Identifier;
819
+ expr: Expression;
820
+ body: Statement;
821
+ }
822
+
823
+ declare class FormDriver extends ComponentDriver {
824
+ mockExternalApi(url: string, apiOptions: MockExternalApiOptions): Promise<void>;
825
+ get submitButton(): Locator;
826
+ get cancelButton(): Locator;
827
+ hasSubmitButton(): Promise<boolean>;
828
+ submitForm(trigger?: SubmitTrigger): Promise<void>;
829
+ getSubmitRequest(endpoint?: string, requestMethod?: string, trigger?: SubmitTrigger, timeout?: number): Promise<Request_2>;
830
+ getSubmitResponse(endpoint?: string, responseStatus?: number, timeout?: number): Promise<Response_2>;
831
+ /**
832
+ * Gets the validation summary component inside the Form.
833
+ * Uses the 'data-validation-summary' attribute to find the component
834
+ */
835
+ getValidationSummary(): Locator;
836
+ /**
837
+ * Gets the validation display components inside the Form.
838
+ * Uses the 'data-validation-display-severity' attribute to find the components.
839
+ * The attribute contains the severity of the validation.
840
+ */
841
+ getValidationDisplays(): Locator;
842
+ getValidationDisplaysBySeverity(severity: string): Locator;
843
+ }
844
+
845
+ declare class FormItemDriver extends ComponentDriver {
846
+ get input(): Locator;
847
+ get textBox(): Locator;
848
+ get checkbox(): Locator;
849
+ get label(): Locator;
850
+ get validationStatusTag(): string;
851
+ get validationStatusIndicator(): Locator;
852
+ }
853
+
854
+ declare interface ForOfStatement extends ScripNodeBase {
855
+ type: FOR_OF_STATEMENT;
856
+ varB: ForVarBinding;
857
+ id: Identifier;
858
+ expr: Expression;
859
+ body: Statement;
860
+ }
861
+
862
+ declare interface ForStatement extends ScripNodeBase {
863
+ type: FOR_STATEMENT;
864
+ init?: ExpressionStatement | LetStatement;
865
+ cond?: Expression;
866
+ upd?: Expression;
867
+ body: Statement;
868
+ }
869
+
870
+ declare type ForVarBinding = "let" | "const" | "none";
871
+
872
+ declare type FUNCTION_DECLARATION = typeof T_FUNCTION_DECLARATION;
873
+
874
+ declare type FUNCTION_INVOCATION_EXPRESSION = typeof T_FUNCTION_INVOCATION_EXPRESSION;
875
+
876
+ declare interface FunctionDeclaration extends ScripNodeBase {
877
+ type: FUNCTION_DECLARATION;
878
+ id: Identifier;
879
+ args: Expression[];
880
+ stmt: BlockStatement;
881
+ }
882
+
883
+ declare interface FunctionInvocationExpression extends ExpressionBase {
884
+ type: FUNCTION_INVOCATION_EXPRESSION;
885
+ obj: Expression;
886
+ arguments: Expression[];
887
+ }
888
+
889
+ declare type GenericToken<T> = {
890
+ text: string;
891
+ type: T;
892
+ startPosition: number;
893
+ endPosition: number;
894
+ startLine: number;
895
+ endLine: number;
896
+ startColumn: number;
897
+ endColumn: number;
898
+ };
899
+
900
+ export declare function getBorders(specifier: ComponentDriver | Locator): Promise<{
901
+ left: CSSBorder;
902
+ right: CSSBorder;
903
+ top: CSSBorder;
904
+ bottom: CSSBorder;
905
+ }>;
906
+
907
+ export declare function getBoundingRect(locator: Locator): Promise<DOMRect>;
908
+
909
+ /**
910
+ * Retrieves the bounding rectangle of the component including **margins** and **padding**
911
+ * added to the dimensions.
912
+ */
913
+ export declare function getBounds(specifier: ComponentDriver | Locator): Promise<{
914
+ width: number;
915
+ height: number;
916
+ left: number;
917
+ right: number;
918
+ top: number;
919
+ bottom: number;
920
+ }>;
921
+
922
+ export declare function getComponentTagName(locator: Locator): Promise<string>;
923
+
924
+ export declare function getElementStyle(specifier: Locator, style: string): Promise<string>;
925
+
926
+ /**
927
+ * Retreives all the provided style properties from the locator
928
+ * @returns an object with the keys being the elements of the styles argument
929
+ */
930
+ export declare function getElementStyles(locator: Locator, styles?: string[]): Promise<{
931
+ [k: string]: string;
932
+ }>;
933
+
934
+ export declare function getFullRectangle(locator: Locator): Promise<{
935
+ width: number;
936
+ height: number;
937
+ left: number;
938
+ right: number;
939
+ top: number;
940
+ bottom: number;
941
+ }>;
942
+
943
+ export declare function getHtmlAttributes(specifier: ComponentDriver | Locator, attributes: string | string[]): Promise<{
944
+ [k: string]: string;
945
+ }>;
946
+
947
+ export declare function getMargins(specifier: ComponentDriver | Locator): Promise<{
948
+ [k: string]: string;
949
+ }>;
950
+
951
+ export declare function getPaddings(specifier: ComponentDriver | Locator): Promise<{
952
+ left: NumericCSS;
953
+ right: NumericCSS;
954
+ top: NumericCSS;
955
+ bottom: NumericCSS;
956
+ }>;
957
+
958
+ export declare function getPseudoStyles(specifier: ComponentDriver | Locator, pseudoElement: string, style: string | string[]): Promise<{
959
+ [k: string]: string;
960
+ }>;
961
+
962
+ export declare function getStyles(specifier: ComponentDriver | Locator, style: string | string[]): Promise<{
963
+ [k: string]: string;
964
+ }>;
965
+
966
+ export declare function getThemedBoundingRect(locator: Locator): Promise<DOMRect>;
967
+
968
+ export declare function getThemedElementStyle(locator: Locator, style: string): Promise<string>;
969
+
970
+ /**
971
+ * Retreives all the provided style properties from the locator
972
+ * @returns an object with the keys being the elements of the styles argument
973
+ */
974
+ export declare function getThemedElementStyles(locator: Locator, styles?: string[]): Promise<{
975
+ [k: string]: string;
976
+ }>;
977
+
978
+ export declare function getThemedStyle(page: Page_2, testId: string, style: string): Promise<string>;
979
+
980
+ declare class HeadingDriver extends ComponentDriver {
981
+ }
982
+
983
+ declare class HStackDriver extends StackDriver {
984
+ }
985
+
986
+ declare class HtmlTagDriver extends ComponentDriver {
987
+ }
988
+
989
+ declare class IconDriver extends ComponentDriver {
990
+ get svgIcon(): Locator;
991
+ }
992
+
993
+ declare type IDENTIFIER = typeof T_IDENTIFIER;
994
+
995
+ declare interface Identifier extends ExpressionBase {
996
+ type: IDENTIFIER;
997
+ name: string;
998
+ isGlobal?: boolean;
999
+ }
1000
+
1001
+ declare type IF_STATEMENT = typeof T_IF_STATEMENT;
1002
+
1003
+ declare interface IfStatement extends ScripNodeBase {
1004
+ type: IF_STATEMENT;
1005
+ cond: Expression;
1006
+ thenB: Statement;
1007
+ elseB?: Statement;
1008
+ }
1009
+
1010
+ export declare function initApp(page: Page_2, appDescription: UnparsedAppDescription, url?: string, resources?: {}): Promise<void>;
1011
+
1012
+ export declare function initThemedApp(page: Page_2, entryPoint: EntryPoint, theme: Partial<ThemeDefinition>): Promise<void>;
1013
+
1014
+ declare class InputComponentDriver extends ComponentDriver {
1015
+ get field(): Locator;
1016
+ get label(): Locator;
1017
+ get placeholder(): Promise<string>;
1018
+ get requiredIndicator(): Locator;
1019
+ }
1020
+
1021
+ declare type InterceptorOperationDef = {
1022
+ method: "get" | "post" | "put" | "delete" | "patch" | "head" | "options";
1023
+ url: string | Array<string>;
1024
+ handler: string;
1025
+ requestShape?: any;
1026
+ responseShape?: any;
1027
+ pathParamTypes?: Record<string, string>;
1028
+ queryParamTypes?: Record<string, string>;
1029
+ successStatusCode?: number;
1030
+ };
1031
+
1032
+ export declare function isIndeterminate(specifier: ComponentDriver | Locator): Promise<boolean>;
1033
+
1034
+ declare type IsValidFunction<T> = (propKey: string, propValue: T) => string | string[] | undefined | null;
1035
+
1036
+ declare class ItemsDriver extends ComponentDriver {
1037
+ }
1038
+
1039
+ declare class LabelDriver extends ComponentDriver {
1040
+ }
1041
+
1042
+ declare type LET_STATEMENT = typeof T_LET_STATEMENT;
1043
+
1044
+ declare interface LetStatement extends ScripNodeBase {
1045
+ type: LET_STATEMENT;
1046
+ decls: VarDeclaration[];
1047
+ }
1048
+
1049
+ declare class LinkDriver extends ComponentDriver {
1050
+ }
1051
+
1052
+ declare class ListDriver extends ComponentDriver {
1053
+ /**
1054
+ * Gets all list item elements
1055
+ */
1056
+ get items(): Locator;
1057
+ /**
1058
+ * Gets the loading spinner element
1059
+ */
1060
+ get loadingSpinner(): Locator;
1061
+ /**
1062
+ * Checks if the loading state is visible
1063
+ */
1064
+ isLoading(): Promise<boolean>;
1065
+ /**
1066
+ * Gets group header elements
1067
+ */
1068
+ get groupHeaders(): Locator;
1069
+ /**
1070
+ * Gets group footer elements
1071
+ */
1072
+ get groupFooters(): Locator;
1073
+ /**
1074
+ * Gets the empty state element
1075
+ */
1076
+ get emptyState(): Locator;
1077
+ /**
1078
+ * Scrolls the list to a specific position
1079
+ */
1080
+ scrollTo(position: "top" | "bottom" | number): Promise<void>;
1081
+ /**
1082
+ * Gets the number of visible items (for virtualization testing)
1083
+ */
1084
+ getVisibleItemCount(): Promise<number>;
1085
+ /**
1086
+ * Gets item at specific index
1087
+ */
1088
+ getItemAt(index: number): Locator;
1089
+ /**
1090
+ * Gets item by text content
1091
+ */
1092
+ getItemByText(text: string): Locator;
1093
+ /**
1094
+ * Checks if list is empty
1095
+ */
1096
+ isEmpty(): Promise<boolean>;
1097
+ /**
1098
+ * Gets all text content from visible items
1099
+ */
1100
+ getVisibleItemTexts(): Promise<string[]>;
1101
+ }
1102
+
1103
+ declare type LITERAL = typeof T_LITERAL;
1104
+
1105
+ declare interface Literal extends ExpressionBase {
1106
+ type: LITERAL;
1107
+ value: any;
1108
+ }
1109
+
1110
+ export declare function mapObject<K extends (val: any) => any, V extends (val: string) => string | number>(obj: Record<string, any>, valFn?: K, keyFn?: V): Record<ReturnType<V>, ReturnType<K>>;
1111
+
1112
+ declare class MarkdownDriver extends ComponentDriver {
1113
+ hasHtmlElement(elements: string | string[]): Promise<boolean>;
1114
+ }
1115
+
1116
+ declare type MEMBER_ACCESS_EXPRESSION = typeof T_MEMBER_ACCESS_EXPRESSION;
1117
+
1118
+ declare interface MemberAccessExpression extends ExpressionBase {
1119
+ type: MEMBER_ACCESS_EXPRESSION;
1120
+ obj: Expression;
1121
+ member: string;
1122
+ opt?: boolean;
1123
+ }
1124
+
1125
+ declare type MockExternalApiOptions = {
1126
+ status?: number;
1127
+ headers?: Record<string, string>;
1128
+ body?: Record<string, any>;
1129
+ };
1130
+
1131
+ declare class ModalDialogDriver extends ComponentDriver {
1132
+ get titlePart(): Locator_2;
1133
+ }
1134
+
1135
+ /**
1136
+ * Represents a module error
1137
+ */
1138
+ declare type ModuleErrors = Record<string, ScriptParserErrorMessage[]>;
1139
+
1140
+ declare class NavGroupDriver extends ComponentDriver {
1141
+ getIcons(): Locator;
1142
+ }
1143
+
1144
+ declare class NavLinkDriver extends ComponentDriver {
1145
+ }
1146
+
1147
+ declare class NavPanelDriver extends ComponentDriver {
1148
+ }
1149
+
1150
+ declare type NO_ARG_EXPRESSION = typeof T_NO_ARG_EXPRESSION;
1151
+
1152
+ declare interface NoArgExpression extends ExpressionBase {
1153
+ type: NO_ARG_EXPRESSION;
1154
+ }
1155
+
1156
+ declare class NoResultDriver extends ComponentDriver {
1157
+ }
1158
+
1159
+ declare class NumberBoxDriver extends InputComponentDriver {
1160
+ get input(): Locator_2;
1161
+ get startAdornment(): Locator_2;
1162
+ get endAdornment(): Locator_2;
1163
+ get spinnerUp(): Locator_2;
1164
+ get spinnerDown(): Locator_2;
1165
+ increment(): Promise<void>;
1166
+ decrement(): Promise<void>;
1167
+ }
1168
+
1169
+ export declare interface NumericCSS {
1170
+ value: number;
1171
+ unit: CSSUnit;
1172
+ }
1173
+
1174
+ export declare function numericCSSToString(cssValue: NumericCSS): string;
1175
+
1176
+ declare type OBJECT_DESTRUCTURE = typeof T_OBJECT_DESTRUCTURE;
1177
+
1178
+ declare type OBJECT_LITERAL = typeof T_OBJECT_LITERAL;
1179
+
1180
+ declare interface ObjectDestructure extends DestructureBase {
1181
+ type: OBJECT_DESTRUCTURE;
1182
+ id: string;
1183
+ alias?: string;
1184
+ }
1185
+
1186
+ declare interface ObjectLiteral extends ExpressionBase {
1187
+ type: OBJECT_LITERAL;
1188
+ props: (SpreadExpression | [Expression, Expression])[];
1189
+ }
1190
+
1191
+ declare class OptionDriver extends ComponentDriver {
1192
+ }
1193
+
1194
+ export declare function overflows(locator: Locator, direction?: "x" | "y" | "both"): Promise<boolean>;
1195
+
1196
+ export declare function parseAsCssBorder(str: string): CSSBorder;
1197
+
1198
+ export declare function parseAsCSSBorderStyle(str: string): "none" | "double" | "hidden" | "dotted" | "dashed" | "solid" | "groove" | "ridge" | "inset" | "outset";
1199
+
1200
+ export declare function parseAsCSSColor(str: string): CSSColor;
1201
+
1202
+ export declare function parseAsNumericCss(str: string): NumericCSS;
1203
+
1204
+ export declare function parseComponentIfNecessary(rawComponent: ComponentDef<any> | CompoundComponentDef | string): ParserResult;
1205
+
1206
+ declare type ParserResult = {
1207
+ component: null | ComponentDef | CompoundComponentDef;
1208
+ errors: ErrorForDisplay[];
1209
+ erroneousCompoundComponentName?: string;
1210
+ };
1211
+
1212
+ export declare function pixelStrToNum(pixelStr: string): number;
1213
+
1214
+ declare type POSTFIX_OP_EXPRESSION = typeof T_POSTFIX_OP_EXPRESSION;
1215
+
1216
+ declare interface PostfixOpExpression extends ExpressionBase {
1217
+ type: POSTFIX_OP_EXPRESSION;
1218
+ op: PrefixOpSymbol;
1219
+ expr: Expression;
1220
+ }
1221
+
1222
+ declare type PREFIX_OP_EXPRESSION = typeof T_PREFIX_OP_EXPRESSION;
1223
+
1224
+ declare interface PrefixOpExpression extends ExpressionBase {
1225
+ type: PREFIX_OP_EXPRESSION;
1226
+ op: PrefixOpSymbol;
1227
+ expr: Expression;
1228
+ }
1229
+
1230
+ declare type PrefixOpSymbol = "++" | "--";
1231
+
1232
+ export declare function prepPage(co: BrowserContext, appDesc: StandaloneAppDescription, url?: string): Promise<Page_2>;
1233
+
1234
+ declare class ProgressBarDriver extends ComponentDriver {
1235
+ get bar(): Locator;
1236
+ getProgressRatio(): Promise<number>;
1237
+ }
1238
+
1239
+ declare type PropertyValueDescription<T = string | number> = T | {
1240
+ value: T;
1241
+ description: string;
1242
+ };
1243
+
1244
+ declare type PropertyValueType = "boolean" | "string" | "number" | "any" | "ComponentDef";
1245
+
1246
+ declare class RadioGroupDriver extends ComponentDriver {
1247
+ }
1248
+
1249
+ declare class RangeDriver extends ComponentDriver {
1250
+ }
1251
+
1252
+ declare type REACTIVE_VAR_DECLARATION = typeof T_REACTIVE_VAR_DECLARATION;
1253
+
1254
+ declare interface ReactiveVarDeclaration extends ExpressionBase {
1255
+ type: REACTIVE_VAR_DECLARATION;
1256
+ id: Identifier;
1257
+ expr: Expression;
1258
+ }
1259
+
1260
+ declare type RETURN_STATEMENT = typeof T_RETURN_STATEMENT;
1261
+
1262
+ declare interface ReturnStatement extends ScripNodeBase {
1263
+ type: RETURN_STATEMENT;
1264
+ expr?: Expression;
1265
+ }
1266
+
1267
+ /**
1268
+ * Scales a value by a percentage, using NumericCSS for parsing and clarity.
1269
+ * @param scalarOf100Percent The value representing 100%.
1270
+ * @param percentage A percentage string in the format "NN%", e.g., "40%". Must end with '%'.
1271
+ * @returns The scaled value.
1272
+ */
1273
+ export declare function scaleByPercent(scalarOf100Percent: number, percentage: string): number;
1274
+
1275
+ /**
1276
+ * @param percentage a percenage value as a string, like "40%"
1277
+ * @param scalarOf100Percent The value to multiply the percentage by
1278
+ */
1279
+ export declare function scalePercentBy(scalarOf100Percent: number, percentage: string): number;
1280
+
1281
+ declare type SchemaDescriptor = {
1282
+ tables: Array<TableDescriptor>;
1283
+ relationships?: any;
1284
+ dtos?: any;
1285
+ };
1286
+
1287
+ declare interface ScripNodeBase {
1288
+ type: ScriptNode["type"];
1289
+ nodeId: number;
1290
+ startToken?: ScriptingToken;
1291
+ endToken?: ScriptingToken;
1292
+ }
1293
+
1294
+ declare interface Scriptable {
1295
+ script?: string;
1296
+ scriptCollected?: CollectedDeclarations;
1297
+ scriptError?: any;
1298
+ }
1299
+
1300
+ declare type ScriptingToken = GenericToken<TokenType>;
1301
+
1302
+ declare type ScriptNode = Statement | Expression;
1303
+
1304
+ declare interface ScriptParserErrorMessage {
1305
+ code: ScriptParsingErrorCodes;
1306
+ text: string;
1307
+ position?: number;
1308
+ line?: number;
1309
+ column?: number;
1310
+ }
1311
+
1312
+ declare type ScriptParsingErrorCodes = "W001" | "W002" | "W003" | "W004" | "W005" | "W006" | "W007" | "W008" | "W009" | "W010" | "W011" | "W012" | "W013" | "W014" | "W015" | "W016" | "W017" | "W018" | "W019" | "W020" | "W021" | "W022" | "W023" | "W024" | "W025" | "W026" | "W027" | "W028" | "W029" | "W030" | "W031";
1313
+
1314
+ declare class SelectDriver extends ComponentDriver {
1315
+ toggleOptionsVisibility(): Promise<void>;
1316
+ selectLabel(value: string): Promise<void>;
1317
+ selectFirstLabelPostSearh(label: string): Promise<void>;
1318
+ searchFor(value: string): Promise<void>;
1319
+ chooseIndex(index: number): Promise<void>;
1320
+ selectMultipleLabels(values: string[]): Promise<void>;
1321
+ }
1322
+
1323
+ declare type SEQUENCE_EXPRESSION = typeof T_SEQUENCE_EXPRESSION;
1324
+
1325
+ declare interface SequenceExpression extends ExpressionBase {
1326
+ type: SEQUENCE_EXPRESSION;
1327
+ exprs: Expression[];
1328
+ loose?: boolean;
1329
+ }
1330
+
1331
+ /**
1332
+ * Provides annotations for skipped tests and the ability to specify a reason.
1333
+ *
1334
+ * Usage:
1335
+ *
1336
+ * ```ts
1337
+ * import { SKIP_REASON } from "./tests/component-test-helpers";
1338
+ *
1339
+ * test.skip(
1340
+ * "test name",
1341
+ * SKIP_REASON.NOT_IMPLEMENTED_XMLUI("This test is not implemented in xmlui")
1342
+ * async ({}) => {},
1343
+ * );
1344
+ * ```
1345
+ */
1346
+ export declare const SKIP_REASON: TestSkipReason;
1347
+
1348
+ declare class SliderDriver extends ComponentDriver {
1349
+ private getActiveThumb;
1350
+ dragThumbByMouse(location: "start" | "end" | "middle", thumbNumber?: number): Promise<void>;
1351
+ stepThumbByKeyboard(key: "ArrowLeft" | "ArrowRight" | "Home" | "End", thumbNumber?: number, repeat?: number): Promise<void>;
1352
+ }
1353
+
1354
+ declare class SpinnerDriver extends ComponentDriver {
1355
+ /**
1356
+ * Gets the main spinner element (the one with the ring animation)
1357
+ */
1358
+ get spinnerElement(): Locator;
1359
+ /**
1360
+ * Gets a specific spinner element by index (for multiple spinners)
1361
+ */
1362
+ getSpinnerByIndex(index: number): Locator;
1363
+ /**
1364
+ * Gets the fullscreen wrapper element (only exists when fullScreen=true)
1365
+ */
1366
+ get fullScreenWrapper(): Locator;
1367
+ /**
1368
+ * Checks if the spinner is in fullscreen mode
1369
+ */
1370
+ isFullScreen(): Promise<boolean>;
1371
+ /**
1372
+ * Gets the computed style of the spinner element
1373
+ */
1374
+ getSpinnerStyle(): Promise<{
1375
+ display: string;
1376
+ position: string;
1377
+ width: string;
1378
+ height: string;
1379
+ animationDuration: string;
1380
+ className: string;
1381
+ }>;
1382
+ /**
1383
+ * Gets the animation duration from the child elements (where the actual animation occurs)
1384
+ */
1385
+ getAnimationDuration(): Promise<string>;
1386
+ /**
1387
+ * Waits for the spinner to appear
1388
+ */
1389
+ waitForSpinner(timeout?: number): Promise<void>;
1390
+ /**
1391
+ * Waits for the spinner to disappear
1392
+ */
1393
+ waitForSpinnerToDisappear(timeout?: number): Promise<void>;
1394
+ /**
1395
+ * Checks if the spinner is visible
1396
+ */
1397
+ isVisible(): Promise<boolean>;
1398
+ /**
1399
+ * Gets the CSS class name to verify CSS modules are working
1400
+ */
1401
+ getClassName(): Promise<string>;
1402
+ /**
1403
+ * Gets the number of child div elements (should be 4 for the ring animation)
1404
+ */
1405
+ getChildCount(): Promise<number>;
1406
+ /**
1407
+ * Gets the total number of spinner components on the page
1408
+ */
1409
+ getSpinnerCount(): Promise<number>;
1410
+ /**
1411
+ * Gets a spinner by specific test ID
1412
+ */
1413
+ getSpinnerByTestId(testId: string): Locator;
1414
+ /**
1415
+ * Checks if fullscreen mode has the correct wrapper structure
1416
+ */
1417
+ getFullScreenWrapperInfo(): Promise<{
1418
+ position: string;
1419
+ inset: string;
1420
+ parentClassName: string;
1421
+ hasSpinnerChild: boolean;
1422
+ }>;
1423
+ }
1424
+
1425
+ declare class SplitterDriver extends ComponentDriver {
1426
+ /**
1427
+ * Gets the resizer element (non-floating)
1428
+ */
1429
+ getResizer(): Promise<Locator>;
1430
+ /**
1431
+ * Gets the floating resizer element
1432
+ */
1433
+ getFloatingResizer(): Promise<Locator>;
1434
+ /**
1435
+ * Hovers near the resizer area to trigger floating resizer visibility
1436
+ */
1437
+ hoverNearResizer(): Promise<void>;
1438
+ /**
1439
+ * Drags the resizer by the specified offset
1440
+ * @param deltaX - Horizontal offset in pixels
1441
+ * @param deltaY - Vertical offset in pixels
1442
+ */
1443
+ dragResizer(deltaX: number, deltaY: number): Promise<void>;
1444
+ /**
1445
+ * Gets the primary panel element
1446
+ */
1447
+ getPrimaryPanel(): Locator;
1448
+ /**
1449
+ * Gets the secondary panel element
1450
+ */
1451
+ getSecondaryPanel(): Locator;
1452
+ }
1453
+
1454
+ declare type SPREAD_EXPRESSION = typeof T_SPREAD_EXPRESSION;
1455
+
1456
+ declare interface SpreadExpression extends ExpressionBase {
1457
+ type: SPREAD_EXPRESSION;
1458
+ expr: Expression;
1459
+ }
1460
+
1461
+ declare class StackDriver extends ComponentDriver {
1462
+ }
1463
+
1464
+ declare type StandaloneAppDescription = {
1465
+ name?: string;
1466
+ version?: string;
1467
+ entryPoint?: ComponentLike;
1468
+ components?: CompoundComponentDef[];
1469
+ themes?: ThemeDefinition[];
1470
+ defaultTheme?: string;
1471
+ defaultTone?: string;
1472
+ resources?: Record<string, string>;
1473
+ resourceMap?: Record<string, string>;
1474
+ appGlobals?: Record<string, any>;
1475
+ apiInterceptor?: ApiInterceptorDefinition;
1476
+ sources?: Record<string, string>;
1477
+ };
1478
+
1479
+ declare type Statement = BlockStatement | EmptyStatement | ExpressionStatement | ArrowExpressionStatement | LetStatement | ConstStatement | VarStatement | IfStatement | ReturnStatement | BreakStatement | ContinueStatement | WhileStatement | DoWhileStatement | ForStatement | ForInStatement | ForOfStatement | ThrowStatement | TryStatement | SwitchStatement | FunctionDeclaration;
1480
+
1481
+ declare type SubmitTrigger = "click" | "keypress";
1482
+
1483
+ declare type SWITCH_CASE = typeof T_SWITCH_CASE;
1484
+
1485
+ declare type SWITCH_STATEMENT = typeof T_SWITCH_STATEMENT;
1486
+
1487
+ declare interface SwitchCase extends ExpressionBase {
1488
+ type: SWITCH_CASE;
1489
+ caseE?: Expression;
1490
+ stmts?: Statement[];
1491
+ }
1492
+
1493
+ declare interface SwitchStatement extends ScripNodeBase {
1494
+ type: SWITCH_STATEMENT;
1495
+ expr: Expression;
1496
+ cases: SwitchCase[];
1497
+ }
1498
+
1499
+ declare const T_ARRAY_DESTRUCTURE: number;
1500
+
1501
+ declare const T_ARRAY_LITERAL: number;
1502
+
1503
+ declare const T_ARROW_EXPRESSION: number;
1504
+
1505
+ declare const T_ARROW_EXPRESSION_STATEMENT: number;
1506
+
1507
+ declare const T_ASSIGNMENT_EXPRESSION: number;
1508
+
1509
+ declare const T_BINARY_EXPRESSION: number;
1510
+
1511
+ declare const T_BLOCK_STATEMENT: number;
1512
+
1513
+ declare const T_BREAK_STATEMENT: number;
1514
+
1515
+ declare const T_CALCULATED_MEMBER_ACCESS_EXPRESSION: number;
1516
+
1517
+ declare const T_CONDITIONAL_EXPRESSION: number;
1518
+
1519
+ declare const T_CONST_STATEMENT: number;
1520
+
1521
+ declare const T_CONTINUE_STATEMENT: number;
1522
+
1523
+ declare const T_DESTRUCTURE: number;
1524
+
1525
+ declare const T_DO_WHILE_STATEMENT: number;
1526
+
1527
+ declare const T_EMPTY_STATEMENT: number;
1528
+
1529
+ declare const T_EXPRESSION_STATEMENT: number;
1530
+
1531
+ declare const T_FOR_IN_STATEMENT: number;
1532
+
1533
+ declare const T_FOR_OF_STATEMENT: number;
1534
+
1535
+ declare const T_FOR_STATEMENT: number;
1536
+
1537
+ declare const T_FUNCTION_DECLARATION: number;
1538
+
1539
+ declare const T_FUNCTION_INVOCATION_EXPRESSION: number;
1540
+
1541
+ declare const T_IDENTIFIER: number;
1542
+
1543
+ declare const T_IF_STATEMENT: number;
1544
+
1545
+ declare const T_LET_STATEMENT: number;
1546
+
1547
+ declare const T_LITERAL: number;
1548
+
1549
+ declare const T_MEMBER_ACCESS_EXPRESSION: number;
1550
+
1551
+ declare const T_NO_ARG_EXPRESSION: number;
1552
+
1553
+ declare const T_OBJECT_DESTRUCTURE: number;
1554
+
1555
+ declare const T_OBJECT_LITERAL: number;
1556
+
1557
+ declare const T_POSTFIX_OP_EXPRESSION: number;
1558
+
1559
+ declare const T_PREFIX_OP_EXPRESSION: number;
1560
+
1561
+ declare const T_REACTIVE_VAR_DECLARATION: number;
1562
+
1563
+ declare const T_RETURN_STATEMENT: number;
1564
+
1565
+ declare const T_SEQUENCE_EXPRESSION: number;
1566
+
1567
+ declare const T_SPREAD_EXPRESSION: number;
1568
+
1569
+ declare const T_SWITCH_CASE: number;
1570
+
1571
+ declare const T_SWITCH_STATEMENT: number;
1572
+
1573
+ declare const T_TEMPLATE_LITERAL_EXPRESSION: number;
1574
+
1575
+ declare const T_THROW_STATEMENT: number;
1576
+
1577
+ declare const T_TRY_STATEMENT: number;
1578
+
1579
+ declare const T_UNARY_EXPRESSION: number;
1580
+
1581
+ declare const T_VAR_DECLARATION: number;
1582
+
1583
+ declare const T_VAR_STATEMENT: number;
1584
+
1585
+ declare const T_WHILE_STATEMENT: number;
1586
+
1587
+ declare type TableDescriptor = {
1588
+ name: string;
1589
+ fields?: Record<string, any>;
1590
+ pk: Array<string>;
1591
+ indexes?: Array<string>;
1592
+ };
1593
+
1594
+ declare type TEMPLATE_LITERAL_EXPRESSION = typeof T_TEMPLATE_LITERAL_EXPRESSION;
1595
+
1596
+ declare interface TemplateLiteralExpression extends ExpressionBase {
1597
+ type: TEMPLATE_LITERAL_EXPRESSION;
1598
+ segments: (Literal | Expression)[];
1599
+ }
1600
+
1601
+ export declare const test: TestType<PlaywrightTestArgs & PlaywrightTestOptions & TestDriverExtenderProps, PlaywrightWorkerArgs & PlaywrightWorkerOptions>;
1602
+
1603
+ export declare type TestBedDescription = Omit<Partial<StandaloneAppDescription>, "entryPoint" | "components"> & {
1604
+ testThemeVars?: Record<string, string>;
1605
+ components?: string[];
1606
+ };
1607
+
1608
+ declare type TestDriverExtenderProps = {
1609
+ testStateViewTestId: string;
1610
+ baseComponentTestId: string;
1611
+ initTestBed: (source: string, description?: TestBedDescription) => Promise<{
1612
+ testStateDriver: TestStateDriver;
1613
+ clipboard: Clipboard_2;
1614
+ width: number;
1615
+ height: number;
1616
+ testIcons: {
1617
+ boxIcon: Locator_2;
1618
+ docIcon: Locator_2;
1619
+ sunIcon: Locator_2;
1620
+ eyeIcon: Locator_2;
1621
+ txtIcon: Locator_2;
1622
+ bellIcon: Locator_2;
1623
+ };
1624
+ }>;
1625
+ createDriver: <T extends new (...args: ComponentDriverParams[]) => any>(driverClass: T, testIdOrLocator?: string | Locator_2) => Promise<InstanceType<T>>;
1626
+ createButtonDriver: ComponentDriverMethod<ButtonDriver>;
1627
+ createBackdropDriver: ComponentDriverMethod<BackdropDriver>;
1628
+ createContentSeparatorDriver: ComponentDriverMethod<ContentSeparatorDriver>;
1629
+ createAvatarDriver: ComponentDriverMethod<AvatarDriver>;
1630
+ createFormDriver: ComponentDriverMethod<FormDriver>;
1631
+ createFormItemDriver: ComponentDriverMethod<FormItemDriver>;
1632
+ createValidationSummaryDriver: ComponentDriverMethod<ValidationSummaryDriver>;
1633
+ createValidationDisplayDriver: ComponentDriverMethod<ValidationDisplayDriver>;
1634
+ createSplitterDriver: ComponentDriverMethod<SplitterDriver>;
1635
+ createMarkdownDriver: ComponentDriverMethod<MarkdownDriver>;
1636
+ createItemsDriver: ComponentDriverMethod<ItemsDriver>;
1637
+ createSliderDriver: ComponentDriverMethod<SliderDriver>;
1638
+ createRangeDriver: ComponentDriverMethod<RangeDriver>;
1639
+ createDatePickerDriver: ComponentDriverMethod<DatePickerDriver>;
1640
+ createExpandableItemDriver: ComponentDriverMethod<ExpandableItemDriver>;
1641
+ createFileInputDriver: ComponentDriverMethod<FileInputDriver>;
1642
+ createFileUploadDropZoneDriver: ComponentDriverMethod<FileUploadDropZoneDriver>;
1643
+ createAutoCompleteDriver: ComponentDriverMethod<AutoCompleteDriver>;
1644
+ createSelectDriver: ComponentDriverMethod<SelectDriver>;
1645
+ createRadioGroupDriver: ComponentDriverMethod<RadioGroupDriver>;
1646
+ createNumberBoxDriver: ComponentDriverMethod<NumberBoxDriver>;
1647
+ createTextBoxDriver: ComponentDriverMethod<TextBoxDriver>;
1648
+ createTextAreaDriver: ComponentDriverMethod<TextAreaDriver>;
1649
+ createProgressBarDriver: ComponentDriverMethod<ProgressBarDriver>;
1650
+ createListDriver: ComponentDriverMethod<ListDriver>;
1651
+ createTextDriver: ComponentDriverMethod<TextDriver>;
1652
+ createHeadingDriver: ComponentDriverMethod<HeadingDriver>;
1653
+ createIconDriver: ComponentDriverMethod<IconDriver>;
1654
+ createStackDriver: ComponentDriverMethod<StackDriver>;
1655
+ createHStackDriver: ComponentDriverMethod<HStackDriver>;
1656
+ createVStackDriver: ComponentDriverMethod<VStackDriver>;
1657
+ createLinkDriver: ComponentDriverMethod<LinkDriver>;
1658
+ createNavLinkDriver: ComponentDriverMethod<NavLinkDriver>;
1659
+ createNavGroupDriver: ComponentDriverMethod<NavGroupDriver>;
1660
+ createNavPanelDriver: ComponentDriverMethod<NavPanelDriver>;
1661
+ createCardDriver: ComponentDriverMethod<CardDriver>;
1662
+ createAccordionDriver: ComponentDriverMethod<AccordionDriver>;
1663
+ createAppHeaderDriver: ComponentDriverMethod<AppHeaderDriver>;
1664
+ createAppFooterDriver: ComponentDriverMethod<AppFooterDriver>;
1665
+ createBadgeDriver: ComponentDriverMethod<BadgeDriver>;
1666
+ createNoResultDriver: ComponentDriverMethod<NoResultDriver>;
1667
+ createOptionDriver: ComponentDriverMethod<OptionDriver>;
1668
+ createHtmlTagDriver: ComponentDriverMethod<HtmlTagDriver>;
1669
+ createCodeBlockDriver: ComponentDriverMethod<CodeBlockDriver>;
1670
+ createCheckboxDriver: ComponentDriverMethod<CheckboxDriver>;
1671
+ createLabelDriver: ComponentDriverMethod<LabelDriver>;
1672
+ createSpinnerDriver: ComponentDriverMethod<SpinnerDriver>;
1673
+ createDropdownMenuDriver: ComponentDriverMethod<DropdownMenuDriver>;
1674
+ createTimeInputDriver: ComponentDriverMethod<TimeInputDriver>;
1675
+ createTimerDriver: ComponentDriverMethod<TimerDriver>;
1676
+ createDateInputDriver: ComponentDriverMethod<DateInputDriver>;
1677
+ createModalDialogDriver: ComponentDriverMethod<ModalDialogDriver>;
1678
+ createTreeDriver: ComponentDriverMethod<TreeDriver>;
1679
+ };
1680
+
1681
+ /**
1682
+ * Provides annotations for skipped tests and the ability to specify a reason.
1683
+ * Use it via the SKIP_REASON exported variable.
1684
+ */
1685
+ declare class TestSkipReason {
1686
+ private addAnnotation;
1687
+ NOT_IMPLEMENTED_XMLUI(description?: string): {
1688
+ annotation: {
1689
+ type: string;
1690
+ description: string;
1691
+ };
1692
+ };
1693
+ TO_BE_IMPLEMENTED(description?: string): {
1694
+ annotation: {
1695
+ type: string;
1696
+ description: string;
1697
+ };
1698
+ };
1699
+ XMLUI_BUG(description?: string): {
1700
+ annotation: {
1701
+ type: string;
1702
+ description: string;
1703
+ };
1704
+ };
1705
+ TEST_INFRA_BUG(description?: string): {
1706
+ annotation: {
1707
+ type: string;
1708
+ description: string;
1709
+ };
1710
+ };
1711
+ TEST_NOT_WORKING(description?: string): {
1712
+ annotation: {
1713
+ type: string;
1714
+ description: string;
1715
+ };
1716
+ };
1717
+ TEST_INFRA_NOT_IMPLEMENTED(description?: string): {
1718
+ annotation: {
1719
+ type: string;
1720
+ description: string;
1721
+ };
1722
+ };
1723
+ REFACTOR(description?: string): {
1724
+ annotation: {
1725
+ type: string;
1726
+ description: string;
1727
+ };
1728
+ };
1729
+ UNSURE(description: string): {
1730
+ annotation: {
1731
+ type: string;
1732
+ description: string;
1733
+ };
1734
+ };
1735
+ }
1736
+
1737
+ declare class TestStateDriver {
1738
+ protected readonly testStateLocator: Locator;
1739
+ constructor(testStateLocator: Locator);
1740
+ /** returns an async function that can query the test state */
1741
+ get testState(): () => Promise<any>;
1742
+ }
1743
+
1744
+ declare class TextAreaDriver extends InputComponentDriver {
1745
+ }
1746
+
1747
+ declare class TextBoxDriver extends InputComponentDriver {
1748
+ get input(): Locator_2;
1749
+ get startAdornment(): Locator_2;
1750
+ get endAdornment(): Locator_2;
1751
+ get button(): Locator_2;
1752
+ }
1753
+
1754
+ declare class TextDriver extends ComponentDriver {
1755
+ }
1756
+
1757
+ declare interface ThemeDefinition extends ThemeDefinitionDetails {
1758
+ id: string;
1759
+ name?: string;
1760
+ extends?: string | Array<string>;
1761
+ tones?: Record<string | ThemeTone, ThemeDefinitionDetails>;
1762
+ }
1763
+
1764
+ declare interface ThemeDefinitionDetails {
1765
+ themeVars?: Record<string, string>;
1766
+ resources?: Record<string, string | FontDef>;
1767
+ }
1768
+
1769
+ export declare function themedOverflows(locator: Locator, direction?: "x" | "y" | "both"): Promise<boolean>;
1770
+
1771
+ export declare function themedPixelStrToNum(pixelStr: string): number;
1772
+
1773
+ export declare type ThemedThemeTestDesc = {
1774
+ themeVar: string;
1775
+ themeVarAsCSS: string;
1776
+ expected: string;
1777
+ dependsOnVars?: Record<string, string>;
1778
+ };
1779
+
1780
+ export declare type ThemeTestDesc = {
1781
+ themeVar: string;
1782
+ themeVarAsCSS: string;
1783
+ expected: string;
1784
+ dependsOnVars?: Record<string, string>;
1785
+ };
1786
+
1787
+ declare type ThemeTone = "light" | "dark";
1788
+
1789
+ declare type THROW_STATEMENT = typeof T_THROW_STATEMENT;
1790
+
1791
+ declare interface ThrowStatement extends ScripNodeBase {
1792
+ type: THROW_STATEMENT;
1793
+ expr: Expression;
1794
+ }
1795
+
1796
+ export declare class TimeInputDriver extends InputComponentDriver {
1797
+ get hourInput(): Locator_2;
1798
+ get minuteInput(): Locator_2;
1799
+ get secondInput(): Locator_2;
1800
+ get amPmInput(): Locator_2;
1801
+ get clearButton(): Locator_2;
1802
+ }
1803
+
1804
+ export declare class TimerDriver extends ComponentDriver {
1805
+ isEnabled(): Promise<boolean>;
1806
+ isRunning(): Promise<boolean>;
1807
+ isPaused(): Promise<boolean>;
1808
+ isInInitialDelay(): Promise<boolean>;
1809
+ getInterval(): Promise<number>;
1810
+ getInitialDelay(): Promise<number>;
1811
+ isOnce(): Promise<boolean>;
1812
+ hasExecuted(): Promise<boolean>;
1813
+ }
1814
+
1815
+ declare enum TokenType {
1816
+ Eof = -1,
1817
+ Ws = -2,
1818
+ BlockComment = -3,
1819
+ EolComment = -4,
1820
+ Unknown = 0,
1821
+ LParent = 1,
1822
+ RParent = 2,
1823
+ Identifier = 3,
1824
+ Exponent = 4,
1825
+ Divide = 5,
1826
+ Multiply = 6,
1827
+ Remainder = 7,
1828
+ Plus = 8,
1829
+ Minus = 9,
1830
+ BitwiseXor = 10,
1831
+ BitwiseOr = 11,
1832
+ LogicalOr = 12,
1833
+ BitwiseAnd = 13,
1834
+ LogicalAnd = 14,
1835
+ IncOp = 15,
1836
+ DecOp = 16,
1837
+ Assignment = 17,
1838
+ AddAssignment = 18,
1839
+ SubtractAssignment = 19,
1840
+ ExponentAssignment = 20,
1841
+ MultiplyAssignment = 21,
1842
+ DivideAssignment = 22,
1843
+ RemainderAssignment = 23,
1844
+ ShiftLeftAssignment = 24,
1845
+ ShiftRightAssignment = 25,
1846
+ SignedShiftRightAssignment = 26,
1847
+ BitwiseAndAssignment = 27,
1848
+ BitwiseXorAssignment = 28,
1849
+ BitwiseOrAssignment = 29,
1850
+ LogicalAndAssignment = 30,
1851
+ LogicalOrAssignment = 31,
1852
+ NullCoalesceAssignment = 32,
1853
+ Semicolon = 33,
1854
+ Comma = 34,
1855
+ Colon = 35,
1856
+ LSquare = 36,
1857
+ RSquare = 37,
1858
+ QuestionMark = 38,
1859
+ NullCoalesce = 39,
1860
+ OptionalChaining = 40,
1861
+ BinaryNot = 41,
1862
+ LBrace = 42,
1863
+ RBrace = 43,
1864
+ Equal = 44,
1865
+ StrictEqual = 45,
1866
+ LogicalNot = 46,
1867
+ NotEqual = 47,
1868
+ StrictNotEqual = 48,
1869
+ LessThan = 49,
1870
+ LessThanOrEqual = 50,
1871
+ ShiftLeft = 51,
1872
+ GreaterThan = 52,
1873
+ GreaterThanOrEqual = 53,
1874
+ ShiftRight = 54,
1875
+ SignedShiftRight = 55,
1876
+ Dot = 56,
1877
+ Spread = 57,
1878
+ Global = 58,
1879
+ Backtick = 59,
1880
+ DollarLBrace = 60,
1881
+ Arrow = 61,
1882
+ DecimalLiteral = 62,
1883
+ HexadecimalLiteral = 63,
1884
+ BinaryLiteral = 64,
1885
+ RealLiteral = 65,
1886
+ StringLiteral = 66,
1887
+ Infinity = 67,
1888
+ NaN = 68,
1889
+ True = 69,
1890
+ False = 70,
1891
+ Typeof = 71,
1892
+ Null = 72,
1893
+ Undefined = 73,
1894
+ In = 74,
1895
+ Let = 75,
1896
+ Const = 76,
1897
+ Var = 77,
1898
+ If = 78,
1899
+ Else = 79,
1900
+ Return = 80,
1901
+ Break = 81,
1902
+ Continue = 82,
1903
+ Do = 83,
1904
+ While = 84,
1905
+ For = 85,
1906
+ Of = 86,
1907
+ Try = 87,
1908
+ Catch = 88,
1909
+ Finally = 89,
1910
+ Throw = 90,
1911
+ Switch = 91,
1912
+ Case = 92,
1913
+ Default = 93,
1914
+ Delete = 94,
1915
+ Function = 95,
1916
+ As = 96
1917
+ }
1918
+
1919
+ declare class TreeDriver extends ComponentDriver {
1920
+ getNodeById(nodeId: string): Locator;
1921
+ getNodeWrapperByTestId(marker: string): Locator;
1922
+ }
1923
+
1924
+ declare type TRY_STATEMENT = typeof T_TRY_STATEMENT;
1925
+
1926
+ declare interface TryStatement extends ScripNodeBase {
1927
+ type: TRY_STATEMENT;
1928
+ tryB: BlockStatement;
1929
+ catchB?: BlockStatement;
1930
+ catchV?: Identifier;
1931
+ finallyB?: BlockStatement;
1932
+ }
1933
+
1934
+ declare type UNARY_EXPRESSION = typeof T_UNARY_EXPRESSION;
1935
+
1936
+ declare interface UnaryExpression extends ExpressionBase {
1937
+ type: UNARY_EXPRESSION;
1938
+ op: UnaryOpSymbols;
1939
+ expr: Expression;
1940
+ }
1941
+
1942
+ declare type UnaryOpSymbols = "+" | "-" | "~" | "!" | "typeof" | "delete";
1943
+
1944
+ declare type UnparsedAppDescription = Omit<Partial<StandaloneAppDescription>, "entryPoint"> & {
1945
+ entryPoint?: EntryPoint;
1946
+ };
1947
+
1948
+ declare class ValidationDisplayDriver extends ComponentDriver {
1949
+ getSeverity(): Promise<string>;
1950
+ getText(): Promise<string>;
1951
+ }
1952
+
1953
+ declare class ValidationSummaryDriver extends ComponentDriver {
1954
+ /**
1955
+ * Gets the validation display components inside the Form.
1956
+ * Uses the 'data-validation-display-severity' attribute to find the components.
1957
+ * The attribute contains the severity of the validation.
1958
+ */
1959
+ getValidationDisplays(): Locator;
1960
+ }
1961
+
1962
+ declare type VAR_DECLARATION = typeof T_VAR_DECLARATION;
1963
+
1964
+ declare type VAR_STATEMENT = typeof T_VAR_STATEMENT;
1965
+
1966
+ declare interface VarDeclaration extends ExpressionBase {
1967
+ type: VAR_DECLARATION;
1968
+ id?: string;
1969
+ aDestr?: ArrayDestructure[];
1970
+ oDestr?: ObjectDestructure[];
1971
+ expr?: Expression;
1972
+ }
1973
+
1974
+ declare interface VarStatement extends ScripNodeBase {
1975
+ type: VAR_STATEMENT;
1976
+ decls: ReactiveVarDeclaration[];
1977
+ }
1978
+
1979
+ declare class VStackDriver extends StackDriver {
1980
+ }
1981
+
1982
+ declare type WHILE_STATEMENT = typeof T_WHILE_STATEMENT;
1983
+
1984
+ declare interface WhileStatement extends ScripNodeBase {
1985
+ type: WHILE_STATEMENT;
1986
+ cond: Expression;
1987
+ body: Statement;
1988
+ }
1989
+
1990
+ export { }
1991
+
1992
+
1993
+ declare module "@tanstack/table-core" {
1994
+ interface TableMeta<TData extends RowData> {
1995
+ cellRenderer: (...args: any[]) => any;
1996
+ }
1997
+ interface ColumnMeta<TData extends RowData, TValue> {
1998
+ style?: CSSProperties;
1999
+ starSizedWidth?: string;
2000
+ accessorKey?: string;
2001
+ pinTo?: string;
2002
+ cellRenderer?: (row: any, rowIdx: number, colIdx: number, value?: any) => ReactNode;
2003
+ }
2004
+ }
2005
+
2006
+
2007
+ declare global {
2008
+ interface Window {
2009
+ TEST_ENV: StandaloneAppDescription | undefined;
2010
+ }
2011
+ }