@rind-ui/testing 1.1.0 → 1.3.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/{dist-DGqRlido.mjs → dist-Cy4kVOi8.mjs} +7 -7
- package/dist/{dom-D9Da5Fku.mjs → dom-2jvIZsvL.mjs} +3 -3
- package/dist/dom.mjs +1 -1
- package/dist/index.d.mts +2428 -154
- package/dist/index.mjs +122 -8
- package/dist/{playwright-D79Husn_.mjs → playwright-C7Ve39Q-.mjs} +5 -4
- package/dist/playwright.mjs +1 -1
- package/dist/setup.mjs +2 -2
- package/package.json +3 -3
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, 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";
|
|
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-2jvIZsvL.mjs";
|
|
3
|
+
import { n as playwrightEnv, r as watchPageErrors, t as isPage } from "./playwright-C7Ve39Q-.mjs";
|
|
4
|
+
import { accordionContract, agentPresenceContract, alertContract, alertDialogRoleContract, angleSliderContract, avatarContract, badgeContract, breadcrumbsContract, buttonContract, calendarContract, carouselContract, checkboxContract, checkboxGroupContract, citationContract, clipboardContract, codeBlockContract, collapsibleContract, colorPickerContract, colorWheelContract, comboboxContract, contextMenuContract, contextMeterContract, createService, dateFieldContract, dateRangeFieldContract, dialogContract, drawerContract, editableContract, fieldContract, fieldsetContract, fileUploadContract, floatingPanelContract, formContract, gridListContract, headingContract, hoverCardContract, imageContract, imageCropperContract, imageViewerContract, inlineComboboxContract, jsonTreeViewContract, kbdContract, labelContract, linkContract, listboxContract, marqueeContract, mentionsContract, menuContract, menubarContract, menubarMenuContract, messageActionsContract, 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, signaturePadContract, skeletonContract, sliderContract, sortableContract, splitterContract, stepperContract, streamingMessageContract, suggestionsContract, switchContract, tableContract, tableOfContentsContract, tabsContract, tagGroupContract, tagsInputContract, textFieldContract, timelineContract, timerContract, toastContract, toasterContract, toggleContract, toggleGroupContract, toolCallContract, 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
|
|
@@ -101,6 +101,11 @@ function missingAriaLines(actual, expected) {
|
|
|
101
101
|
/** Attributes whose values may contain generated ids (a toolbar control's key is its id, a radio group's default name holds its instance). */
|
|
102
102
|
const ID_REFS = /^(id|for|name|data-key|aria-(labelledby|describedby|controls|owns|activedescendant|details|errormessage|flowto))$/;
|
|
103
103
|
/**
|
|
104
|
+
* The frameworks' generated ids (React's useId, Vue's useId and an app prefix, Svelte's
|
|
105
|
+
* `$props.id()`): an item keyed by one (`data-value`, no value given) differs only in it.
|
|
106
|
+
*/
|
|
107
|
+
const GENERATED = /^(?:_[rR]_[0-9a-zA-Z]+_|[«:][rR][0-9a-zA-Z]+[»:]|v-\d+|parity\d+-\d+|[cs]\d+)$/;
|
|
108
|
+
/**
|
|
104
109
|
* A canonical rendering of `html` (or of `node`'s children): comments and whitespace-only text
|
|
105
110
|
* dropped, adjacent texts joined, attributes sorted, styles normalised by the browser's CSS
|
|
106
111
|
* serialiser; every element id becomes `@0`, `@1`… (in document order) wherever an id or an ARIA
|
|
@@ -125,16 +130,23 @@ function canonicalHtml(html) {
|
|
|
125
130
|
const order = [...instances].sort((a, b) => b.length - a.length);
|
|
126
131
|
const inInstance = (value) => order.reduce((v, id) => v.split(id).join(`#${instances.indexOf(id)}`), value);
|
|
127
132
|
const ids = (value) => value.split(" ").map((token) => elementIds.includes(token) ? `@${elementIds.indexOf(token)}` : inInstance(token)).join(" ");
|
|
133
|
+
const anchorNames = [];
|
|
134
|
+
const anchors = (value) => value.replace(/--rind-anchor-[^\s;,)]+/g, (name) => {
|
|
135
|
+
if (!anchorNames.includes(name)) anchorNames.push(name);
|
|
136
|
+
return `--rind-anchor-${anchorNames.indexOf(name)}`;
|
|
137
|
+
});
|
|
138
|
+
const declaration = (p, value) => p === "--rind-anchor-id" ? inInstance(value) : anchors(whole(value));
|
|
139
|
+
const whole = (value) => value.replace(/-?\d+\.\d+px/g, (n) => `${Math.round(Number.parseFloat(n))}px`);
|
|
128
140
|
const out = [];
|
|
129
141
|
const walk = (node, depth) => {
|
|
130
142
|
const pad = " ".repeat(depth);
|
|
131
143
|
if (!(node instanceof Element)) return;
|
|
132
|
-
const attrs = Array.from(node.attributes).filter(({ name }) => name !== "data-hover" && name !== "data-hovering").map(({ name, value }) => {
|
|
144
|
+
const attrs = Array.from(node.attributes).filter(({ name }) => name !== "data-hover" && name !== "data-hovering").filter(({ name }) => name !== "style" || node.style.length > 0).map(({ name, value }) => {
|
|
133
145
|
if (name === "style") {
|
|
134
146
|
const style = node.style;
|
|
135
|
-
return `style="${Array.from({ length: style.length }, (_, i) => style.item(i)).sort().map((p) => `${p}: ${style.getPropertyValue(p)}`).join("; ")}"`;
|
|
147
|
+
return `style="${Array.from({ length: style.length }, (_, i) => style.item(i)).sort().map((p) => `${p}: ${declaration(p, style.getPropertyValue(p))}`).join("; ")}"`;
|
|
136
148
|
}
|
|
137
|
-
return `${name}="${name === "data-instance" ? inInstance(value) : ID_REFS.test(name) ? ids(value) : value}"`;
|
|
149
|
+
return `${name}="${name === "data-instance" ? inInstance(value) : ID_REFS.test(name) ? ids(value) : name === "data-value" && GENERATED.test(value) ? "~generated" : value}"`;
|
|
138
150
|
}).sort();
|
|
139
151
|
out.push(`${pad}<${node.tagName.toLowerCase()}${attrs.length ? ` ${attrs.join(" ")}` : ""}>`);
|
|
140
152
|
children(node, depth + 1);
|
|
@@ -325,6 +337,12 @@ function getAccordion(target, anchor, options) {
|
|
|
325
337
|
return createDriverWith(accordionContract, target, [anchor], options);
|
|
326
338
|
}
|
|
327
339
|
//#endregion
|
|
340
|
+
//#region src/components/agent-presence.ts
|
|
341
|
+
/** A driver for the only Agent Presence in `target`. */
|
|
342
|
+
function getAgentPresence(target, options) {
|
|
343
|
+
return createDriverWith(agentPresenceContract, target, [], options);
|
|
344
|
+
}
|
|
345
|
+
//#endregion
|
|
328
346
|
//#region src/components/alert.ts
|
|
329
347
|
/**
|
|
330
348
|
* A driver for an Alert: the one whose Title's text is `title`, or the one alert inside
|
|
@@ -336,6 +354,12 @@ function getAlert(target, anchor = {}, options) {
|
|
|
336
354
|
return createDriverWith(alertContract, within ?? target, [title === void 0 ? {} : { title }], options);
|
|
337
355
|
}
|
|
338
356
|
//#endregion
|
|
357
|
+
//#region src/components/angle-slider.ts
|
|
358
|
+
/** A driver for the Angle Slider labelled `label`, or the only one in `target`. */
|
|
359
|
+
function getAngleSlider(target, anchor, options) {
|
|
360
|
+
return createDriverWith(angleSliderContract, target, anchor ? [anchor] : [], options);
|
|
361
|
+
}
|
|
362
|
+
//#endregion
|
|
339
363
|
//#region src/components/avatar.ts
|
|
340
364
|
/**
|
|
341
365
|
* A driver for an Avatar: the one named `name` (role `img`), or, for a decorative avatar,
|
|
@@ -377,6 +401,12 @@ function getCalendar(target, anchor, options) {
|
|
|
377
401
|
return createDriverWith(calendarContract, target, [anchor], options);
|
|
378
402
|
}
|
|
379
403
|
//#endregion
|
|
404
|
+
//#region src/components/carousel.ts
|
|
405
|
+
/** A driver for the Carousel region named `name`, or the only one in `target`. */
|
|
406
|
+
function getCarousel(target, anchor, options) {
|
|
407
|
+
return createDriverWith(carouselContract, target, anchor ? [anchor] : [], options);
|
|
408
|
+
}
|
|
409
|
+
//#endregion
|
|
380
410
|
//#region src/components/checkbox.ts
|
|
381
411
|
/** A driver for the Checkbox named `name`. */
|
|
382
412
|
function getCheckbox(target, anchor, options) {
|
|
@@ -389,6 +419,12 @@ function getCheckboxGroup(target, anchor, options) {
|
|
|
389
419
|
return createDriverWith(checkboxGroupContract, target, [anchor], options);
|
|
390
420
|
}
|
|
391
421
|
//#endregion
|
|
422
|
+
//#region src/components/citation.ts
|
|
423
|
+
/** A driver for the citation marker named `name`, or the first in `target`. */
|
|
424
|
+
function getCitation(target, anchor, options) {
|
|
425
|
+
return createDriverWith(citationContract, target, anchor ? [anchor] : [], options);
|
|
426
|
+
}
|
|
427
|
+
//#endregion
|
|
392
428
|
//#region src/components/clipboard.ts
|
|
393
429
|
/** A driver for the Clipboard labelled `label`, or the only one in `target`. */
|
|
394
430
|
function getClipboard(target, anchor, options) {
|
|
@@ -488,6 +524,12 @@ function getColorPicker(target, anchor, options) {
|
|
|
488
524
|
});
|
|
489
525
|
}
|
|
490
526
|
//#endregion
|
|
527
|
+
//#region src/components/color-wheel.ts
|
|
528
|
+
/** A driver for the Color Wheel labelled `label`, or the only one in `target`. */
|
|
529
|
+
function getColorWheel(target, anchor, options) {
|
|
530
|
+
return createDriverWith(colorWheelContract, target, anchor ? [anchor] : [], options);
|
|
531
|
+
}
|
|
532
|
+
//#endregion
|
|
491
533
|
//#region src/components/combobox.ts
|
|
492
534
|
function getCombobox(target, anchor, options) {
|
|
493
535
|
const { inline, ...rest } = options ?? {};
|
|
@@ -504,6 +546,12 @@ function getContextMenu(target, anchor, options) {
|
|
|
504
546
|
return createDriverWith(modal === false ? nonModalContextMenuContract : contextMenuContract, target, [locate], options);
|
|
505
547
|
}
|
|
506
548
|
//#endregion
|
|
549
|
+
//#region src/components/context-meter.ts
|
|
550
|
+
/** A driver for the Context Meter named `name`, or the only one in `target`. */
|
|
551
|
+
function getContextMeter(target, anchor, options) {
|
|
552
|
+
return createDriverWith(contextMeterContract, target, anchor ? [anchor] : [], options);
|
|
553
|
+
}
|
|
554
|
+
//#endregion
|
|
507
555
|
//#region src/components/date-field.ts
|
|
508
556
|
function getDateField(target, anchor, options) {
|
|
509
557
|
const { selectionMode, ...locate } = anchor;
|
|
@@ -532,6 +580,12 @@ function getDrawer(target, anchor, options) {
|
|
|
532
580
|
return createDriverWith(modal === false ? nonModalDrawerContract : drawerContract, target, [locate], options);
|
|
533
581
|
}
|
|
534
582
|
//#endregion
|
|
583
|
+
//#region src/components/editable.ts
|
|
584
|
+
/** A driver for the Editable labelled `label`, or the only one in `target`. */
|
|
585
|
+
function getEditable(target, anchor, options) {
|
|
586
|
+
return createDriverWith(editableContract, target, anchor ? [anchor] : [], options);
|
|
587
|
+
}
|
|
588
|
+
//#endregion
|
|
535
589
|
//#region src/components/field.ts
|
|
536
590
|
/**
|
|
537
591
|
* A driver for the Field labelled `label`. `.control(getX)` builds the control's driver,
|
|
@@ -556,6 +610,12 @@ function getFileUpload(target, anchor, options) {
|
|
|
556
610
|
return createDriverWith(fileUploadContract, target, anchor ? [anchor] : [], options);
|
|
557
611
|
}
|
|
558
612
|
//#endregion
|
|
613
|
+
//#region src/components/floating-panel.ts
|
|
614
|
+
/** A driver for the Floating Panel titled `title`, or the only one in `target`. */
|
|
615
|
+
function getFloatingPanel(target, anchor, options) {
|
|
616
|
+
return createDriverWith(floatingPanelContract, target, anchor ? [anchor] : [], options);
|
|
617
|
+
}
|
|
618
|
+
//#endregion
|
|
559
619
|
//#region src/components/form.ts
|
|
560
620
|
/** A driver for the Form named `name`: `submit`, `reset`, `validate`, and its queries. */
|
|
561
621
|
function getForm(target, anchor, options) {
|
|
@@ -603,6 +663,15 @@ function getImageViewer(target, anchor, options) {
|
|
|
603
663
|
return createDriverWith(imageViewerContract, target, anchor ? [anchor] : [], options);
|
|
604
664
|
}
|
|
605
665
|
//#endregion
|
|
666
|
+
//#region src/components/json-tree-view.ts
|
|
667
|
+
/**
|
|
668
|
+
* A driver for the JSON Tree View named `name`: Tree View's actions and queries, plus
|
|
669
|
+
* `nodeAt(pointer)`, `valueText(pointer)`, `summaryOf(pointer)`, `copy()` and `copyState()`.
|
|
670
|
+
*/
|
|
671
|
+
function getJsonTreeView(target, anchor, options) {
|
|
672
|
+
return createDriverWith(jsonTreeViewContract, target, [anchor], options);
|
|
673
|
+
}
|
|
674
|
+
//#endregion
|
|
606
675
|
//#region src/components/kbd.ts
|
|
607
676
|
/** A driver for the Kbd whose text matches `text`, or the only one in `target`. */
|
|
608
677
|
function getKbd(target, anchor = {}, options) {
|
|
@@ -633,6 +702,12 @@ function getMarquee(target, anchor, options) {
|
|
|
633
702
|
return createDriverWith(marqueeContract, target, anchor ? [anchor] : [], options);
|
|
634
703
|
}
|
|
635
704
|
//#endregion
|
|
705
|
+
//#region src/components/mentions.ts
|
|
706
|
+
/** A driver for the Mentions field named `name`, or the only one in `target`. */
|
|
707
|
+
function getMentions(target, anchor, options) {
|
|
708
|
+
return createDriverWith(mentionsContract, target, anchor ? [anchor] : [], options);
|
|
709
|
+
}
|
|
710
|
+
//#endregion
|
|
636
711
|
//#region src/components/menu.ts
|
|
637
712
|
/**
|
|
638
713
|
* A driver for the Menu opened by the trigger named `name` (a closed menu has no content
|
|
@@ -655,6 +730,12 @@ function getMenubar(target, anchor, options) {
|
|
|
655
730
|
return Object.assign(bar, { menu: (item) => createDriverWith(menus, target, [{ name: item }], options) });
|
|
656
731
|
}
|
|
657
732
|
//#endregion
|
|
733
|
+
//#region src/components/message-actions.ts
|
|
734
|
+
/** A driver for the Message Actions toolbar named `name`, or the only one in `target`. */
|
|
735
|
+
function getMessageActions(target, anchor, options) {
|
|
736
|
+
return createDriverWith(messageActionsContract, target, anchor ? [anchor] : [], options);
|
|
737
|
+
}
|
|
738
|
+
//#endregion
|
|
658
739
|
//#region src/components/message-thread.ts
|
|
659
740
|
/** A driver for the Message Thread whose feed is named `name`, or the only one in `target`. */
|
|
660
741
|
function getMessageThread(target, anchor, options) {
|
|
@@ -2661,6 +2742,12 @@ function getSeparator(target, anchor = {}, options) {
|
|
|
2661
2742
|
return createDriverWith(host === void 0 ? separatorContract : separatorContractFor(host), within ?? target, [name === void 0 ? {} : { name }], options);
|
|
2662
2743
|
}
|
|
2663
2744
|
//#endregion
|
|
2745
|
+
//#region src/components/signature-pad.ts
|
|
2746
|
+
/** A driver for the Signature Pad labelled `label`, or the only one in `target`. */
|
|
2747
|
+
function getSignaturePad(target, anchor, options) {
|
|
2748
|
+
return createDriverWith(signaturePadContract, target, anchor ? [anchor] : [], options);
|
|
2749
|
+
}
|
|
2750
|
+
//#endregion
|
|
2664
2751
|
//#region src/components/skeleton.ts
|
|
2665
2752
|
/**
|
|
2666
2753
|
* A driver for the one Skeleton inside `within` (a container element or a Playwright
|
|
@@ -2700,6 +2787,12 @@ function getStreamingMessage(target, anchor, options) {
|
|
|
2700
2787
|
return createDriverWith(streamingMessageContract, target, anchor ? [anchor] : [], options);
|
|
2701
2788
|
}
|
|
2702
2789
|
//#endregion
|
|
2790
|
+
//#region src/components/suggestions.ts
|
|
2791
|
+
/** A driver for the Suggestions named `name`, or the only one in `target`. */
|
|
2792
|
+
function getSuggestions(target, anchor, options) {
|
|
2793
|
+
return createDriverWith(suggestionsContract, target, anchor ? [anchor] : [], options);
|
|
2794
|
+
}
|
|
2795
|
+
//#endregion
|
|
2703
2796
|
//#region src/components/switch.ts
|
|
2704
2797
|
/** A driver for the Switch named `name`. */
|
|
2705
2798
|
function getSwitch(target, anchor, options) {
|
|
@@ -2748,6 +2841,12 @@ function getTimeline(target, anchor = {}, options) {
|
|
|
2748
2841
|
return createDriverWith(timelineContract, target, [anchor], options);
|
|
2749
2842
|
}
|
|
2750
2843
|
//#endregion
|
|
2844
|
+
//#region src/components/timer.ts
|
|
2845
|
+
/** A driver for the only Timer in `target`. */
|
|
2846
|
+
function getTimer(target, options) {
|
|
2847
|
+
return createDriverWith(timerContract, target, [], options);
|
|
2848
|
+
}
|
|
2849
|
+
//#endregion
|
|
2751
2850
|
//#region src/components/toast.ts
|
|
2752
2851
|
/** A driver for the toaster region named `name` ("Notifications (F6)"): enter, leave, queries. */
|
|
2753
2852
|
function getToaster(target, anchor, options) {
|
|
@@ -2770,6 +2869,12 @@ function getToggleGroup(target, anchor, options) {
|
|
|
2770
2869
|
return createDriverWith(toggleGroupContract, target, [anchor], options);
|
|
2771
2870
|
}
|
|
2772
2871
|
//#endregion
|
|
2872
|
+
//#region src/components/tool-call.ts
|
|
2873
|
+
/** A driver for the Tool Call whose Header is named `name`, or the only one in `target`. */
|
|
2874
|
+
function getToolCall(target, anchor, options) {
|
|
2875
|
+
return createDriverWith(toolCallContract, target, anchor ? [anchor] : [], options);
|
|
2876
|
+
}
|
|
2877
|
+
//#endregion
|
|
2773
2878
|
//#region src/components/toolbar.ts
|
|
2774
2879
|
/** A driver for the Toolbar named `name`. */
|
|
2775
2880
|
function getToolbar(target, anchor, options) {
|
|
@@ -3275,7 +3380,16 @@ const hiddenFocus = (f) => {
|
|
|
3275
3380
|
*/
|
|
3276
3381
|
/** A layer with no restore target part: focus returns to what had it when it opened. */
|
|
3277
3382
|
const restoresToPrevious = (f) => f.semantics["finalFocus"] === void 0 && f.semantics["trigger"] === void 0;
|
|
3278
|
-
|
|
3383
|
+
/**
|
|
3384
|
+
* An in-page link (`href="#id"`) moving focus to its target: native link semantics (a Table of
|
|
3385
|
+
* Contents' keyboard follow), not focus lost.
|
|
3386
|
+
*/
|
|
3387
|
+
const toLinkTarget = (f) => {
|
|
3388
|
+
const href = f.before?.focus.element?.attrs["href"];
|
|
3389
|
+
const id = f.after.focus.element?.attrs["id"];
|
|
3390
|
+
return href !== void 0 && id !== void 0 && href === `#${id}`;
|
|
3391
|
+
};
|
|
3392
|
+
const focusKept = (f) => !(restoresToPrevious(f) && f.atInitial && f.baseline.focus.onBody && f.after.focus.onBody) && f.before?.focus.inInstance && !f.after.focus.inInstance && !toLinkTarget(f) && (f.after.focus.onBody || f.from === null || f.from === f.state) ? [`focus left the component (now ${f.after.focus.onBody ? "<body>" : f.after.focus.element?.describe})`] : [];
|
|
3279
3393
|
/** (23) No live region of its own unless the contract declares `live-region`. */
|
|
3280
3394
|
const liveRegions = (f) => f.traits.includes("live-region") ? [] : f.after.liveRegions.map((r) => `${r} is a live region; announce through the Announcer`);
|
|
3281
3395
|
/**
|
|
@@ -5041,4 +5155,4 @@ function allowRindWarning(pattern) {
|
|
|
5041
5155
|
state().allowed.push(pattern);
|
|
5042
5156
|
}
|
|
5043
5157
|
//#endregion
|
|
5044
|
-
export { QrDecodeError, accordionStepInvariants, allowRindWarning, canonicalHtml, 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 };
|
|
5158
|
+
export { QrDecodeError, accordionStepInvariants, allowRindWarning, canonicalHtml, checkGeneric, checkboxStepInvariants, correctBlock, createDriver, createDriverWith, currentRun, dateFieldStepInvariants, dateRangeStepInvariants, decodeQr, domEnv, englishLeaks, expectRindWarning, fakeClipboard, fakeDelayGroup, fakeHoverIntent, fakePositioning, fakeRouter, fakeVisibility, fixedDateClock, formStepInvariants, genericInvariants, getAccordion, getAgentPresence, getAlert, getAngleSlider, getAvatar, getBadge, getBreadcrumbs, getButton, getCalendar, getCarousel, getCheckbox, getCheckboxGroup, getCitation, getClipboard, getCodeBlock, getCollapsible, getColorPicker, getColorWheel, getCombobox, getContextMenu, getContextMeter, getDateField, getDialog, getDrawer, getEditable, getField, getFieldset, getFileUpload, getFloatingPanel, getForm, getGridList, getHeading, getHoverCard, getImage, getImageCropper, getImageViewer, getJsonTreeView, getKbd, getLabel, getLink, getListbox, getMarquee, getMentions, getMenu, getMenubar, getMessageActions, getMessageThread, getMeter, getNavigationMenu, getNumberInput, getPagination, getPinInput, getPopover, getProgress, getPromptInput, getQrCode, getRadioGroup, getRating, getReasoning, getScrollArea, getSegmentedControl, getSelect, getSeparator, getSignaturePad, getSkeleton, getSlider, getSortable, getSplitter, getStepper, getStreamingMessage, getSuggestions, getSwitch, getTable, getTableOfContents, getTabs, getTagGroup, getTagsInput, getTextField, getTimeline, getTimer, getToast, getToaster, getToggle, getToggleGroup, getToolCall, 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 };
|
|
@@ -517,7 +517,7 @@ function createPlaywrightEnv(getBase, { scope, anchor, modality, platform, partN
|
|
|
517
517
|
const y = box.y + pointerOptions.at.y * box.height;
|
|
518
518
|
const pointerType = pointerOptions.pointerType ?? "mouse";
|
|
519
519
|
const { page } = await getBase();
|
|
520
|
-
if (pointerType === "mouse" && phase !== "cancel") {
|
|
520
|
+
if (pointerType === "mouse" && phase !== "cancel" && pointerOptions.pointerId === void 0) {
|
|
521
521
|
await page.mouse.move(x, y);
|
|
522
522
|
if (phase === "down") await page.mouse.down();
|
|
523
523
|
if (phase === "up") await page.mouse.up();
|
|
@@ -530,9 +530,9 @@ function createPlaywrightEnv(getBase, { scope, anchor, modality, platform, partN
|
|
|
530
530
|
bubbles: true,
|
|
531
531
|
cancelable: o.phase !== "cancel",
|
|
532
532
|
composed: true,
|
|
533
|
-
pointerId: o.pointerType === "mouse" ? 1 : 2,
|
|
533
|
+
pointerId: o.pointerId ?? (o.pointerType === "mouse" ? 1 : 2),
|
|
534
534
|
pointerType: o.pointerType,
|
|
535
|
-
isPrimary:
|
|
535
|
+
isPrimary: o.pointerId === null,
|
|
536
536
|
clientX: o.x,
|
|
537
537
|
clientY: o.y,
|
|
538
538
|
button: o.phase === "move" ? -1 : 0,
|
|
@@ -543,7 +543,8 @@ function createPlaywrightEnv(getBase, { scope, anchor, modality, platform, partN
|
|
|
543
543
|
phase,
|
|
544
544
|
x,
|
|
545
545
|
y,
|
|
546
|
-
pointerType
|
|
546
|
+
pointerType,
|
|
547
|
+
pointerId: pointerOptions.pointerId ?? null
|
|
547
548
|
});
|
|
548
549
|
},
|
|
549
550
|
async fill(value) {
|
package/dist/playwright.mjs
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export { i as axNodeOf, a as chromiumTree, n as playwrightEnv } from "./playwright-
|
|
1
|
+
export { i as axNodeOf, a as chromiumTree, n as playwrightEnv } from "./playwright-C7Ve39Q-.mjs";
|
package/dist/setup.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { a as navigationLog, n as installErrorLog, o as installAnnouncementLog } from "./dom-
|
|
1
|
+
import { a as navigationLog, n as installErrorLog, o as installAnnouncementLog } from "./dom-2jvIZsvL.mjs";
|
|
2
2
|
//#region src/setup.ts
|
|
3
3
|
function define(target, name, value) {
|
|
4
4
|
if (!target || Reflect.get(target, name) != null) return;
|
|
@@ -99,7 +99,7 @@ async function runnerAfterEach() {
|
|
|
99
99
|
const global = g["afterEach"];
|
|
100
100
|
if (typeof global === "function") return global;
|
|
101
101
|
try {
|
|
102
|
-
return (await import("./dist-
|
|
102
|
+
return (await import("./dist-Cy4kVOi8.mjs")).afterEach ?? null;
|
|
103
103
|
} catch {
|
|
104
104
|
return null;
|
|
105
105
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rind-ui/testing",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.3.0",
|
|
4
4
|
"description": "Test drivers and environment setup for rind-ui components (Testing Library and Playwright).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": "Watermelon Bros",
|
|
@@ -56,7 +56,7 @@
|
|
|
56
56
|
},
|
|
57
57
|
"dependencies": {
|
|
58
58
|
"dom-accessibility-api": "^0.7.1",
|
|
59
|
-
"@rind-ui/core": "1.
|
|
59
|
+
"@rind-ui/core": "1.3.0"
|
|
60
60
|
},
|
|
61
61
|
"devDependencies": {
|
|
62
62
|
"@internationalized/date": "^3.12.4",
|
|
@@ -66,7 +66,7 @@
|
|
|
66
66
|
"react": "^19.3.0",
|
|
67
67
|
"react-dom": "^19.3.0",
|
|
68
68
|
"rolldown": "1.2.13",
|
|
69
|
-
"@rind-ui/react": "1.
|
|
69
|
+
"@rind-ui/react": "1.3.0"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
72
|
"@testing-library/dom": ">=10",
|