@rind-ui/testing 0.4.0 → 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{adapter-C3LQTPFi.d.mts → adapter-BcAjuBjR.d.mts} +2 -0
- package/dist/{dom-BH8CVBb2.d.mts → dom-BLTLsBAu.d.mts} +1 -2
- package/dist/{dom-DjurZVd0.mjs → dom-D9Da5Fku.mjs} +112 -1
- package/dist/dom.d.mts +1 -1
- package/dist/dom.mjs +1 -1
- package/dist/index.d.mts +1943 -239
- package/dist/index.mjs +93 -6
- package/dist/inpage.iife.js +1 -7
- package/dist/{playwright-D2coDhsT.d.mts → playwright-CnXZVExy.d.mts} +1 -1
- package/dist/{playwright-BbVj53fU.mjs → playwright-D79Husn_.mjs} +83 -13
- package/dist/playwright.d.mts +1 -1
- package/dist/playwright.mjs +1 -1
- package/dist/setup.mjs +1 -1
- package/package.json +10 -6
package/dist/index.mjs
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { a as isEnvFactory, i as hostedPartName, n as UntilTimeout, o as mirror } from "./compose-m76ER6GL.mjs";
|
|
2
|
-
import { a as navigationLog, i as interceptNativeNavigation, n as installErrorLog, o as installAnnouncementLog, r as fakeRouter, s as recordingAnnouncer, t as domEnv } from "./dom-
|
|
3
|
-
import { n as playwrightEnv, r as watchPageErrors, t as isPage } from "./playwright-
|
|
4
|
-
import { accordionContract, alertContract, alertDialogRoleContract, avatarContract, badgeContract, breadcrumbsContract, buttonContract, calendarContract, checkboxContract, checkboxGroupContract, codeBlockContract, collapsibleContract, colorPickerContract, comboboxContract, contextMenuContract, createService, dateFieldContract, dateRangeFieldContract, dialogContract, drawerContract, fieldContract, fieldsetContract, formContract, gridListContract, headingContract, hoverCardContract, imageContract, inlineComboboxContract, labelContract, linkContract, listboxContract, menuContract, menubarContract, menubarMenuContract, meterContract, modalPopoverContract, modalTourContract, navigationMenuContract, nonModalContextMenuContract, nonModalDialogContract, nonModalDrawerContract, nonModalMenuContract, nonModalMenubarMenuContract, numberInputContract, paginationContract, pinInputContract, platforms, platforms as platforms$1, popoverContract, progressContract, promptInputContract, qrCodeContractWith, quirkActive, radioGroupContract, ratingContract, scrollAreaContract, segmentedControlContract, selectContract, separatorContract, separatorContractFor, skeletonContract, sliderContract, splitterContract, switchContract, tabsContract, tagGroupContract, tagsInputContract, textFieldContract, toastContract, toasterContract, toggleContract, toggleGroupContract, toolbarContract, tooltipContract, tourContract, treeViewContract, withEngine, withEngine as withEngine$1 } from "@rind-ui/core";
|
|
2
|
+
import { a as navigationLog, i as interceptNativeNavigation, n as installErrorLog, o as installAnnouncementLog, r as fakeRouter, s as recordingAnnouncer, t as domEnv } from "./dom-D9Da5Fku.mjs";
|
|
3
|
+
import { n as playwrightEnv, r as watchPageErrors, t as isPage } from "./playwright-D79Husn_.mjs";
|
|
4
|
+
import { accordionContract, alertContract, alertDialogRoleContract, avatarContract, badgeContract, breadcrumbsContract, buttonContract, calendarContract, checkboxContract, checkboxGroupContract, clipboardContract, codeBlockContract, collapsibleContract, colorPickerContract, comboboxContract, contextMenuContract, createService, dateFieldContract, dateRangeFieldContract, dialogContract, drawerContract, fieldContract, fieldsetContract, fileUploadContract, formContract, gridListContract, headingContract, hoverCardContract, imageContract, imageCropperContract, imageViewerContract, inlineComboboxContract, kbdContract, labelContract, linkContract, listboxContract, marqueeContract, menuContract, menubarContract, menubarMenuContract, messageThreadContract, meterContract, modalPopoverContract, modalTourContract, navigationMenuContract, nonModalContextMenuContract, nonModalDialogContract, nonModalDrawerContract, nonModalMenuContract, nonModalMenubarMenuContract, numberInputContract, paginationContract, pinInputContract, platforms, platforms as platforms$1, popoverContract, progressContract, promptInputContract, qrCodeContractWith, quirkActive, radioGroupContract, ratingContract, reasoningContract, scrollAreaContract, segmentedControlContract, selectContract, separatorContract, separatorContractFor, skeletonContract, sliderContract, sortableContract, splitterContract, stepperContract, streamingMessageContract, switchContract, tableContract, tableOfContentsContract, tabsContract, tagGroupContract, tagsInputContract, textFieldContract, timelineContract, toastContract, toasterContract, toggleContract, toggleGroupContract, toolbarContract, tooltipContract, tourContract, treeViewContract, withEngine, withEngine as withEngine$1 } from "@rind-ui/core";
|
|
5
5
|
import { parseQrPath } from "@rind-ui/core/qr";
|
|
6
6
|
import { colorAreaContract, colorChannelFieldContract, colorFieldContract, colorSliderContract, colorSwatchContract, colorSwatchPickerContract, pickSwatch } from "@rind-ui/core/internal";
|
|
7
7
|
//#region src/accordion-invariants.ts
|
|
@@ -329,6 +329,12 @@ function getCheckboxGroup(target, anchor, options) {
|
|
|
329
329
|
return createDriverWith(checkboxGroupContract, target, [anchor], options);
|
|
330
330
|
}
|
|
331
331
|
//#endregion
|
|
332
|
+
//#region src/components/clipboard.ts
|
|
333
|
+
/** A driver for the Clipboard labelled `label`, or the only one in `target`. */
|
|
334
|
+
function getClipboard(target, anchor, options) {
|
|
335
|
+
return createDriverWith(clipboardContract, target, anchor ? [anchor] : [], options);
|
|
336
|
+
}
|
|
337
|
+
//#endregion
|
|
332
338
|
//#region src/components/code-block.ts
|
|
333
339
|
/** A driver for the Code Block titled `title`, or the only one in `target`. */
|
|
334
340
|
function getCodeBlock(target, anchor, options) {
|
|
@@ -484,6 +490,12 @@ function getFieldset(target, anchor, options) {
|
|
|
484
490
|
return createDriverWith(fieldsetContract, target, [anchor], options);
|
|
485
491
|
}
|
|
486
492
|
//#endregion
|
|
493
|
+
//#region src/components/file-upload.ts
|
|
494
|
+
/** A driver for the File Upload whose Trigger is named `name`, or the only one in `target`. */
|
|
495
|
+
function getFileUpload(target, anchor, options) {
|
|
496
|
+
return createDriverWith(fileUploadContract, target, anchor ? [anchor] : [], options);
|
|
497
|
+
}
|
|
498
|
+
//#endregion
|
|
487
499
|
//#region src/components/form.ts
|
|
488
500
|
/** A driver for the Form named `name`: `submit`, `reset`, `validate`, and its queries. */
|
|
489
501
|
function getForm(target, anchor, options) {
|
|
@@ -519,6 +531,24 @@ function getImage(target, anchor = {}, options) {
|
|
|
519
531
|
return createDriverWith(imageContract, within ?? target, [name === void 0 ? {} : { name }], options);
|
|
520
532
|
}
|
|
521
533
|
//#endregion
|
|
534
|
+
//#region src/components/image-cropper.ts
|
|
535
|
+
/** A driver for the Image Cropper named `name`, or the only one in `target`. */
|
|
536
|
+
function getImageCropper(target, anchor, options) {
|
|
537
|
+
return createDriverWith(imageCropperContract, target, anchor ? [anchor] : [], options);
|
|
538
|
+
}
|
|
539
|
+
//#endregion
|
|
540
|
+
//#region src/components/image-viewer.ts
|
|
541
|
+
/** A driver for the Image Viewer named `name` (its image's alt), or the only one in `target`. */
|
|
542
|
+
function getImageViewer(target, anchor, options) {
|
|
543
|
+
return createDriverWith(imageViewerContract, target, anchor ? [anchor] : [], options);
|
|
544
|
+
}
|
|
545
|
+
//#endregion
|
|
546
|
+
//#region src/components/kbd.ts
|
|
547
|
+
/** A driver for the Kbd whose text matches `text`, or the only one in `target`. */
|
|
548
|
+
function getKbd(target, anchor = {}, options) {
|
|
549
|
+
return createDriverWith(kbdContract, target, [anchor], options);
|
|
550
|
+
}
|
|
551
|
+
//#endregion
|
|
522
552
|
//#region src/components/label.ts
|
|
523
553
|
/** A driver for the Label with exactly this text: `click`, `doubleClick` and queries. */
|
|
524
554
|
function getLabel(target, anchor, options) {
|
|
@@ -537,6 +567,12 @@ function getListbox(target, anchor, options) {
|
|
|
537
567
|
return createDriverWith(listboxContract, target, [anchor], options);
|
|
538
568
|
}
|
|
539
569
|
//#endregion
|
|
570
|
+
//#region src/components/marquee.ts
|
|
571
|
+
/** A driver for the Marquee named `name` (role `region` unless given), or the only one. */
|
|
572
|
+
function getMarquee(target, anchor, options) {
|
|
573
|
+
return createDriverWith(marqueeContract, target, anchor ? [anchor] : [], options);
|
|
574
|
+
}
|
|
575
|
+
//#endregion
|
|
540
576
|
//#region src/components/menu.ts
|
|
541
577
|
/**
|
|
542
578
|
* A driver for the Menu opened by the trigger named `name` (a closed menu has no content
|
|
@@ -559,6 +595,12 @@ function getMenubar(target, anchor, options) {
|
|
|
559
595
|
return Object.assign(bar, { menu: (item) => createDriverWith(menus, target, [{ name: item }], options) });
|
|
560
596
|
}
|
|
561
597
|
//#endregion
|
|
598
|
+
//#region src/components/message-thread.ts
|
|
599
|
+
/** A driver for the Message Thread whose feed is named `name`, or the only one in `target`. */
|
|
600
|
+
function getMessageThread(target, anchor, options) {
|
|
601
|
+
return createDriverWith(messageThreadContract, target, anchor ? [anchor] : [], options);
|
|
602
|
+
}
|
|
603
|
+
//#endregion
|
|
562
604
|
//#region src/components/meter.ts
|
|
563
605
|
/** A driver for the Meter named `name` (role `meter`). */
|
|
564
606
|
function getMeter(target, anchor, options) {
|
|
@@ -2521,6 +2563,12 @@ function getRating(target, anchor, options) {
|
|
|
2521
2563
|
return createDriverWith(ratingContract, target, [anchor], options);
|
|
2522
2564
|
}
|
|
2523
2565
|
//#endregion
|
|
2566
|
+
//#region src/components/reasoning.ts
|
|
2567
|
+
/** A driver for the Reasoning whose Trigger is named `name`, or the only one in `target`. */
|
|
2568
|
+
function getReasoning(target, anchor, options) {
|
|
2569
|
+
return createDriverWith(reasoningContract, target, anchor ? [anchor] : [], options);
|
|
2570
|
+
}
|
|
2571
|
+
//#endregion
|
|
2524
2572
|
//#region src/components/scroll-area.ts
|
|
2525
2573
|
/**
|
|
2526
2574
|
* A driver for a Scroll Area: the one whose Viewport is the region named `name`, or the one
|
|
@@ -2568,18 +2616,48 @@ function getSlider(target, anchor, options) {
|
|
|
2568
2616
|
return createDriverWith(sliderContract, target, [anchor], options);
|
|
2569
2617
|
}
|
|
2570
2618
|
//#endregion
|
|
2619
|
+
//#region src/components/sortable.ts
|
|
2620
|
+
/** A driver for the Sortable list named `name`, or the only one in `target`. */
|
|
2621
|
+
function getSortable(target, anchor, options) {
|
|
2622
|
+
return createDriverWith(sortableContract, target, anchor ? [anchor] : [], options);
|
|
2623
|
+
}
|
|
2624
|
+
//#endregion
|
|
2571
2625
|
//#region src/components/splitter.ts
|
|
2572
2626
|
/** A driver for the Splitter one of whose handles is named `name`. */
|
|
2573
2627
|
function getSplitter(target, anchor, options) {
|
|
2574
2628
|
return createDriverWith(splitterContract, target, [anchor], options);
|
|
2575
2629
|
}
|
|
2576
2630
|
//#endregion
|
|
2631
|
+
//#region src/components/stepper.ts
|
|
2632
|
+
/** A driver for the Stepper named `name`, or the only one in `target`. */
|
|
2633
|
+
function getStepper(target, anchor, options) {
|
|
2634
|
+
return createDriverWith(stepperContract, target, anchor ? [anchor] : [], options);
|
|
2635
|
+
}
|
|
2636
|
+
//#endregion
|
|
2637
|
+
//#region src/components/streaming-message.ts
|
|
2638
|
+
/** A driver for the Streaming Message named `name` (role `article` unless given), or the only one. */
|
|
2639
|
+
function getStreamingMessage(target, anchor, options) {
|
|
2640
|
+
return createDriverWith(streamingMessageContract, target, anchor ? [anchor] : [], options);
|
|
2641
|
+
}
|
|
2642
|
+
//#endregion
|
|
2577
2643
|
//#region src/components/switch.ts
|
|
2578
2644
|
/** A driver for the Switch named `name`. */
|
|
2579
2645
|
function getSwitch(target, anchor, options) {
|
|
2580
2646
|
return createDriverWith(switchContract, target, [anchor], options);
|
|
2581
2647
|
}
|
|
2582
2648
|
//#endregion
|
|
2649
|
+
//#region src/components/table.ts
|
|
2650
|
+
/** A driver for the Table named `name`, or the only one in `target`. */
|
|
2651
|
+
function getTable(target, anchor, options) {
|
|
2652
|
+
return createDriverWith(tableContract, target, anchor ? [anchor] : [], options);
|
|
2653
|
+
}
|
|
2654
|
+
//#endregion
|
|
2655
|
+
//#region src/components/table-of-contents.ts
|
|
2656
|
+
/** A driver for the Table of Contents named `name`, or the only one in `target`. */
|
|
2657
|
+
function getTableOfContents(target, anchor, options) {
|
|
2658
|
+
return createDriverWith(tableOfContentsContract, target, anchor ? [anchor] : [], options);
|
|
2659
|
+
}
|
|
2660
|
+
//#endregion
|
|
2583
2661
|
//#region src/components/tabs.ts
|
|
2584
2662
|
/** A driver for the Tabs (tab list) named `name`. */
|
|
2585
2663
|
function getTabs(target, anchor, options) {
|
|
@@ -2604,6 +2682,12 @@ function getTextField(target, anchor, options) {
|
|
|
2604
2682
|
return createDriverWith(textFieldContract, target, [anchor], options);
|
|
2605
2683
|
}
|
|
2606
2684
|
//#endregion
|
|
2685
|
+
//#region src/components/timeline.ts
|
|
2686
|
+
/** A driver for the Timeline named `name`, or the only one in `target`. */
|
|
2687
|
+
function getTimeline(target, anchor = {}, options) {
|
|
2688
|
+
return createDriverWith(timelineContract, target, [anchor], options);
|
|
2689
|
+
}
|
|
2690
|
+
//#endregion
|
|
2607
2691
|
//#region src/components/toast.ts
|
|
2608
2692
|
/** A driver for the toaster region named `name` ("Notifications (F6)"): enter, leave, queries. */
|
|
2609
2693
|
function getToaster(target, anchor, options) {
|
|
@@ -3119,7 +3203,8 @@ const hiddenFocus = (f) => {
|
|
|
3119
3203
|
if (focused?.inInert) out.push(`focus is on ${focused.describe}, inside inert`);
|
|
3120
3204
|
for (const el of f.after.elements) {
|
|
3121
3205
|
const formInput = el.attrs["data-scope"] !== void 0 && el.attrs["data-part"] === "hidden-input" && el.attrs["tabindex"] === "-1";
|
|
3122
|
-
|
|
3206
|
+
const copy = el.inCopy && el.attrs["tabindex"] === "-1";
|
|
3207
|
+
if (el.focusable && el.inAriaHidden && !el.hidden && !formInput && !copy) out.push(`${el.describe} is focusable inside aria-hidden`);
|
|
3123
3208
|
}
|
|
3124
3209
|
return out;
|
|
3125
3210
|
};
|
|
@@ -4275,7 +4360,8 @@ async function runPath(contract, graph, { path, notTaken }, ctx, options, args,
|
|
|
4275
4360
|
modality,
|
|
4276
4361
|
stepModality,
|
|
4277
4362
|
props: oracle.props,
|
|
4278
|
-
values: oracle.service.view().values
|
|
4363
|
+
values: oracle.service.view().values,
|
|
4364
|
+
context: oracle.service.getSnapshot().context
|
|
4279
4365
|
}).catch((e) => e instanceof Error ? e.message : String(e));
|
|
4280
4366
|
if (typeof result === "string" && result !== "") problems.push(`${inv.name}: ${result}`);
|
|
4281
4367
|
}
|
|
@@ -4806,6 +4892,7 @@ function virtualClock() {
|
|
|
4806
4892
|
let fired = 0;
|
|
4807
4893
|
const timers = /* @__PURE__ */ new Map();
|
|
4808
4894
|
return {
|
|
4895
|
+
clock: { now: () => now },
|
|
4809
4896
|
scheduler: {
|
|
4810
4897
|
setTimeout: (callback, ms) => {
|
|
4811
4898
|
const id = ++seq;
|
|
@@ -4894,4 +4981,4 @@ function allowRindWarning(pattern) {
|
|
|
4894
4981
|
state().allowed.push(pattern);
|
|
4895
4982
|
}
|
|
4896
4983
|
//#endregion
|
|
4897
|
-
export { QrDecodeError, accordionStepInvariants, allowRindWarning, checkGeneric, checkboxStepInvariants, correctBlock, createDriver, createDriverWith, currentRun, dateFieldStepInvariants, dateRangeStepInvariants, decodeQr, domEnv, englishLeaks, expectRindWarning, fakeClipboard, fakeDelayGroup, fakeHoverIntent, fakePositioning, fakeRouter, fakeVisibility, fixedDateClock, formStepInvariants, genericInvariants, getAccordion, getAlert, getAvatar, getBadge, getBreadcrumbs, getButton, getCalendar, getCheckbox, getCheckboxGroup, getCodeBlock, getCollapsible, getColorPicker, getCombobox, getContextMenu, getDateField, getDialog, getDrawer, getField, getFieldset, getForm, getGridList, getHeading, getHoverCard, getImage, getLabel, getLink, getListbox, getMenu, getMenubar, getMeter, getNavigationMenu, getNumberInput, getPagination, getPinInput, getPopover, getProgress, getPromptInput, getQrCode, getRadioGroup, getRating, getScrollArea, getSegmentedControl, getSelect, getSeparator, getSkeleton, getSlider, getSplitter, getSwitch, getTabs, getTagGroup, getTagsInput, getTextField, getToast, getToaster, getToggle, getToggleGroup, getToolbar, getTooltip, getTour, getTreeView, installAnnouncementLog, interceptNativeNavigation, layoutInvariant, liveAnnouncements, machinePaths, missingAriaLines, missingStateStories, navigationLog, numberInputStepInvariants, parseQrPath, paths, platforms, playwrightEnv, pseudo, pseudoMessages, qrCodeDecodingContract, recordingAnnouncer, runAction, sliderStepInvariants, spokenLog, switchStepInvariants, testMachine, textFieldKeyStepInvariants, textFieldStepInvariants, toGraph, traitInvariants, uncovered, virtualClock, withEngine };
|
|
4984
|
+
export { QrDecodeError, accordionStepInvariants, allowRindWarning, checkGeneric, checkboxStepInvariants, correctBlock, createDriver, createDriverWith, currentRun, dateFieldStepInvariants, dateRangeStepInvariants, decodeQr, domEnv, englishLeaks, expectRindWarning, fakeClipboard, fakeDelayGroup, fakeHoverIntent, fakePositioning, fakeRouter, fakeVisibility, fixedDateClock, formStepInvariants, genericInvariants, getAccordion, getAlert, getAvatar, getBadge, getBreadcrumbs, getButton, getCalendar, getCheckbox, getCheckboxGroup, getClipboard, getCodeBlock, getCollapsible, getColorPicker, getCombobox, getContextMenu, getDateField, getDialog, getDrawer, getField, getFieldset, getFileUpload, getForm, getGridList, getHeading, getHoverCard, getImage, getImageCropper, getImageViewer, getKbd, getLabel, getLink, getListbox, getMarquee, getMenu, getMenubar, getMessageThread, getMeter, getNavigationMenu, getNumberInput, getPagination, getPinInput, getPopover, getProgress, getPromptInput, getQrCode, getRadioGroup, getRating, getReasoning, getScrollArea, getSegmentedControl, getSelect, getSeparator, getSkeleton, getSlider, getSortable, getSplitter, getStepper, getStreamingMessage, getSwitch, getTable, getTableOfContents, getTabs, getTagGroup, getTagsInput, getTextField, getTimeline, getToast, getToaster, getToggle, getToggleGroup, getToolbar, getTooltip, getTour, getTreeView, installAnnouncementLog, interceptNativeNavigation, layoutInvariant, liveAnnouncements, machinePaths, missingAriaLines, missingStateStories, navigationLog, numberInputStepInvariants, parseQrPath, paths, platforms, playwrightEnv, pseudo, pseudoMessages, qrCodeDecodingContract, recordingAnnouncer, runAction, sliderStepInvariants, spokenLog, switchStepInvariants, testMachine, textFieldKeyStepInvariants, textFieldStepInvariants, toGraph, traitInvariants, uncovered, virtualClock, withEngine };
|