@vonage/vivid-test-utils 5.25.0 → 5.28.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/dist/{components.generated-NJa_d646.js → components.generated-B-6jlcsc.js} +378 -357
- package/dist/{components.generated-CFCjcJdH.cjs → components.generated-DcMBaOF8.cjs} +1 -1
- package/dist/components.generated.d.ts +52 -21
- package/dist/cypress.cjs +1 -1
- package/dist/cypress.js +9 -8
- package/dist/dom.cjs +1 -1
- package/dist/dom.js +9 -8
- package/dist/jsdom-polyfill.cjs +1 -1
- package/dist/playwright.cjs +1 -1
- package/dist/playwright.js +17 -12
- package/package.json +22 -17
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { DriverT } from './drivers/driver';
|
|
2
2
|
import { BaseComponent, BaseWrapper, ComponentCollectionExpectations, ComponentCollectionLocator, Context } from './base';
|
|
3
|
-
import { VwcAccordionElement, VwcAccordionItemElement, VwcActionGroupElement, VwcAlertElement, VwcAudioPlayerElement, VwcAvatarElement, VwcBadgeElement, VwcBannerElement, VwcBreadcrumbElement, VwcBreadcrumbItemElement, VwcButtonElement, VwcCalendarElement, VwcCalendarEventElement, VwcCardElement, VwcCheckboxElement, VwcColorPickerElement, VwcComboboxElement, VwcContextualHelpElement, VwcCountryElement, VwcCountryGroupElement, VwcDataGridElement, VwcDataGridCellElement, VwcDataGridRowElement, VwcDatePickerElement, VwcDateRangePickerElement, VwcDateTimePickerElement, VwcDialPadElement, VwcDialogElement, VwcDividerElement, VwcEmptyStateElement, VwcFabElement, VwcFilePickerElement, VwcFlagElement, VwcHeaderElement, VwcIconElement, VwcKbdKeyElement, VwcKbdShortcutElement, VwcLayoutElement, VwcListboxElement, VwcMenuElement, VwcMenuItemElement, VwcNavElement, VwcNavDisclosureElement, VwcNavItemElement, VwcNoteElement, VwcNumberFieldElement, VwcOptgroupElement, VwcOptionElement, VwcPaginationElement, VwcPlatformSwitchElement, VwcPopoverElement, VwcProgressElement, VwcProgressRingElement, VwcRadioElement, VwcRadioGroupElement, VwcRangeSliderElement, VwcRichTextEditorElement, VwcRichTextViewElement, VwcSearchableSelectElement, VwcSelectElement, VwcSelectableBoxElement, VwcSideDrawerElement, VwcSimpleColorPickerElement, VwcSliderElement, VwcSplitButtonElement, VwcStatusElement, VwcSwitchElement, VwcTabElement, VwcTabPanelElement, VwcTableElement, VwcTableBodyElement, VwcTableCellElement, VwcTableHeadElement, VwcTableHeaderCellElement, VwcTableRowElement, VwcTableSortingButtonElement, VwcTabsElement, VwcTagElement, VwcTagGroupElement, VwcTextAreaElement, VwcTextFieldElement, VwcTimePickerElement, VwcToggletipElement, VwcTooltipElement, VwcTreeItemElement, VwcTreeViewElement, VwcVideoPlayerElement, RteInstance, RteView } from '@vonage/vivid';
|
|
3
|
+
import { VwcAccordionElement, VwcAccordionItemElement, VwcActionGroupElement, VwcAlertElement, VwcAudioPlayerElement, VwcAvatarElement, VwcBadgeElement, VwcBannerElement, VwcBreadcrumbElement, VwcBreadcrumbItemElement, VwcButtonElement, VwcCalendarElement, VwcCalendarEventElement, VwcCardElement, VwcCheckboxElement, VwcColorPickerElement, VwcComboboxElement, VwcContextualHelpElement, VwcCountryElement, VwcCountryGroupElement, VwcDataGridElement, VwcDataGridCellElement, VwcDataGridRowElement, VwcDatePickerElement, VwcDateRangePickerElement, VwcDateTimePickerElement, VwcDialPadElement, VwcDialogElement, VwcDividerElement, VwcEmptyStateElement, VwcFabElement, VwcFilePickerElement, VwcFlagElement, VwcFormFieldElement, VwcHeaderElement, VwcIconElement, VwcKbdKeyElement, VwcKbdShortcutElement, VwcLayoutElement, VwcListboxElement, VwcMenuElement, VwcMenuItemElement, VwcNavElement, VwcNavDisclosureElement, VwcNavItemElement, VwcNoteElement, VwcNumberFieldElement, VwcOptgroupElement, VwcOptionElement, VwcPaginationElement, VwcPlatformSwitchElement, VwcPopoverElement, VwcProgressElement, VwcProgressRingElement, VwcRadioElement, VwcRadioGroupElement, VwcRangeSliderElement, VwcRichTextEditorElement, VwcRichTextViewElement, VwcSearchableSelectElement, VwcSelectElement, VwcSelectableBoxElement, VwcSideDrawerElement, VwcSimpleColorPickerElement, VwcSliderElement, VwcSplitButtonElement, VwcStatusElement, VwcSwitchElement, VwcTabElement, VwcTabPanelElement, VwcTableElement, VwcTableBodyElement, VwcTableCellElement, VwcTableHeadElement, VwcTableHeaderCellElement, VwcTableRowElement, VwcTableSortingButtonElement, VwcTabsElement, VwcTagElement, VwcTagGroupElement, VwcTextAreaElement, VwcTextFieldElement, VwcTimePickerElement, VwcToggletipElement, VwcTooltipElement, VwcTreeItemElement, VwcTreeViewElement, VwcVideoPlayerElement, RteInstance, RteView } from '@vonage/vivid';
|
|
4
4
|
type IconId = string;
|
|
5
5
|
type AccordionProps = {
|
|
6
6
|
expandMode: 'single' | 'multi';
|
|
@@ -31,7 +31,7 @@ type AccordionItemProps = {
|
|
|
31
31
|
appearance: 'ghost' | 'filled' | 'ghost-light';
|
|
32
32
|
expanded: boolean;
|
|
33
33
|
heading: string;
|
|
34
|
-
headingLevel:
|
|
34
|
+
headingLevel: 2 | 6 | 4 | 5 | 3 | 1;
|
|
35
35
|
icon: IconId;
|
|
36
36
|
iconTrailing: boolean;
|
|
37
37
|
id: string;
|
|
@@ -97,7 +97,7 @@ export declare class ActionGroupExpectations<D extends DriverT> {
|
|
|
97
97
|
toHaveProp: <T extends keyof ActionGroupProps>(propName: T, value: ActionGroupProps[T]) => D["expectReturn"];
|
|
98
98
|
}
|
|
99
99
|
type AlertProps = {
|
|
100
|
-
connotation: '
|
|
100
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement';
|
|
101
101
|
dismissButtonAriaLabel: string;
|
|
102
102
|
headline: string;
|
|
103
103
|
icon: IconId;
|
|
@@ -215,12 +215,14 @@ export declare class AvatarExpectations<D extends DriverT> {
|
|
|
215
215
|
}
|
|
216
216
|
type BadgeProps = {
|
|
217
217
|
appearance: 'filled' | 'duotone' | 'subtle' | 'subtle-light';
|
|
218
|
-
connotation: 'alert' | 'accent' | '
|
|
218
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement' | 'cta';
|
|
219
|
+
count: boolean;
|
|
219
220
|
icon: IconId;
|
|
220
221
|
iconTrailing: boolean;
|
|
221
222
|
shape: 'rounded' | 'pill';
|
|
222
223
|
size: 'normal' | 'expanded';
|
|
223
224
|
text: string;
|
|
225
|
+
textSecondary: string;
|
|
224
226
|
};
|
|
225
227
|
export declare class BadgeWrapper<D extends DriverT> extends BaseWrapper<D, VwcBadgeElement> {
|
|
226
228
|
type: "badge";
|
|
@@ -246,7 +248,7 @@ export declare class BadgeExpectations<D extends DriverT> {
|
|
|
246
248
|
toHaveIcon: (value: any) => D["expectReturn"];
|
|
247
249
|
}
|
|
248
250
|
type BannerProps = {
|
|
249
|
-
connotation: '
|
|
251
|
+
connotation: 'alert' | 'information' | 'success' | 'warning' | 'announcement';
|
|
250
252
|
dismissAriaLabel: string;
|
|
251
253
|
icon: IconId;
|
|
252
254
|
removable: boolean;
|
|
@@ -336,7 +338,7 @@ type ButtonProps = {
|
|
|
336
338
|
active: boolean;
|
|
337
339
|
appearance: 'ghost' | 'filled' | 'outlined' | 'ghost-light' | 'outlined-light';
|
|
338
340
|
autofocus: boolean;
|
|
339
|
-
connotation: 'alert' | 'accent' | '
|
|
341
|
+
connotation: 'alert' | 'accent' | 'success' | 'announcement' | 'cta';
|
|
340
342
|
disabled: boolean;
|
|
341
343
|
download: string;
|
|
342
344
|
dropdownIndicator: boolean;
|
|
@@ -424,7 +426,7 @@ export declare class CalendarExpectations<D extends DriverT> {
|
|
|
424
426
|
}
|
|
425
427
|
type CalendarEventProps = {
|
|
426
428
|
appearance: 'filled' | 'duotone' | 'subtle';
|
|
427
|
-
connotation: 'alert' | 'accent' | '
|
|
429
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement' | 'cta';
|
|
428
430
|
description: string;
|
|
429
431
|
duration: number;
|
|
430
432
|
heading: string;
|
|
@@ -1091,7 +1093,7 @@ export declare class DividerExpectations<D extends DriverT> {
|
|
|
1091
1093
|
toHaveProp: <T extends keyof DividerProps>(propName: T, value: DividerProps[T]) => D["expectReturn"];
|
|
1092
1094
|
}
|
|
1093
1095
|
type EmptyStateProps = {
|
|
1094
|
-
connotation: 'alert' | 'accent' | '
|
|
1096
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'cta';
|
|
1095
1097
|
headline: string;
|
|
1096
1098
|
icon: IconId;
|
|
1097
1099
|
iconDecoration: 'filled' | 'outlined';
|
|
@@ -1120,7 +1122,7 @@ export declare class EmptyStateExpectations<D extends DriverT> {
|
|
|
1120
1122
|
}
|
|
1121
1123
|
type FabProps = {
|
|
1122
1124
|
autofocus: boolean;
|
|
1123
|
-
connotation: 'accent' | '
|
|
1125
|
+
connotation: 'accent' | 'announcement' | 'cta';
|
|
1124
1126
|
disabled: boolean;
|
|
1125
1127
|
form: string;
|
|
1126
1128
|
formaction: string;
|
|
@@ -1210,7 +1212,7 @@ export declare class FilePickerExpectations<D extends DriverT> {
|
|
|
1210
1212
|
type FlagProps = {
|
|
1211
1213
|
code: string;
|
|
1212
1214
|
label: string;
|
|
1213
|
-
size: 0 |
|
|
1215
|
+
size: 0 | 2 | 4 | 5 | 3 | 1 | -1 | -6 | -5 | -4 | -3 | -2;
|
|
1214
1216
|
};
|
|
1215
1217
|
export declare class FlagWrapper<D extends DriverT> extends BaseWrapper<D, VwcFlagElement> {
|
|
1216
1218
|
type: "flag";
|
|
@@ -1235,6 +1237,31 @@ export declare class FlagExpectations<D extends DriverT> {
|
|
|
1235
1237
|
toHaveProp: <T extends keyof FlagProps>(propName: T, value: FlagProps[T]) => D["expectReturn"];
|
|
1236
1238
|
toHaveCode: (value: any) => D["expectReturn"];
|
|
1237
1239
|
}
|
|
1240
|
+
type FormFieldProps = {
|
|
1241
|
+
state: 'success' | 'error';
|
|
1242
|
+
};
|
|
1243
|
+
export declare class FormFieldWrapper<D extends DriverT> extends BaseWrapper<D, VwcFormFieldElement> {
|
|
1244
|
+
type: "formField";
|
|
1245
|
+
componentInfo: {
|
|
1246
|
+
name: string;
|
|
1247
|
+
};
|
|
1248
|
+
blur: () => D["actionReturn"];
|
|
1249
|
+
focus: () => D["actionReturn"];
|
|
1250
|
+
hover: () => D["actionReturn"];
|
|
1251
|
+
}
|
|
1252
|
+
export declare class FormField<D extends DriverT> extends BaseComponent<D, FormFieldWrapper<D>> {
|
|
1253
|
+
componentInfo: {
|
|
1254
|
+
name: string;
|
|
1255
|
+
};
|
|
1256
|
+
wrap(locator: D['locator']): FormFieldWrapper<D>;
|
|
1257
|
+
byTestId: (id: string) => FormFieldWrapper<D>;
|
|
1258
|
+
}
|
|
1259
|
+
export declare class FormFieldExpectations<D extends DriverT> {
|
|
1260
|
+
private readonly ctx;
|
|
1261
|
+
private readonly wrapper;
|
|
1262
|
+
constructor(ctx: Context<D>, wrapper: FormFieldWrapper<D>);
|
|
1263
|
+
toHaveProp: <T extends keyof FormFieldProps>(propName: T, value: FormFieldProps[T]) => D["expectReturn"];
|
|
1264
|
+
}
|
|
1238
1265
|
type HeaderProps = {
|
|
1239
1266
|
alternate: boolean;
|
|
1240
1267
|
elevationShadow: boolean;
|
|
@@ -1262,10 +1289,10 @@ export declare class HeaderExpectations<D extends DriverT> {
|
|
|
1262
1289
|
toHaveProp: <T extends keyof HeaderProps>(propName: T, value: HeaderProps[T]) => D["expectReturn"];
|
|
1263
1290
|
}
|
|
1264
1291
|
type IconProps = {
|
|
1265
|
-
connotation: 'alert' | 'accent' | '
|
|
1292
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement' | 'cta';
|
|
1266
1293
|
label: string;
|
|
1267
1294
|
name: IconId;
|
|
1268
|
-
size: 0 |
|
|
1295
|
+
size: 0 | 2 | 4 | 5 | 3 | 1 | -1 | -6 | -5 | -4 | -3 | -2 | -7;
|
|
1269
1296
|
};
|
|
1270
1297
|
export declare class IconWrapper<D extends DriverT> extends BaseWrapper<D, VwcIconElement> {
|
|
1271
1298
|
type: "icon";
|
|
@@ -1294,7 +1321,7 @@ type KbdKeyProps = {
|
|
|
1294
1321
|
appearance: 'outlined' | 'subtle' | 'dropshadow';
|
|
1295
1322
|
keyboard: 'auto' | 'standard' | 'apple';
|
|
1296
1323
|
keyshortcutsKey: string;
|
|
1297
|
-
name: 'Alt' | 'Control' | 'Shift' | 'Enter' | 'Tab' | 'Space' | 'Backspace' | 'Escape' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'End' | 'Home' | 'PageUp' | 'PageDown' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '
|
|
1324
|
+
name: '0' | '1' | '2' | '3' | '4' | '5' | '6' | 'Alt' | 'Control' | 'Shift' | 'Enter' | 'Tab' | 'Space' | 'Backspace' | 'Escape' | 'ArrowUp' | 'ArrowDown' | 'ArrowLeft' | 'ArrowRight' | 'End' | 'Home' | 'PageUp' | 'PageDown' | 'A' | 'B' | 'C' | 'D' | 'E' | 'F' | 'G' | 'H' | 'I' | 'J' | 'K' | 'L' | 'M' | 'N' | 'O' | 'P' | 'Q' | 'R' | 'S' | 'T' | 'U' | 'V' | 'W' | 'X' | 'Y' | 'Z' | '7' | '8' | '9' | 'Mod' | 'Custom';
|
|
1298
1325
|
size: 'condensed' | 'normal' | 'expanded' | 'super-condensed';
|
|
1299
1326
|
};
|
|
1300
1327
|
export declare class KbdKeyWrapper<D extends DriverT> extends BaseWrapper<D, VwcKbdKeyElement> {
|
|
@@ -1578,7 +1605,7 @@ export declare class NavItemExpectations<D extends DriverT> {
|
|
|
1578
1605
|
toHaveIcon: (value: any) => D["expectReturn"];
|
|
1579
1606
|
}
|
|
1580
1607
|
type NoteProps = {
|
|
1581
|
-
connotation: '
|
|
1608
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement';
|
|
1582
1609
|
headline: string;
|
|
1583
1610
|
icon: IconId;
|
|
1584
1611
|
};
|
|
@@ -1817,7 +1844,7 @@ export declare class PopoverExpectations<D extends DriverT> {
|
|
|
1817
1844
|
toHaveProp: <T extends keyof PopoverProps>(propName: T, value: PopoverProps[T]) => D["expectReturn"];
|
|
1818
1845
|
}
|
|
1819
1846
|
type ProgressProps = {
|
|
1820
|
-
connotation: '
|
|
1847
|
+
connotation: 'alert' | 'accent' | 'success' | 'cta' | 'pacific';
|
|
1821
1848
|
max: number;
|
|
1822
1849
|
min: number;
|
|
1823
1850
|
paused: boolean;
|
|
@@ -1848,11 +1875,11 @@ export declare class ProgressExpectations<D extends DriverT> {
|
|
|
1848
1875
|
toHaveProp: <T extends keyof ProgressProps>(propName: T, value: ProgressProps[T]) => D["expectReturn"];
|
|
1849
1876
|
}
|
|
1850
1877
|
type ProgressRingProps = {
|
|
1851
|
-
connotation: '
|
|
1878
|
+
connotation: 'alert' | 'accent' | 'success' | 'cta';
|
|
1852
1879
|
max: number;
|
|
1853
1880
|
min: number;
|
|
1854
1881
|
paused: boolean;
|
|
1855
|
-
size: 0 |
|
|
1882
|
+
size: 0 | 2 | 4 | 5 | 3 | 1 | -1 | -6 | -5 | -4 | -3 | -2 | -7;
|
|
1856
1883
|
value: number;
|
|
1857
1884
|
};
|
|
1858
1885
|
export declare class ProgressRingWrapper<D extends DriverT> extends BaseWrapper<D, VwcProgressRingElement> {
|
|
@@ -2004,7 +2031,9 @@ export declare class RangeSliderExpectations<D extends DriverT> {
|
|
|
2004
2031
|
toHaveVisibleError: (value: any) => D["expectReturn"];
|
|
2005
2032
|
}
|
|
2006
2033
|
type RichTextEditorProps = {
|
|
2034
|
+
appearance: 'fieldset';
|
|
2007
2035
|
instance: RteInstance;
|
|
2036
|
+
state: 'success' | 'error';
|
|
2008
2037
|
};
|
|
2009
2038
|
export declare class RichTextEditorWrapper<D extends DriverT> extends BaseWrapper<D, VwcRichTextEditorElement> {
|
|
2010
2039
|
type: "richTextEditor";
|
|
@@ -2317,7 +2346,7 @@ export declare class SliderExpectations<D extends DriverT> {
|
|
|
2317
2346
|
}
|
|
2318
2347
|
type SplitButtonProps = {
|
|
2319
2348
|
appearance: 'ghost' | 'filled' | 'outlined' | 'outlined-light';
|
|
2320
|
-
connotation: 'alert' | 'accent' | '
|
|
2349
|
+
connotation: 'alert' | 'accent' | 'success' | 'announcement' | 'cta';
|
|
2321
2350
|
disabled: boolean;
|
|
2322
2351
|
icon: IconId;
|
|
2323
2352
|
indicatorAriaLabel: string;
|
|
@@ -2353,7 +2382,7 @@ export declare class SplitButtonExpectations<D extends DriverT> {
|
|
|
2353
2382
|
toHaveIcon: (value: any) => D["expectReturn"];
|
|
2354
2383
|
}
|
|
2355
2384
|
type StatusProps = {
|
|
2356
|
-
connotation: 'alert' | '
|
|
2385
|
+
connotation: 'alert' | 'information' | 'success' | 'warning';
|
|
2357
2386
|
icon: IconId;
|
|
2358
2387
|
status: string;
|
|
2359
2388
|
};
|
|
@@ -2382,7 +2411,7 @@ export declare class StatusExpectations<D extends DriverT> {
|
|
|
2382
2411
|
}
|
|
2383
2412
|
type SwitchProps = {
|
|
2384
2413
|
checked: boolean;
|
|
2385
|
-
connotation: '
|
|
2414
|
+
connotation: 'alert' | 'accent' | 'success' | 'announcement' | 'cta';
|
|
2386
2415
|
defaultChecked: boolean;
|
|
2387
2416
|
disabled: boolean;
|
|
2388
2417
|
initialValue: string;
|
|
@@ -2669,7 +2698,7 @@ export declare class TabsExpectations<D extends DriverT> {
|
|
|
2669
2698
|
}
|
|
2670
2699
|
type TagProps = {
|
|
2671
2700
|
appearance: 'duotone' | 'subtle' | 'subtle-light';
|
|
2672
|
-
connotation: 'alert' | 'accent' | '
|
|
2701
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement' | 'cta';
|
|
2673
2702
|
disabled: boolean;
|
|
2674
2703
|
icon: IconId;
|
|
2675
2704
|
label: string;
|
|
@@ -3069,6 +3098,7 @@ type Expectations<D extends DriverT> = {
|
|
|
3069
3098
|
fab: FabExpectations<D>;
|
|
3070
3099
|
filePicker: FilePickerExpectations<D>;
|
|
3071
3100
|
flag: FlagExpectations<D>;
|
|
3101
|
+
formField: FormFieldExpectations<D>;
|
|
3072
3102
|
header: HeaderExpectations<D>;
|
|
3073
3103
|
icon: IconExpectations<D>;
|
|
3074
3104
|
kbdKey: KbdKeyExpectations<D>;
|
|
@@ -3164,6 +3194,7 @@ export declare class VividWrapper<D extends DriverT> {
|
|
|
3164
3194
|
fab: Fab<D>;
|
|
3165
3195
|
filePicker: FilePicker<D>;
|
|
3166
3196
|
flag: Flag<D>;
|
|
3197
|
+
formField: FormField<D>;
|
|
3167
3198
|
header: Header<D>;
|
|
3168
3199
|
icon: Icon<D>;
|
|
3169
3200
|
kbdKey: KbdKey<D>;
|
package/dist/cypress.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components.generated-DcMBaOF8.cjs");var t=async()=>new Promise(e=>requestAnimationFrame(()=>e())),n=e=>{let n=t=>t===e,r,i=e=>{let t=r;return((...n)=>{let r=window.Error;window.Error=class extends Error{constructor(e){super(e),e===`userInvocationStack`&&(this.stack=t)}static captureStackTrace(e,t){e.message!==`userInvocationStack`&&super.captureStackTrace(e,t)}};try{return e(...n)}finally{window.Error=r}})};return{querySelector:(e,t)=>i(()=>n(e)?e.get(t):e().find(t)),enterShadow:e=>i(()=>e().shadow()),querySelectorAll:(e,t)=>i(()=>n(e)?e.get(t):e().find(t)),nth:(e,t)=>i(()=>e().eq(t)),userClick:e=>e().click(),userClear:e=>e().clear(),userFocus:e=>e().focus(),userBlur:e=>e().blur(),userHover:e=>e().then(e=>e.get(0).dispatchEvent(new MouseEvent(`mouseover`))),userFill:(e,t)=>t===``?e().clear():e().clear().type(t),userDragSlider:(e,n,r,i)=>{e().then(e=>{r().then(async n=>{let r=e.get(0),a=n.get(0);a.id===`start-thumb`?(r.startAsNumber=i,r.$emit(`input:start`),r.$emit(`input`)):a.id===`end-thumb`?(r.endAsNumber=i,r.$emit(`input:end`),r.$emit(`input`)):r.valueAsNumber=i,await t()})})},eval:(e,t,n,i)=>{let a=r;e().then(async e=>{r=a;try{let r=await t(e.get(0),n);await i?.(r)}finally{r=void 0}})},waitForUpdate(e){e().then(()=>new Promise(e=>{requestAnimationFrame(()=>{e()})}))},expectEq:(e,t,n)=>{let i=r;switch(e.type){case`eval`:e.el().should(r=>{try{expect(e.fn(r.get(0),e.arg)).to.deep.equal(t)}catch(e){let t=Error(`${n}\n\nOriginal error: ${e.message}`);throw i&&(t.stack=i),t}});break;case`count`:e.el().should(`have.length`,t)}},wrapAction:e=>function t(...n){if(!r){let e=Error();Error.captureStackTrace(e,t),r=e.stack}try{return e(...n)}finally{r=void 0}},wrapExpect:e=>function t(...n){if(!r){let e=Error();Error.captureStackTrace(e,t),r=e.stack}try{return e(...n)}finally{r=void 0}},wrapSelector:e=>function t(...n){if(!r){let e=Error();Error.captureStackTrace(e,t),r=e.stack}try{return e(...n)}finally{r=void 0}}}},r=t=>{let r={rootLocator:t,driver:n(t)};return new e.t(r)};exports.vividCypress=r;
|
package/dist/cypress.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./components.generated-
|
|
1
|
+
import { t as e } from "./components.generated-B-6jlcsc.js";
|
|
2
2
|
//#region src/drivers/cypress.ts
|
|
3
3
|
var t = async () => new Promise((e) => requestAnimationFrame(() => e())), n = (e) => {
|
|
4
4
|
let n = (t) => t === e, r, i = (e) => {
|
|
@@ -71,9 +71,7 @@ var t = async () => new Promise((e) => requestAnimationFrame(() => e())), n = (e
|
|
|
71
71
|
}
|
|
72
72
|
});
|
|
73
73
|
break;
|
|
74
|
-
case "count":
|
|
75
|
-
e.el().should("have.length", t);
|
|
76
|
-
break;
|
|
74
|
+
case "count": e.el().should("have.length", t);
|
|
77
75
|
}
|
|
78
76
|
},
|
|
79
77
|
wrapAction: (e) => function t(...n) {
|
|
@@ -110,9 +108,12 @@ var t = async () => new Promise((e) => requestAnimationFrame(() => e())), n = (e
|
|
|
110
108
|
}
|
|
111
109
|
}
|
|
112
110
|
};
|
|
113
|
-
}, r = (t) =>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
111
|
+
}, r = (t) => {
|
|
112
|
+
let r = {
|
|
113
|
+
rootLocator: t,
|
|
114
|
+
driver: n(t)
|
|
115
|
+
};
|
|
116
|
+
return new e(r);
|
|
117
|
+
};
|
|
117
118
|
//#endregion
|
|
118
119
|
export { r as vividCypress };
|
package/dist/dom.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});var e=Object.create,t=Object.defineProperty,n=Object.getOwnPropertyDescriptor,r=Object.getOwnPropertyNames,i=Object.getPrototypeOf,a=Object.prototype.hasOwnProperty,o=(e,i,o,s)=>{if(i&&typeof i==`object`||typeof i==`function`)for(var c=r(i),l=0,u=c.length,d;l<u;l++)d=c[l],!a.call(e,d)&&d!==o&&t(e,d,{get:(e=>i[e]).bind(null,d),enumerable:!(s=n(i,d))||s.enumerable});return e},s=(n,r,s)=>(s=n==null?{}:e(i(n)),o(r||!n||!n.__esModule||!a.call(n,`default`)?t(s,`default`,{value:n,enumerable:!0}):s,n));const c=require("./components.generated-DcMBaOF8.cjs");let l=require("@testing-library/user-event");l=s(l,1);var u=()=>new Promise(e=>{requestAnimationFrame(()=>e())}),d=e=>{let t=l.default.setup(),n=async e=>{e.focus(),e.value=``,e.dispatchEvent(new InputEvent(`input`,{bubbles:!0,composed:!0}))};return{querySelector:(e,t)=>{let n=e.querySelector(t);if(!n)throw Error(`Could not find element: ${t}`);return n},enterShadow(e){if(!e.shadowRoot)throw Error(`Element ${e.outerHTML} does not have a shadow root`);return e.shadowRoot},querySelectorAll:(e,t)=>e?Array.from(e.querySelectorAll(t)):[],nth:(e,t)=>{if(t<0||t>e.length-1)throw Error(`Could not find element with index "${t}". Collection only has "${e.length}" elements.`);return e[t]},userClick:async e=>{await t.click(e),await u()},userFill:async(e,r)=>{await n(e),r&&await t.type(e,r),await u()},userClear:async e=>{await n(e),await u()},userFocus:async e=>{e.focus(),await u()},userBlur:async e=>{e.blur(),(e.tagName===`INPUT`||e.tagName===`TEXTAREA`)&&e.dispatchEvent(new InputEvent(`change`,{bubbles:!0,composed:!0})),await u()},userHover:async e=>{await t.hover(e),await u()},userDragSlider:async(e,t,n,r)=>{if(n.id===`start-thumb`){let t=e;t.startAsNumber=r,t.$emit(`input:start`),t.$emit(`input`)}else if(n.id===`end-thumb`){let t=e;t.endAsNumber=r,t.$emit(`input:end`),t.$emit(`input`)}else{let t=e;t.valueAsNumber=r}await u()},eval:async(e,t,n,r)=>{let i=await t(e,n);await r?.(i)},waitForUpdate:async()=>{await u()},expectEq:(t,n,r)=>{switch(t.type){case`eval`:try{e(t.fn(t.el,t.arg)).toEqual(n)}catch(e){throw e instanceof Error&&(e.message=`${r}\n\nOriginal error: ${e.message}`),e}break;case`count`:e(t.el.length).toEqual(n)}},wrapAction:e=>async function t(...n){try{return await e(...n)}catch(e){throw e instanceof Error&&Error.captureStackTrace(e,t),e}},wrapExpect:e=>function t(...n){try{return e(...n)}catch(e){throw e instanceof Error&&Error.captureStackTrace(e,t),e}},wrapSelector:e=>function t(...n){try{return e(...n)}catch(e){throw e instanceof Error&&Error.captureStackTrace(e,t),e}}}},f=(e,t)=>{let n={rootLocator:t,driver:d(e)};return new c.t(n)};exports.vividDOM=f;
|
package/dist/dom.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { t as e } from "./components.generated-
|
|
1
|
+
import { t as e } from "./components.generated-B-6jlcsc.js";
|
|
2
2
|
import t from "@testing-library/user-event";
|
|
3
3
|
//#region src/drivers/dom.ts
|
|
4
4
|
var n = () => new Promise((e) => {
|
|
@@ -75,9 +75,7 @@ var n = () => new Promise((e) => {
|
|
|
75
75
|
throw e instanceof Error && (e.message = `${r}\n\nOriginal error: ${e.message}`), e;
|
|
76
76
|
}
|
|
77
77
|
break;
|
|
78
|
-
case "count":
|
|
79
|
-
e(t.el.length).toEqual(n);
|
|
80
|
-
break;
|
|
78
|
+
case "count": e(t.el.length).toEqual(n);
|
|
81
79
|
}
|
|
82
80
|
},
|
|
83
81
|
wrapAction: (e) => async function t(...n) {
|
|
@@ -102,9 +100,12 @@ var n = () => new Promise((e) => {
|
|
|
102
100
|
}
|
|
103
101
|
}
|
|
104
102
|
};
|
|
105
|
-
}, i = (t, n) =>
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
103
|
+
}, i = (t, n) => {
|
|
104
|
+
let i = {
|
|
105
|
+
rootLocator: n,
|
|
106
|
+
driver: r(t)
|
|
107
|
+
};
|
|
108
|
+
return new e(i);
|
|
109
|
+
};
|
|
109
110
|
//#endregion
|
|
110
111
|
export { i as vividDOM };
|
package/dist/jsdom-polyfill.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`})
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});let e=require("@vonage/vivid");function t(){HTMLDialogElement.prototype.showModal=function(){this.open=!0,this.setAttribute(`open`,``)},HTMLDialogElement.prototype.close=function(){this.open=!1,this.removeAttribute(`open`)},HTMLElement.prototype.hidePopover=function(){},HTMLElement.prototype.showPopover=function(){},HTMLElement.prototype.scrollIntoView=function(){},Object.defineProperty(Object.getPrototypeOf(e.VwcButtonElement).prototype,"handleUnsupportedDelegatesFocus",{set(){},get(){return()=>void 0}}),window.ResizeObserver=class{observe(){}disconnect(){}}}t(),window.HTMLElement.prototype.scrollIntoView=function(){},window.HTMLElement.prototype.scrollTo=function(){},exports.setDialogPolyfill=t;
|
package/dist/playwright.cjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require("./components.generated-DcMBaOF8.cjs");var t=e=>e.evaluate(()=>new Promise(e=>requestAnimationFrame(()=>e()))),n=e=>({querySelector:(e,t)=>e.locator(t),enterShadow:e=>e,querySelectorAll:(e,t)=>e.locator(t),nth:(e,t)=>e.nth(t),userClick:e=>e.click(),userFill:async(e,n)=>{await t(e),await e.fill(n)},userClear:async e=>{await t(e),await e.clear()},userFocus:e=>e.focus(),userBlur:e=>e.blur(),userHover:e=>e.hover(),userDragSlider:async(e,t,n,r)=>{let i=await n.getAttribute(`id`);await e.evaluate((e,[t,n])=>{if(t===`start-thumb`){let t=e;t.startAsNumber=n,t.$emit(`input:start`),t.$emit(`input`)}else if(t===`end-thumb`){let t=e;t.endAsNumber=n,t.$emit(`input:end`),t.$emit(`input`)}else{let t=e;t.valueAsNumber=n}},[i,r])},eval:async(e,t,n,r)=>{let i=await e.evaluate(t,n);await r?.(i)},waitForUpdate:async e=>{await e.evaluate(()=>new Promise(e=>{requestAnimationFrame(()=>e())}))},expectEq:async(t,n,r)=>{switch(t.type){case`eval`:try{await e(async()=>e(await t.el.evaluate(t.fn,t.arg)).toEqual(n)).toPass()}catch(e){throw e instanceof Error&&(e.message=`${r}\n\nOriginal error: ${e.message}`),e}break;case`count`:await e(t.el).toHaveCount(n)}},wrapAction:e=>async function t(...n){try{return await e(...n)}catch(e){throw e instanceof Error&&Error.captureStackTrace(e,t),e}},wrapExpect:e=>async function t(...n){try{return await e(...n)}catch(e){throw e instanceof Error&&Error.captureStackTrace(e,t),e}},wrapSelector:e=>e}),r=(t,r)=>{let i={rootLocator:t,driver:n(r)};return new e.t(i)};exports.vividPlaywright=r;
|
package/dist/playwright.js
CHANGED
|
@@ -1,13 +1,17 @@
|
|
|
1
|
-
import { t as e } from "./components.generated-
|
|
1
|
+
import { t as e } from "./components.generated-B-6jlcsc.js";
|
|
2
2
|
//#region src/drivers/playwright.ts
|
|
3
|
-
var t = (e) => ({
|
|
3
|
+
var t = (e) => e.evaluate(() => new Promise((e) => requestAnimationFrame(() => e()))), n = (e) => ({
|
|
4
4
|
querySelector: (e, t) => e.locator(t),
|
|
5
5
|
enterShadow: (e) => e,
|
|
6
6
|
querySelectorAll: (e, t) => e.locator(t),
|
|
7
7
|
nth: (e, t) => e.nth(t),
|
|
8
8
|
userClick: (e) => e.click(),
|
|
9
|
-
userFill: (e,
|
|
10
|
-
|
|
9
|
+
userFill: async (e, n) => {
|
|
10
|
+
await t(e), await e.fill(n);
|
|
11
|
+
},
|
|
12
|
+
userClear: async (e) => {
|
|
13
|
+
await t(e), await e.clear();
|
|
14
|
+
},
|
|
11
15
|
userFocus: (e) => e.focus(),
|
|
12
16
|
userBlur: (e) => e.blur(),
|
|
13
17
|
userHover: (e) => e.hover(),
|
|
@@ -44,9 +48,7 @@ var t = (e) => ({
|
|
|
44
48
|
throw e instanceof Error && (e.message = `${r}\n\nOriginal error: ${e.message}`), e;
|
|
45
49
|
}
|
|
46
50
|
break;
|
|
47
|
-
case "count":
|
|
48
|
-
await e(t.el).toHaveCount(n);
|
|
49
|
-
break;
|
|
51
|
+
case "count": await e(t.el).toHaveCount(n);
|
|
50
52
|
}
|
|
51
53
|
},
|
|
52
54
|
wrapAction: (e) => async function t(...n) {
|
|
@@ -64,9 +66,12 @@ var t = (e) => ({
|
|
|
64
66
|
}
|
|
65
67
|
},
|
|
66
68
|
wrapSelector: (e) => e
|
|
67
|
-
}),
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
69
|
+
}), r = (t, r) => {
|
|
70
|
+
let i = {
|
|
71
|
+
rootLocator: t,
|
|
72
|
+
driver: n(r)
|
|
73
|
+
};
|
|
74
|
+
return new e(i);
|
|
75
|
+
};
|
|
71
76
|
//#endregion
|
|
72
|
-
export {
|
|
77
|
+
export { r as vividPlaywright };
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vonage/vivid-test-utils",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.28.0",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "https://github.com/Vonage/vivid-3",
|
|
7
|
+
"directory": "libs/test-utils"
|
|
8
|
+
},
|
|
4
9
|
"type": "module",
|
|
5
10
|
"exports": {
|
|
6
11
|
"./dom": {
|
|
@@ -28,34 +33,34 @@
|
|
|
28
33
|
"dist"
|
|
29
34
|
],
|
|
30
35
|
"dependencies": {
|
|
31
|
-
"@testing-library/user-event": "^14.6.
|
|
36
|
+
"@testing-library/user-event": "^14.6.6",
|
|
32
37
|
"change-case": "^5.4.4",
|
|
33
|
-
"@vonage/vivid": "^5.
|
|
38
|
+
"@vonage/vivid": "^5.28.0"
|
|
34
39
|
},
|
|
35
40
|
"devDependencies": {
|
|
36
41
|
"@playwright/test": "1.57.0",
|
|
37
|
-
"@types/node": "^20.19.
|
|
38
|
-
"@vitejs/plugin-vue": "^6.0.
|
|
39
|
-
"@vue/test-utils": "^2.4.
|
|
40
|
-
"concurrently": "^9.2.
|
|
42
|
+
"@types/node": "^20.19.43",
|
|
43
|
+
"@vitejs/plugin-vue": "^6.0.8",
|
|
44
|
+
"@vue/test-utils": "^2.4.11",
|
|
45
|
+
"concurrently": "^9.2.4",
|
|
41
46
|
"cypress": "15.13.1",
|
|
42
|
-
"eslint": "^10.
|
|
43
|
-
"tsx": "^4.
|
|
47
|
+
"eslint": "^10.8.1",
|
|
48
|
+
"tsx": "^4.23.13",
|
|
44
49
|
"typescript": "5.9.3",
|
|
45
|
-
"vite": "^8.
|
|
50
|
+
"vite": "^8.2.2",
|
|
46
51
|
"vite-plugin-dts": "^4.5.4",
|
|
47
|
-
"vitest": "^4.1.
|
|
48
|
-
"vue": "^3.5.
|
|
52
|
+
"vitest": "^4.1.10",
|
|
53
|
+
"vue": "^3.5.41",
|
|
49
54
|
"wait-on": "^8.0.5",
|
|
50
55
|
"@repo/eslint-config": "1.0.0",
|
|
51
|
-
"@repo/tools": "1.0.0",
|
|
52
56
|
"@repo/internal-test-utils": "1.0.0",
|
|
53
|
-
"@repo/
|
|
57
|
+
"@repo/tools": "1.0.0",
|
|
54
58
|
"@repo/metadata-extractor": "1.0.0",
|
|
55
|
-
"@repo/
|
|
59
|
+
"@repo/typescript-config": "1.0.0",
|
|
56
60
|
"@repo/vitest-config": "1.0.0",
|
|
57
|
-
"@repo/
|
|
58
|
-
"@vonage/vivid-vue": "5.
|
|
61
|
+
"@repo/vite-config": "1.0.0",
|
|
62
|
+
"@vonage/vivid-vue": "5.28.0",
|
|
63
|
+
"@repo/wrapper-gen": "1.0.0"
|
|
59
64
|
},
|
|
60
65
|
"scripts": {
|
|
61
66
|
"prebuild": "tsx scripts/codegen.ts",
|