@vonage/vivid-test-utils 5.25.0 → 5.27.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 +50 -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 +9 -8
- package/package.json +19 -14
|
@@ -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,7 +215,8 @@ 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';
|
|
@@ -246,7 +247,7 @@ export declare class BadgeExpectations<D extends DriverT> {
|
|
|
246
247
|
toHaveIcon: (value: any) => D["expectReturn"];
|
|
247
248
|
}
|
|
248
249
|
type BannerProps = {
|
|
249
|
-
connotation: '
|
|
250
|
+
connotation: 'alert' | 'information' | 'success' | 'warning' | 'announcement';
|
|
250
251
|
dismissAriaLabel: string;
|
|
251
252
|
icon: IconId;
|
|
252
253
|
removable: boolean;
|
|
@@ -336,7 +337,7 @@ type ButtonProps = {
|
|
|
336
337
|
active: boolean;
|
|
337
338
|
appearance: 'ghost' | 'filled' | 'outlined' | 'ghost-light' | 'outlined-light';
|
|
338
339
|
autofocus: boolean;
|
|
339
|
-
connotation: 'alert' | 'accent' | '
|
|
340
|
+
connotation: 'alert' | 'accent' | 'success' | 'announcement' | 'cta';
|
|
340
341
|
disabled: boolean;
|
|
341
342
|
download: string;
|
|
342
343
|
dropdownIndicator: boolean;
|
|
@@ -424,7 +425,7 @@ export declare class CalendarExpectations<D extends DriverT> {
|
|
|
424
425
|
}
|
|
425
426
|
type CalendarEventProps = {
|
|
426
427
|
appearance: 'filled' | 'duotone' | 'subtle';
|
|
427
|
-
connotation: 'alert' | 'accent' | '
|
|
428
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement' | 'cta';
|
|
428
429
|
description: string;
|
|
429
430
|
duration: number;
|
|
430
431
|
heading: string;
|
|
@@ -1091,7 +1092,7 @@ export declare class DividerExpectations<D extends DriverT> {
|
|
|
1091
1092
|
toHaveProp: <T extends keyof DividerProps>(propName: T, value: DividerProps[T]) => D["expectReturn"];
|
|
1092
1093
|
}
|
|
1093
1094
|
type EmptyStateProps = {
|
|
1094
|
-
connotation: 'alert' | 'accent' | '
|
|
1095
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'cta';
|
|
1095
1096
|
headline: string;
|
|
1096
1097
|
icon: IconId;
|
|
1097
1098
|
iconDecoration: 'filled' | 'outlined';
|
|
@@ -1120,7 +1121,7 @@ export declare class EmptyStateExpectations<D extends DriverT> {
|
|
|
1120
1121
|
}
|
|
1121
1122
|
type FabProps = {
|
|
1122
1123
|
autofocus: boolean;
|
|
1123
|
-
connotation: 'accent' | '
|
|
1124
|
+
connotation: 'accent' | 'announcement' | 'cta';
|
|
1124
1125
|
disabled: boolean;
|
|
1125
1126
|
form: string;
|
|
1126
1127
|
formaction: string;
|
|
@@ -1210,7 +1211,7 @@ export declare class FilePickerExpectations<D extends DriverT> {
|
|
|
1210
1211
|
type FlagProps = {
|
|
1211
1212
|
code: string;
|
|
1212
1213
|
label: string;
|
|
1213
|
-
size: 0 |
|
|
1214
|
+
size: 0 | 2 | 4 | 5 | 3 | 1 | -1 | -6 | -5 | -4 | -3 | -2;
|
|
1214
1215
|
};
|
|
1215
1216
|
export declare class FlagWrapper<D extends DriverT> extends BaseWrapper<D, VwcFlagElement> {
|
|
1216
1217
|
type: "flag";
|
|
@@ -1235,6 +1236,31 @@ export declare class FlagExpectations<D extends DriverT> {
|
|
|
1235
1236
|
toHaveProp: <T extends keyof FlagProps>(propName: T, value: FlagProps[T]) => D["expectReturn"];
|
|
1236
1237
|
toHaveCode: (value: any) => D["expectReturn"];
|
|
1237
1238
|
}
|
|
1239
|
+
type FormFieldProps = {
|
|
1240
|
+
state: 'success' | 'error';
|
|
1241
|
+
};
|
|
1242
|
+
export declare class FormFieldWrapper<D extends DriverT> extends BaseWrapper<D, VwcFormFieldElement> {
|
|
1243
|
+
type: "formField";
|
|
1244
|
+
componentInfo: {
|
|
1245
|
+
name: string;
|
|
1246
|
+
};
|
|
1247
|
+
blur: () => D["actionReturn"];
|
|
1248
|
+
focus: () => D["actionReturn"];
|
|
1249
|
+
hover: () => D["actionReturn"];
|
|
1250
|
+
}
|
|
1251
|
+
export declare class FormField<D extends DriverT> extends BaseComponent<D, FormFieldWrapper<D>> {
|
|
1252
|
+
componentInfo: {
|
|
1253
|
+
name: string;
|
|
1254
|
+
};
|
|
1255
|
+
wrap(locator: D['locator']): FormFieldWrapper<D>;
|
|
1256
|
+
byTestId: (id: string) => FormFieldWrapper<D>;
|
|
1257
|
+
}
|
|
1258
|
+
export declare class FormFieldExpectations<D extends DriverT> {
|
|
1259
|
+
private readonly ctx;
|
|
1260
|
+
private readonly wrapper;
|
|
1261
|
+
constructor(ctx: Context<D>, wrapper: FormFieldWrapper<D>);
|
|
1262
|
+
toHaveProp: <T extends keyof FormFieldProps>(propName: T, value: FormFieldProps[T]) => D["expectReturn"];
|
|
1263
|
+
}
|
|
1238
1264
|
type HeaderProps = {
|
|
1239
1265
|
alternate: boolean;
|
|
1240
1266
|
elevationShadow: boolean;
|
|
@@ -1262,10 +1288,10 @@ export declare class HeaderExpectations<D extends DriverT> {
|
|
|
1262
1288
|
toHaveProp: <T extends keyof HeaderProps>(propName: T, value: HeaderProps[T]) => D["expectReturn"];
|
|
1263
1289
|
}
|
|
1264
1290
|
type IconProps = {
|
|
1265
|
-
connotation: 'alert' | 'accent' | '
|
|
1291
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement' | 'cta';
|
|
1266
1292
|
label: string;
|
|
1267
1293
|
name: IconId;
|
|
1268
|
-
size: 0 |
|
|
1294
|
+
size: 0 | 2 | 4 | 5 | 3 | 1 | -1 | -6 | -5 | -4 | -3 | -2;
|
|
1269
1295
|
};
|
|
1270
1296
|
export declare class IconWrapper<D extends DriverT> extends BaseWrapper<D, VwcIconElement> {
|
|
1271
1297
|
type: "icon";
|
|
@@ -1294,7 +1320,7 @@ type KbdKeyProps = {
|
|
|
1294
1320
|
appearance: 'outlined' | 'subtle' | 'dropshadow';
|
|
1295
1321
|
keyboard: 'auto' | 'standard' | 'apple';
|
|
1296
1322
|
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' | '
|
|
1323
|
+
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
1324
|
size: 'condensed' | 'normal' | 'expanded' | 'super-condensed';
|
|
1299
1325
|
};
|
|
1300
1326
|
export declare class KbdKeyWrapper<D extends DriverT> extends BaseWrapper<D, VwcKbdKeyElement> {
|
|
@@ -1578,7 +1604,7 @@ export declare class NavItemExpectations<D extends DriverT> {
|
|
|
1578
1604
|
toHaveIcon: (value: any) => D["expectReturn"];
|
|
1579
1605
|
}
|
|
1580
1606
|
type NoteProps = {
|
|
1581
|
-
connotation: '
|
|
1607
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement';
|
|
1582
1608
|
headline: string;
|
|
1583
1609
|
icon: IconId;
|
|
1584
1610
|
};
|
|
@@ -1817,7 +1843,7 @@ export declare class PopoverExpectations<D extends DriverT> {
|
|
|
1817
1843
|
toHaveProp: <T extends keyof PopoverProps>(propName: T, value: PopoverProps[T]) => D["expectReturn"];
|
|
1818
1844
|
}
|
|
1819
1845
|
type ProgressProps = {
|
|
1820
|
-
connotation: '
|
|
1846
|
+
connotation: 'alert' | 'accent' | 'success' | 'cta' | 'pacific';
|
|
1821
1847
|
max: number;
|
|
1822
1848
|
min: number;
|
|
1823
1849
|
paused: boolean;
|
|
@@ -1848,11 +1874,11 @@ export declare class ProgressExpectations<D extends DriverT> {
|
|
|
1848
1874
|
toHaveProp: <T extends keyof ProgressProps>(propName: T, value: ProgressProps[T]) => D["expectReturn"];
|
|
1849
1875
|
}
|
|
1850
1876
|
type ProgressRingProps = {
|
|
1851
|
-
connotation: '
|
|
1877
|
+
connotation: 'alert' | 'accent' | 'success' | 'cta';
|
|
1852
1878
|
max: number;
|
|
1853
1879
|
min: number;
|
|
1854
1880
|
paused: boolean;
|
|
1855
|
-
size: 0 |
|
|
1881
|
+
size: 0 | 2 | 4 | 5 | 3 | 1 | -1 | -6 | -5 | -4 | -3 | -2;
|
|
1856
1882
|
value: number;
|
|
1857
1883
|
};
|
|
1858
1884
|
export declare class ProgressRingWrapper<D extends DriverT> extends BaseWrapper<D, VwcProgressRingElement> {
|
|
@@ -2004,6 +2030,7 @@ export declare class RangeSliderExpectations<D extends DriverT> {
|
|
|
2004
2030
|
toHaveVisibleError: (value: any) => D["expectReturn"];
|
|
2005
2031
|
}
|
|
2006
2032
|
type RichTextEditorProps = {
|
|
2033
|
+
appearance: 'fieldset';
|
|
2007
2034
|
instance: RteInstance;
|
|
2008
2035
|
};
|
|
2009
2036
|
export declare class RichTextEditorWrapper<D extends DriverT> extends BaseWrapper<D, VwcRichTextEditorElement> {
|
|
@@ -2317,7 +2344,7 @@ export declare class SliderExpectations<D extends DriverT> {
|
|
|
2317
2344
|
}
|
|
2318
2345
|
type SplitButtonProps = {
|
|
2319
2346
|
appearance: 'ghost' | 'filled' | 'outlined' | 'outlined-light';
|
|
2320
|
-
connotation: 'alert' | 'accent' | '
|
|
2347
|
+
connotation: 'alert' | 'accent' | 'success' | 'announcement' | 'cta';
|
|
2321
2348
|
disabled: boolean;
|
|
2322
2349
|
icon: IconId;
|
|
2323
2350
|
indicatorAriaLabel: string;
|
|
@@ -2353,7 +2380,7 @@ export declare class SplitButtonExpectations<D extends DriverT> {
|
|
|
2353
2380
|
toHaveIcon: (value: any) => D["expectReturn"];
|
|
2354
2381
|
}
|
|
2355
2382
|
type StatusProps = {
|
|
2356
|
-
connotation: 'alert' | '
|
|
2383
|
+
connotation: 'alert' | 'information' | 'success' | 'warning';
|
|
2357
2384
|
icon: IconId;
|
|
2358
2385
|
status: string;
|
|
2359
2386
|
};
|
|
@@ -2382,7 +2409,7 @@ export declare class StatusExpectations<D extends DriverT> {
|
|
|
2382
2409
|
}
|
|
2383
2410
|
type SwitchProps = {
|
|
2384
2411
|
checked: boolean;
|
|
2385
|
-
connotation: '
|
|
2412
|
+
connotation: 'alert' | 'accent' | 'success' | 'announcement' | 'cta';
|
|
2386
2413
|
defaultChecked: boolean;
|
|
2387
2414
|
disabled: boolean;
|
|
2388
2415
|
initialValue: string;
|
|
@@ -2669,7 +2696,7 @@ export declare class TabsExpectations<D extends DriverT> {
|
|
|
2669
2696
|
}
|
|
2670
2697
|
type TagProps = {
|
|
2671
2698
|
appearance: 'duotone' | 'subtle' | 'subtle-light';
|
|
2672
|
-
connotation: 'alert' | 'accent' | '
|
|
2699
|
+
connotation: 'alert' | 'accent' | 'information' | 'success' | 'warning' | 'announcement' | 'cta';
|
|
2673
2700
|
disabled: boolean;
|
|
2674
2701
|
icon: IconId;
|
|
2675
2702
|
label: string;
|
|
@@ -3069,6 +3096,7 @@ type Expectations<D extends DriverT> = {
|
|
|
3069
3096
|
fab: FabExpectations<D>;
|
|
3070
3097
|
filePicker: FilePickerExpectations<D>;
|
|
3071
3098
|
flag: FlagExpectations<D>;
|
|
3099
|
+
formField: FormFieldExpectations<D>;
|
|
3072
3100
|
header: HeaderExpectations<D>;
|
|
3073
3101
|
icon: IconExpectations<D>;
|
|
3074
3102
|
kbdKey: KbdKeyExpectations<D>;
|
|
@@ -3164,6 +3192,7 @@ export declare class VividWrapper<D extends DriverT> {
|
|
|
3164
3192
|
fab: Fab<D>;
|
|
3165
3193
|
filePicker: FilePicker<D>;
|
|
3166
3194
|
flag: Flag<D>;
|
|
3195
|
+
formField: FormField<D>;
|
|
3167
3196
|
header: Header<D>;
|
|
3168
3197
|
icon: Icon<D>;
|
|
3169
3198
|
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=>({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:(e,t)=>e.fill(t),userClear:e=>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}),n=(n,r)=>{let i={rootLocator:n,driver:t(r)};return new e.t(i)};exports.vividPlaywright=n;
|
package/dist/playwright.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/playwright.ts
|
|
3
3
|
var t = (e) => ({
|
|
4
4
|
querySelector: (e, t) => e.locator(t),
|
|
@@ -44,9 +44,7 @@ var t = (e) => ({
|
|
|
44
44
|
throw e instanceof Error && (e.message = `${r}\n\nOriginal error: ${e.message}`), e;
|
|
45
45
|
}
|
|
46
46
|
break;
|
|
47
|
-
case "count":
|
|
48
|
-
await e(t.el).toHaveCount(n);
|
|
49
|
-
break;
|
|
47
|
+
case "count": await e(t.el).toHaveCount(n);
|
|
50
48
|
}
|
|
51
49
|
},
|
|
52
50
|
wrapAction: (e) => async function t(...n) {
|
|
@@ -64,9 +62,12 @@ var t = (e) => ({
|
|
|
64
62
|
}
|
|
65
63
|
},
|
|
66
64
|
wrapSelector: (e) => e
|
|
67
|
-
}), n = (n, r) =>
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
65
|
+
}), n = (n, r) => {
|
|
66
|
+
let i = {
|
|
67
|
+
rootLocator: n,
|
|
68
|
+
driver: t(r)
|
|
69
|
+
};
|
|
70
|
+
return new e(i);
|
|
71
|
+
};
|
|
71
72
|
//#endregion
|
|
72
73
|
export { n 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.27.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.3",
|
|
32
37
|
"change-case": "^5.4.4",
|
|
33
|
-
"@vonage/vivid": "^5.
|
|
38
|
+
"@vonage/vivid": "^5.27.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.12",
|
|
44
49
|
"typescript": "5.9.3",
|
|
45
|
-
"vite": "^8.
|
|
50
|
+
"vite": "^8.2.1",
|
|
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
57
|
"@repo/typescript-config": "1.0.0",
|
|
58
|
+
"@repo/tools": "1.0.0",
|
|
54
59
|
"@repo/metadata-extractor": "1.0.0",
|
|
55
60
|
"@repo/vite-config": "1.0.0",
|
|
56
61
|
"@repo/vitest-config": "1.0.0",
|
|
57
62
|
"@repo/wrapper-gen": "1.0.0",
|
|
58
|
-
"@vonage/vivid-vue": "5.
|
|
63
|
+
"@vonage/vivid-vue": "5.27.0"
|
|
59
64
|
},
|
|
60
65
|
"scripts": {
|
|
61
66
|
"prebuild": "tsx scripts/codegen.ts",
|