@shivaedev/test-story 0.33.0 → 0.34.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/CHANGELOG.md +20 -0
- package/README.md +46 -11
- package/dist/server/adapters/installOutbound.d.ts.map +1 -0
- package/dist/server/{internal → adapters}/installOutbound.js +38 -12
- package/dist/server/adapters/installOutbound.js.map +1 -0
- package/dist/server/adapters/screenAct.d.ts +1 -1
- package/dist/server/adapters/screenAct.d.ts.map +1 -1
- package/dist/server/adapters/screenAct.js.map +1 -1
- package/dist/server/adapters/screenDialogs.d.ts +2 -0
- package/dist/server/adapters/screenDialogs.d.ts.map +1 -0
- package/dist/server/adapters/screenDialogs.js +9 -0
- package/dist/server/adapters/screenDialogs.js.map +1 -0
- package/dist/server/adapters/screenElements.d.ts +3 -0
- package/dist/server/adapters/screenElements.d.ts.map +1 -1
- package/dist/server/adapters/screenElements.js +9 -0
- package/dist/server/adapters/screenElements.js.map +1 -1
- package/dist/server/adapters/screenQueries.d.ts +2 -0
- package/dist/server/adapters/screenQueries.d.ts.map +1 -1
- package/dist/server/adapters/screenQueries.js +27 -3
- package/dist/server/adapters/screenQueries.js.map +1 -1
- package/dist/server/adapters/writeSnapshot.d.ts +3 -0
- package/dist/server/adapters/writeSnapshot.d.ts.map +1 -0
- package/dist/server/adapters/writeSnapshot.js +24 -0
- package/dist/server/adapters/writeSnapshot.js.map +1 -0
- package/dist/server/browserReads.d.ts +2 -2
- package/dist/server/browserReads.d.ts.map +1 -1
- package/dist/server/domEnvironment.config.js +1 -1
- package/dist/server/fakeHttpService.d.ts +2 -0
- package/dist/server/fakeHttpService.d.ts.map +1 -1
- package/dist/server/fakeHttpService.js +7 -5
- package/dist/server/fakeHttpService.js.map +1 -1
- package/dist/server/internal/browserReadObserver.d.ts +1 -1
- package/dist/server/internal/browserReadObserver.d.ts.map +1 -1
- package/dist/server/internal/browserReadObserver.js +15 -1
- package/dist/server/internal/browserReadObserver.js.map +1 -1
- package/dist/server/internal/browserSubscriptions.d.ts +2 -1
- package/dist/server/internal/browserSubscriptions.d.ts.map +1 -1
- package/dist/server/internal/browserSubscriptions.js +11 -3
- package/dist/server/internal/browserSubscriptions.js.map +1 -1
- package/dist/server/internal/engineSnapshot.d.ts.map +1 -1
- package/dist/server/internal/engineSnapshot.js +2 -13
- package/dist/server/internal/engineSnapshot.js.map +1 -1
- package/dist/server/internal/failureReport.js +5 -2
- package/dist/server/internal/failureReport.js.map +1 -1
- package/dist/server/internal/fakeHttpAnswer.d.ts.map +1 -1
- package/dist/server/internal/fakeHttpAnswer.js +12 -4
- package/dist/server/internal/fakeHttpAnswer.js.map +1 -1
- package/dist/server/internal/fakeHttpReceive.d.ts +1 -1
- package/dist/server/internal/fakeHttpReceive.d.ts.map +1 -1
- package/dist/server/internal/fakeHttpReceive.js +4 -7
- package/dist/server/internal/fakeHttpReceive.js.map +1 -1
- package/dist/server/internal/fakeHttpSignals.d.ts +10 -0
- package/dist/server/internal/fakeHttpSignals.d.ts.map +1 -0
- package/dist/server/internal/fakeHttpSignals.js +26 -0
- package/dist/server/internal/fakeHttpSignals.js.map +1 -0
- package/dist/server/internal/nextClientHint.d.ts +2 -1
- package/dist/server/internal/nextClientHint.d.ts.map +1 -1
- package/dist/server/internal/nextClientHint.js +8 -1
- package/dist/server/internal/nextClientHint.js.map +1 -1
- package/dist/server/internal/observeBrowser.d.ts +1 -1
- package/dist/server/internal/screenReadouts.d.ts +2 -0
- package/dist/server/internal/screenReadouts.d.ts.map +1 -1
- package/dist/server/internal/screenReadouts.js +13 -1
- package/dist/server/internal/screenReadouts.js.map +1 -1
- package/dist/server/memberScreens.d.ts.map +1 -1
- package/dist/server/memberScreens.js +1 -0
- package/dist/server/memberScreens.js.map +1 -1
- package/dist/server/routeOutbound.js +1 -1
- package/dist/server/routeOutbound.js.map +1 -1
- package/dist/server/screenDriver.d.ts +7 -3
- package/dist/server/screenDriver.d.ts.map +1 -1
- package/dist/server/screenDriver.js +13 -3
- package/dist/server/screenDriver.js.map +1 -1
- package/package.json +6 -6
- package/src/server/{internal → adapters}/installOutbound.ts +47 -12
- package/src/server/adapters/screenAct.ts +3 -3
- package/src/server/adapters/screenDialogs.ts +12 -0
- package/src/server/adapters/screenElements.ts +9 -0
- package/src/server/adapters/screenQueries.ts +31 -5
- package/src/server/adapters/writeSnapshot.ts +25 -0
- package/src/server/browserReads.ts +1 -1
- package/src/server/domEnvironment.config.ts +1 -1
- package/src/server/fakeHttpService.ts +7 -5
- package/src/server/internal/browserReadObserver.ts +15 -1
- package/src/server/internal/browserSubscriptions.ts +11 -3
- package/src/server/internal/engineSnapshot.ts +2 -20
- package/src/server/internal/failureReport.ts +6 -2
- package/src/server/internal/fakeHttpAnswer.ts +11 -4
- package/src/server/internal/fakeHttpReceive.ts +4 -7
- package/src/server/internal/fakeHttpSignals.ts +28 -0
- package/src/server/internal/nextClientHint.ts +12 -3
- package/src/server/internal/screenReadouts.ts +13 -1
- package/src/server/memberScreens.ts +1 -0
- package/src/server/routeOutbound.ts +1 -1
- package/src/server/screenDriver.ts +20 -9
- package/dist/server/internal/installOutbound.d.ts.map +0 -1
- package/dist/server/internal/installOutbound.js.map +0 -1
- /package/dist/server/{internal → adapters}/installOutbound.d.ts +0 -0
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,25 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 0.34.0 - 2026-11-02
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Fake HTTP services expose replaying `received` and `completed` Effect streams so stories can wait independently for each request's arrival and response completion, separately from abandonment.
|
|
8
|
+
- Add scoped HTTP visitors with separate cookie jars and forwarding proxies. Stories can model a public HTTPS origin, retain app cookies, and present foreign Origin and forged forwarding headers over real HTTP.
|
|
9
|
+
- Read labelled element text with `labelledText(label)` and native table rows with `table(label)` in screen drivers.
|
|
10
|
+
- Scope a screen driver to a portal with `dialog(target)`. Member screens find body portals linked by their triggers' `aria-controls` while keeping other members' dialogs out of reach.
|
|
11
|
+
|
|
12
|
+
### Fixed
|
|
13
|
+
|
|
14
|
+
- Keep member screen dialog queries inside the member's root, including when the driver uses a child mount. Mount member portals inside `member.root` so their controls remain accessible to that member. Standalone screen drivers continue to find document portals.
|
|
15
|
+
- Compose outbound routes acquired in separate scopes. Each scope removes only its own registrations; the newest active route for a shared hostname wins, and closing it restores the earlier route.
|
|
16
|
+
- Subscription opening waits settle when a stream completes without a value, dies or disconnects, preserving answered subscriptions and tagged refusals.
|
|
17
|
+
|
|
18
|
+
### Breaking
|
|
19
|
+
|
|
20
|
+
- Held route replies and scripted status reply functions now compute at request arrival, before waiting for release. Move state changes that should affect the reply before sending the request, or use an immediate `fault` to replace a waiting reply at injection time.
|
|
21
|
+
- `screenDriver` with client activity now exposes `SignalNotReceived` from `nextLiveHint()` when the activity stream ends without a new hint. Handle this typed error from `@shivaedev/test-story/server/until.ts` instead of assuming the wait always succeeds. Subscription readouts include a `closed` state for streams that terminate before answering; consumers matching subscription states must handle `closed`.
|
|
22
|
+
|
|
3
23
|
## 0.33.0 - 2026-11-02
|
|
4
24
|
|
|
5
25
|
### Added
|
package/README.md
CHANGED
|
@@ -38,7 +38,7 @@ The bakery when the test failed:
|
|
|
38
38
|
{"bowls":1,"capacity":3,"dough":0,"flour":0,"loaves":1,"minute":1,"orders":[],"ovenLit":true,"overfired":false,
|
|
39
39
|
"smoking":false,"starter":false}
|
|
40
40
|
|
|
41
|
-
Rerun: vitest run src/test-support/failingStories.ts -t
|
|
41
|
+
Rerun: vitest run 'src/test-support/failingStories.ts' -t 'Bakery Story: marks where an assertion stopped the story'
|
|
42
42
|
```
|
|
43
43
|
|
|
44
44
|
The first line is the assertion's own message. The box under it tells a reader who has never seen the package how to read what follows. Then comes the story: the two traits the test named, the line the bakery told as it baked, and a `✗` where the test stopped, with the spec line it stopped at. Last come the bakery's whole state at that moment and the command that reruns the test, so the failure alone is enough to find the cause.
|
|
@@ -208,7 +208,9 @@ const app = storyKit({
|
|
|
208
208
|
|
|
209
209
|
`routeOutbound(routes)` from `@shivaedev/test-story/server/routeOutbound.ts` installs the same routing in the current Effect Scope. Acquire a `fakeHttpService` in `create`, then yield `routeOutbound({ "api.example.com": api.url })` so the fake listener and its routing belong to that story. Pass `{ passthrough: true }` as its second argument to allow unrouted Node fetch requests.
|
|
210
210
|
|
|
211
|
-
|
|
211
|
+
Separate registrations compose: every active registration's hosts remain reachable. If registrations name the same host, the newest active registration wins. Closing a scope removes only its registrations, revealing any earlier route for that host. Unrouted external hosts remain refused while any active registration requires strict routing.
|
|
212
|
+
|
|
213
|
+
Routing uses the global dispatcher that Node's built-in `fetch` already uses. The kit's `outbound` option installs routing before `around`, creation, traits and the body, stays active during scoped cleanup, and removes its registrations after each story, including a failing story. The original dispatcher is restored when the last registration closes. Stories within one worker must run one at a time because that dispatcher is shared; parallelism belongs between workers or inside one story. The DOM environment uses the same routing for host-side Node fetch and document requests, including redirect destinations. It refuses external hosts even when the kit omits `outbound`.
|
|
212
214
|
|
|
213
215
|
#### Asserting on application traces
|
|
214
216
|
|
|
@@ -414,7 +416,7 @@ yield* paused.release;
|
|
|
414
416
|
const user = yield* Fiber.join(pending);
|
|
415
417
|
```
|
|
416
418
|
|
|
417
|
-
`application.loadUser` is the application's real client call. `scriptFault` affects the next authorized matching request to that named route, then the route answers normally. `hold` pauses
|
|
419
|
+
`application.loadUser` is the application's real client call. `scriptFault` affects the next authorized matching request to that named route, then the route answers normally. `hold` pauses delivery until `release`; the route's reply handler runs when the request arrives, so a held reply sees the request and state at arrival. `waiting` completes when the first request reaches the hold. For several arrivals, observe `received` as described under [waiting for a signal](#waiting-for-a-signal). Other routes still answer. Use a live-clock kit for HTTP stories that need real-time waits; a TestClock kit can still drive the real HTTP client while controlling the fake’s reply time.
|
|
418
420
|
|
|
419
421
|
Use the controls through kit verbs after acquiring the service. `scriptFault(route, { kind: "status", reply })` scripts the next authorized reply, including raw bytes or `chunks`, a synchronous or asynchronous iterable of strings and byte arrays. Set `headers["content-type"]` to the story's media type; the default is JSON. Chunks are written in iteration order as they become available, so an async iterable can wait between pieces.
|
|
420
422
|
|
|
@@ -441,7 +443,7 @@ const bytes = yield* Fiber.join(pending);
|
|
|
441
443
|
|
|
442
444
|
Use `scriptFault(route, fault, options)` to install a fault for future authorized matching requests. It returns a control with a narrated `lift` effect. The default strikes once before the route's reply runs; `{ repeat: true }` keeps it installed until lifted. Status faults can repeat too.
|
|
443
445
|
|
|
444
|
-
A status fault’s `reply` can be a fixed `FakeHttpReply` or a function `(request, now) => FakeHttpReply`.
|
|
446
|
+
A status fault’s `reply` can be a fixed `FakeHttpReply` or a function `(request, now) => FakeHttpReply`. A scripted function runs at arrival, before any hold, using the arriving request and milliseconds from the Effect `Clock` captured when the service was created. A repeating fault rebuilds its reply for every request. An immediate `fault` evaluates its function when injected, using the waiting request and the clock at injection. TestClock stories therefore get deterministic refusal times:
|
|
445
447
|
|
|
446
448
|
```ts
|
|
447
449
|
yield* api.scriptFault("user", {
|
|
@@ -525,7 +527,7 @@ The bakery when the test failed:
|
|
|
525
527
|
{"bowls":1,"capacity":3,"dough":0,"flour":0,"loaves":0,"minute":0,"orders":[],"ovenLit":true,"overfired":false,
|
|
526
528
|
"smoking":false,"starter":false}
|
|
527
529
|
|
|
528
|
-
Rerun: vitest run src/test-support/failingStories.ts -t
|
|
530
|
+
Rerun: vitest run 'src/test-support/failingStories.ts' -t 'Bakery Story: marks the trait that refused'
|
|
529
531
|
```
|
|
530
532
|
|
|
531
533
|
The first line names the trait and what it threw, which the error also keeps as its `cause`, and the `help:` line says what to change. The `✗` marks the trait that refused, and the line under it points at the spec line that named it. A trait that fails with a string, a plain object or a tagged error prints by its content, never as `[object Object]`, and an interrupted trait stays interrupted.
|
|
@@ -740,7 +742,34 @@ const completed = yield* receiver.untilSpan(
|
|
|
740
742
|
);
|
|
741
743
|
```
|
|
742
744
|
|
|
743
|
-
`fakeHttpService`
|
|
745
|
+
`fakeHttpService` exposes two Effect streams of `FakeHttpRequestRecord`: `received` emits once the request body is read and path parameters are decoded, before guards and holds; `completed` emits when the server finishes writing the response, including its body. Receipt includes guard rejections, unmatched routes and malformed path parameters. A held request has arrived without completing; a stalled body has sent headers without completing. Each record's `status` reflects its current state, just like `requests`.
|
|
746
|
+
|
|
747
|
+
```ts
|
|
748
|
+
const arrived = yield* until(
|
|
749
|
+
service.received,
|
|
750
|
+
(request) => request.path === "/orders/42",
|
|
751
|
+
{ name: "order request received" },
|
|
752
|
+
);
|
|
753
|
+
const completed = yield* until(
|
|
754
|
+
service.completed,
|
|
755
|
+
(request) => request.path === "/orders/42",
|
|
756
|
+
{ name: "order response completed" },
|
|
757
|
+
);
|
|
758
|
+
```
|
|
759
|
+
|
|
760
|
+
Import `until` and `collectUntil` from `@shivaedev/test-story/server/until.ts`. To wait for several new arrivals to the same path, drop the already recorded requests before filtering and collecting. Capture this stream before starting the requests:
|
|
761
|
+
|
|
762
|
+
```ts
|
|
763
|
+
const arrivals = service.received.pipe(
|
|
764
|
+
Stream.drop(service.requests.length),
|
|
765
|
+
Stream.filter((request) => request.path === "/orders/42"),
|
|
766
|
+
);
|
|
767
|
+
yield* collectUntil(arrivals, (requests) => requests.length === 3, { name: "three order requests received" });
|
|
768
|
+
```
|
|
769
|
+
|
|
770
|
+
Both streams replay observations from acquisition to each subscriber independently. A wait can therefore start before or after arrival or completion; observing one request does not consume another observer's signal. Use different predicates to wait for individual requests, or drop earlier observations as above when requests share a path. These waits use `until`'s live-time deadline and `SignalNotReceived` diagnostics.
|
|
771
|
+
|
|
772
|
+
`untilAbandoned(matches, options)` returns the request record when the connection closes before its response finishes, including a held request or a stalled response body. Completed responses do not emit this signal, and abandoned responses do not emit `completed`. An unfinished connection closed by a scripted fault also qualifies; the signal observes the connection, not who closed it.
|
|
744
773
|
|
|
745
774
|
```ts
|
|
746
775
|
const abandoned = yield* service.untilAbandoned(
|
|
@@ -757,7 +786,7 @@ After the engine has been created, a failing story test adds the story to its fi
|
|
|
757
786
|
- a short guide to reading the story, in a box;
|
|
758
787
|
- every line in order, traits marked `given`;
|
|
759
788
|
- `✗` after the last line, on the trait that refused, or alone when the test failed before the story told a line, and under it the spec line where the test stopped or that named the refusing trait;
|
|
760
|
-
- the engine's state from `inspect` as JSON, broken between its fields to fit 120 columns. State longer than 2,000 characters is written to `node_modules/.cache/test-story/` under the working directory, and the failure names the file;
|
|
789
|
+
- the engine's state from `inspect` as JSON, broken between its fields to fit 120 columns. State longer than 2,000 characters is written to `node_modules/.cache/test-story/` under the working directory, and the failure names the file. If writing fails, the report keeps the story and shows the filesystem error;
|
|
761
790
|
- the command that reruns the test, with `-t` on a second line when one line would pass 120 columns.
|
|
762
791
|
|
|
763
792
|
The package wraps between words or JSON fields toward 120 columns and prints the story's own lines whole. An indivisible word, field or rerun command component can exceed that width. A passing test adds nothing. A typed failure with no message, such as an `after` hook's `NoBowls`, prints by its tag.
|
|
@@ -867,7 +896,7 @@ socialApp.it("a social sign-in returns with a cookie session", [], function* ({
|
|
|
867
896
|
|
|
868
897
|
#### Several members on one host
|
|
869
898
|
|
|
870
|
-
Use `memberScreens` from `@shivaedev/test-story/server/memberScreens.ts` inside a DOM kit's `create` hook. Supply `baseUrl`, `mount(member)` returning an Effect, and `verbs(member, tell)` returning that member's verbs and readouts. Each `MemberScreen` carries its `name`, `fetch`, `registry` and `root`. Mount the application into that root with that registry, and give its auth and HTTP clients the member's fetch. Cookie contexts are independent even when every member uses the same host.
|
|
899
|
+
Use `memberScreens` from `@shivaedev/test-story/server/memberScreens.ts` inside a DOM kit's `create` hook. Supply `baseUrl`, `mount(member)` returning an Effect, and `verbs(member, tell)` returning that member's verbs and readouts. Each `MemberScreen` carries its `name`, `fetch`, `registry` and `root`. Mount the application into that root with that registry, and give its auth and HTTP clients the member's fetch. Cookie contexts are independent even when every member uses the same host. Each member's screen driver finds dialogs inside that member's root and body portals linked by an element in that root through `aria-controls`. Give body portals unique IDs and point each member's trigger at its own dialog. Unlinked body dialogs remain outside member screens; standalone drivers can find document-wide portals.
|
|
871
900
|
|
|
872
901
|
A trait calls `yield* members.open("ada", cookies)` with a minted session's cookies. The kit's verbs hook returns `members.verbs(story.tell)`, exposing `as("ada")` to the spec. Member narration includes the name. The calling Scope closes every cookie context, disposes every registry and removes every root. Register renderer unmounting in the mount hook with `Effect.acquireRelease` so it runs before the registry and root are released.
|
|
873
902
|
|
|
@@ -934,14 +963,20 @@ yield* screen.settle();
|
|
|
934
963
|
expect(screen.text("output")).toBe("Saved title");
|
|
935
964
|
```
|
|
936
965
|
|
|
937
|
-
This form of `settle()` observes client activity changes and flushes the renderer before returning. Finite RPC calls, coalesced invalidations and refreshing query atoms all keep it waiting; subscription streams themselves do not. `find()` waits for idle client activity and a matching target, including a target rendered by a later DOM mutation. Keep live coalescing enabled. `nextLiveHint()` waits for the next subscription update received after the verb starts, including initial or resync updates; it does not wait for a refresh. Start the wait before another viewer writes, then settle before reading the resulting screen. It needs client activity; a callback-only driver fails with `MissingClientActivity`.
|
|
966
|
+
This form of `settle()` observes client activity changes and flushes the renderer before returning. Finite RPC calls, coalesced invalidations and refreshing query atoms all keep it waiting; subscription streams themselves do not. `find()` waits for idle client activity and a matching target, including a target rendered by a later DOM mutation. Keep live coalescing enabled. `nextLiveHint()` waits for the next subscription update received after the verb starts, including initial or resync updates; it does not wait for a refresh. Start the wait before another viewer writes, then settle before reading the resulting screen. If the client activity stream ends without a new hint, the wait fails with `SignalNotReceived` from `server/until.ts`. It needs client activity; a callback-only driver fails with `MissingClientActivity`.
|
|
938
967
|
|
|
939
|
-
`click(selector)`, `enter(selector, value)`, `select(selector, value)` and `submit(selector = "form")` return Effects. Selectors identify exactly one descendant of the root or a dialog portalled into its document; missing or ambiguous controls fail. Hidden targets and targets inside hidden ancestors refuse actions and readouts. Text entry focuses an input or textarea and dispatches input and change events. Select focuses a native `<select>`, sets an available option value and dispatches change inside `act`. Disabled controls refuse clicks, entry and selection, inert ancestors also prevent form submission, and read-only fields refuse entry. Actions do not wait for settlement, so a story can release a held request before calling `settle()`.
|
|
968
|
+
`click(selector)`, `enter(selector, value)`, `select(selector, value)` and `submit(selector = "form")` return Effects. Selectors identify exactly one descendant of the root or a dialog portalled into its document (owned by that member for `memberScreens`); missing or ambiguous controls fail. Hidden targets and targets inside hidden ancestors refuse actions and readouts. Text entry focuses an input or textarea and dispatches input and change events. Select focuses a native `<select>`, sets an available option value and dispatches change inside `act`. Disabled controls refuse clicks, entry and selection, inert ancestors also prevent form submission, and read-only fields refuse entry. Actions do not wait for settlement, so a story can release a held request before calling `settle()`.
|
|
940
969
|
|
|
941
970
|
`within(container)` returns the same driver scoped to that container, including nested `within` calls. Pass a selector, a role/name target or an `HTMLElement`. Selector and role containers must resolve to one rendered descendant and use the usual missing or ambiguous target diagnostics. For example, `within({ role: "region", name: "Billing" }).click({ role: "button", name: "Save" })` can address a Save button when Delivery has an identical button. A scoped driver searches only that container, including when the container is a portalled dialog. Settlement keeps the original pending signal and error type.
|
|
942
971
|
|
|
972
|
+
`dialog(target)` searches under `body` for exactly one visible native dialog, `role="dialog"` or `role="alertdialog"` matching a selector or role/name target, then returns a driver scoped to it. It keeps the original driver’s member ownership, renderer and pending signal, including through nested scopes. For example, `screen.dialog({ role: "dialog", name: "Preferences" }).click({ role: "button", name: "Confirm" })` acts only inside that screen's Preferences dialog, even when another member has an identically named body portal. The member's trigger must link a body portal through `aria-controls`.
|
|
973
|
+
|
|
943
974
|
`text(selector?)` reads visible HTML text from the selected element or the whole root. Block boundaries (using CSS display) and `<br>` separate adjacent text with a newline when there is no existing whitespace; inline text, including emphasis, stays joined. A card's title, message and action read as separate parts. Text transforms and layout wrapping are not applied. `value(selector)` returns the current input or textarea value. Both narrate what they read through `tell` and leave assertions to the spec. Entry narration omits the supplied value.
|
|
944
975
|
|
|
976
|
+
`labelledText(label)` reads visible text from one element named by `aria-label`, `aria-labelledby` or a native form label. It accepts an exact string or a regular expression and fails for missing, hidden or ambiguous readouts. For example, `labelledText("Summary")` reads a labelled region without needing its role or CSS selector.
|
|
977
|
+
|
|
978
|
+
`table(label)` finds a native HTML table by its accessible name, including a heading referenced through `aria-labelledby`, and returns an array of rows, each an array of visible cell text. Header and body rows retain DOM order; hidden rows, cells and nested hidden text are excluded. For example, `table("Ready deliveries")` returns `[["City", "Status"], ["London", "Ready"], ["Paris", "In transit"]]`. Strings match exactly and regular expressions match the table's name. These readouts narrate their results through `tell` and leave assertions to the spec.
|
|
979
|
+
|
|
945
980
|
`click`, `enter`, `select`, `submit`, `text` and `value` also accept a `ScreenTarget` object such as `{ role: "button", name: "Save" }` or `{ role: "textbox", name: /email/i }`. The role and computed accessible name must match exactly when strings are used; regular expressions match the name. An alert without an accessible name can instead match its visible text. Like Testing Library's role queries, these targets exclude hidden elements, including `aria-hidden` ancestors. Missing or ambiguous targets fail with the requested role, name and the visible candidates on screen. Narration names the role and name instead of a selector.
|
|
946
981
|
|
|
947
982
|
`find(target, { timeout }?)` returns an Effect that waits for exactly one matching rendered element and returns that `HTMLElement`. It accepts the same selectors and role/name targets as the actions and narrates the lookup. Its normal live-time budget is 3 seconds, configurable with the driver's `timeoutMs`. While the screen shows a rendered, accessible loading indicator (`role="status"`, `aria-busy="true"`, `Loading…` or `Loading...` text) or an open dialog, the default wait extends to a total of 10 seconds, configurable with `loadingTimeoutMs`. This lets screen transitions take longer on loaded runners. The root and portalled dialogs count; `within` keeps loading detection inside its scope. Once the normal budget has passed, an idle screen without the target fails immediately with the usual target diagnostics, including visible candidates for role/name targets. A per-call `timeout` sets a hard deadline in milliseconds, including while loading.
|
|
@@ -971,7 +1006,7 @@ const client = makeClient(Notes, { protocol: observed.protocol, url });
|
|
|
971
1006
|
|
|
972
1007
|
Expose `observed.readCount`, `observed.reads`, `observed.hints` and `observed.watchHints` through the kit's verbs. `readCount()` counts query requests and `$changes` subscription openings; `readCount("notes.list")` selects one tag. `reads()` returns their `tag`, encoded `payload` and `kind` (`"query"` or `"subscription"`), in send order. Commands and protocol acknowledgements do not count. `hints()` returns the `LiveHint` values received for those subscriptions, including `Resync`.
|
|
973
1008
|
|
|
974
|
-
`observed.subscriptions()` returns each opening's `tag`, encoded `payload` and `state`: `"open"`, `"answered"` after its first streamed value,
|
|
1009
|
+
`observed.subscriptions()` returns each opening's `tag`, encoded `payload` and `state`: `"open"`, `"answered"` after its first streamed value, `"refused"` with `refusalTag` from a tagged failure Exit, or `"closed"` when the stream completes empty, dies or disconnects before answering. A refusal or closure is not a hint. Expose `observed.waitForSubscriptions` through the kit and `yield* waitForSubscriptions` after the page has opened its subscriptions. It waits on response signals until every opening has answered, been refused or closed. Closing a client also closes its unanswered openings and leaves other clients' openings pending. It has no polling budget and resolves immediately when no opening is pending. It does not wait for future navigation to open subscriptions or for React to render.
|
|
975
1010
|
|
|
976
1011
|
A story calls `const hints = yield* watchHints()` before the write, then `yield* hints.next` to await its browser delivery. Each watcher buffers its own future deliveries until the calling Scope closes. The wait uses the transport's signal with no polling budget. A hint means the browser received it; wait on the application's query or screen signal separately before asserting its rendered result or refetch count. Give another page its own readout to keep its traffic separate.
|
|
977
1012
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installOutbound.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/installOutbound.ts"],"names":[],"mappings":"AA6EA,wBAAsB,eAAe,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,EAAE,MAAM,UAAO,uBAqB5F"}
|
|
@@ -3,11 +3,20 @@ import { unrouted } from "#internal/errors.ts";
|
|
|
3
3
|
function isDispatcher(value) {
|
|
4
4
|
return typeof value === "object" && value !== null && "dispatch" in value && typeof value.dispatch === "function";
|
|
5
5
|
}
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
6
|
+
const registrations = new Set();
|
|
7
|
+
let restoreDispatchers;
|
|
8
|
+
function routingFor(hostname) {
|
|
9
|
+
let target;
|
|
10
|
+
let strict;
|
|
11
|
+
for (const registration of registrations) {
|
|
12
|
+
target = registration.origins.get(hostname) ?? target;
|
|
13
|
+
if (registration.strict) {
|
|
14
|
+
strict = registration;
|
|
15
|
+
}
|
|
16
|
+
}
|
|
17
|
+
return { strict, target };
|
|
18
|
+
}
|
|
19
|
+
function installDispatchers() {
|
|
11
20
|
const slots = ["undici.globalDispatcher.1", "undici.globalDispatcher.2"].flatMap((name) => {
|
|
12
21
|
const key = Symbol.for(name);
|
|
13
22
|
const previous = Reflect.get(globalThis, key);
|
|
@@ -26,13 +35,13 @@ export async function installOutbound(routes, strict = true) {
|
|
|
26
35
|
const router = {
|
|
27
36
|
dispatch(options, handler) {
|
|
28
37
|
const hostname = new URL(options.origin).hostname;
|
|
29
|
-
const target =
|
|
30
|
-
if (strict
|
|
38
|
+
const { strict, target } = routingFor(hostname);
|
|
39
|
+
if (strict !== undefined
|
|
31
40
|
&& target === undefined
|
|
32
41
|
&& !["localhost", "[::1]"].includes(hostname)
|
|
33
42
|
&& !(isIP(hostname) === 4 && hostname.startsWith("127."))) {
|
|
34
|
-
refused = unrouted(hostname);
|
|
35
|
-
throw refused;
|
|
43
|
+
strict.refused = unrouted(hostname);
|
|
44
|
+
throw strict.refused;
|
|
36
45
|
}
|
|
37
46
|
return previous.dispatch(target === undefined ? options : { ...options, origin: target }, handler);
|
|
38
47
|
},
|
|
@@ -44,10 +53,27 @@ export async function installOutbound(routes, strict = true) {
|
|
|
44
53
|
restore();
|
|
45
54
|
throw error;
|
|
46
55
|
}
|
|
56
|
+
return restore;
|
|
57
|
+
}
|
|
58
|
+
export async function installOutbound(routes, strict = true) {
|
|
59
|
+
const registration = {
|
|
60
|
+
origins: new Map(Object.entries(routes).map(([hostname, target]) => [hostname, new URL(target).origin])),
|
|
61
|
+
strict,
|
|
62
|
+
};
|
|
63
|
+
// A data URL initializes Node's bundled Undici without sending an HTTP request.
|
|
64
|
+
await fetch("data:,");
|
|
65
|
+
if (restoreDispatchers === undefined) {
|
|
66
|
+
restoreDispatchers = installDispatchers();
|
|
67
|
+
}
|
|
68
|
+
registrations.add(registration);
|
|
47
69
|
return () => {
|
|
48
|
-
|
|
49
|
-
if (
|
|
50
|
-
|
|
70
|
+
registrations.delete(registration);
|
|
71
|
+
if (registrations.size === 0) {
|
|
72
|
+
restoreDispatchers?.();
|
|
73
|
+
restoreDispatchers = undefined;
|
|
74
|
+
}
|
|
75
|
+
if (registration.refused !== undefined) {
|
|
76
|
+
throw registration.refused;
|
|
51
77
|
}
|
|
52
78
|
};
|
|
53
79
|
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"installOutbound.js","sourceRoot":"","sources":["../../../src/server/adapters/installOutbound.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAU/C,SAAS,YAAY,CAAC,KAAc;IACnC,OAAO,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,UAAU,IAAI,KAAK,IAAI,OAAO,KAAK,CAAC,QAAQ,KAAK,UAAU,CAAC;AACnH,CAAC;AAQD,MAAM,aAAa,GAAG,IAAI,GAAG,EAAgB,CAAC;AAC9C,IAAI,kBAA4C,CAAC;AAEjD,SAAS,UAAU,CAAC,QAAgB;IACnC,IAAI,MAA0B,CAAC;IAC/B,IAAI,MAAgC,CAAC;IACrC,KAAK,MAAM,YAAY,IAAI,aAAa,EAAE,CAAC;QAC1C,MAAM,GAAG,YAAY,CAAC,OAAO,CAAC,GAAG,CAAC,QAAQ,CAAC,IAAI,MAAM,CAAC;QACtD,IAAI,YAAY,CAAC,MAAM,EAAE,CAAC;YACzB,MAAM,GAAG,YAAY,CAAC;QACvB,CAAC;IACF,CAAC;IACD,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,CAAC;AAC3B,CAAC;AAED,SAAS,kBAAkB;IAC1B,MAAM,KAAK,GAAG,CAAC,2BAA2B,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AK,CAAC,EAAE,CAAC;YAC9B,kBAAkB,EAAE,EAAE,CAAC;YACvB,kBAAkB,GAAG,SAAS,CAAC;QAChC,CAAC;QACD,IAAI,YAAY,CAAC,OAAO,KAAK,SAAS,EAAE,CAAC;YACxC,MAAM,YAAY,CAAC,OAAO,CAAC;QAC5B,CAAC;IACF,CAAC,CAAC;AACH,CAAC"}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import * as Effect from "effect/Effect";
|
|
2
2
|
import type { ScreenDriverOptions } from "#screenDriver.ts";
|
|
3
|
-
export declare function screenAct(act: NonNullable<ScreenDriverOptions["act"]>, action: Effect.Effect<void>): Effect.Effect<void,
|
|
3
|
+
export declare function screenAct<E>(act: NonNullable<ScreenDriverOptions["act"]>, action: Effect.Effect<void, E>): Effect.Effect<void, E, never>;
|
|
4
4
|
//# sourceMappingURL=screenAct.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenAct.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenAct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,wBAAgB,SAAS,CAAC,GAAG,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,
|
|
1
|
+
{"version":3,"file":"screenAct.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenAct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAExC,OAAO,KAAK,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAE5D,wBAAgB,SAAS,CAAC,CAAC,EAAE,GAAG,EAAE,WAAW,CAAC,mBAAmB,CAAC,KAAK,CAAC,CAAC,EAAE,MAAM,EAAE,MAAM,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC,CAAC,iCAexG"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenAct.js","sourceRoot":"","sources":["../../../src/server/adapters/screenAct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAGpC,MAAM,UAAU,SAAS,
|
|
1
|
+
{"version":3,"file":"screenAct.js","sourceRoot":"","sources":["../../../src/server/adapters/screenAct.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,IAAI,MAAM,aAAa,CAAC;AAGpC,MAAM,UAAU,SAAS,CAAI,GAA4C,EAAE,MAA8B;IACxG,OAAO,MAAM,CAAC,QAAQ,CAAU,CAAC,MAAM,EAAE,MAAM,EAAE,EAAE;QAClD,IAAI,OAAO,GAAuB,IAAI,CAAC,IAAI,CAAC;QAC5C,MAAM,SAAS,GAAG,OAAO,CAAC,OAAO,CAChC,GAAG,CAAC,KAAK,IAAI,EAAE;YACd,0FAA0F;YAC1F,OAAO,GAAG,MAAM,MAAM,CAAC,cAAc,CAAC,MAAM,EAAE,EAAE,MAAM,EAAE,CAAC,CAAC;QAC3D,CAAC,CAAC,CACF,CAAC;QACF,SAAS,CAAC,IAAI,CACb,GAAG,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,EACrF,CAAC,KAAc,EAAE,EAAE,CAAC,MAAM,CAAC,MAAM,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAC7C,CAAC;QACF,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC,SAAS,CAAC,CAAC;IACxC,CAAC,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenDialogs.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenDialogs.ts"],"names":[],"mappings":"AAEA,wBAAgB,aAAa,CAAC,IAAI,EAAE,WAAW,iBAS9C"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
const DIALOG_SELECTOR = 'dialog,[role="dialog"],[role="alertdialog"]';
|
|
2
|
+
export function screenDialogs(root) {
|
|
3
|
+
const member = root.closest("[data-story-member]");
|
|
4
|
+
const controls = member
|
|
5
|
+
? [...member.querySelectorAll("[aria-controls]")].flatMap((element) => element.getAttribute("aria-controls")?.split(/\s+/u) ?? [])
|
|
6
|
+
: [];
|
|
7
|
+
return [...root.ownerDocument.body.querySelectorAll(DIALOG_SELECTOR)].filter((dialog) => !dialog.matches("dialog:not([open])") && (member === null || member.contains(dialog) || (dialog.id !== "" && controls.includes(dialog.id))));
|
|
8
|
+
}
|
|
9
|
+
//# sourceMappingURL=screenDialogs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"screenDialogs.js","sourceRoot":"","sources":["../../../src/server/adapters/screenDialogs.ts"],"names":[],"mappings":"AAAA,MAAM,eAAe,GAAG,6CAA6C,CAAC;AAEtE,MAAM,UAAU,aAAa,CAAC,IAAiB;IAC9C,MAAM,MAAM,GAAG,IAAI,CAAC,OAAO,CAAC,qBAAqB,CAAC,CAAC;IACnD,MAAM,QAAQ,GAAG,MAAM;QACtB,CAAC,CAAC,CAAC,GAAG,MAAM,CAAC,gBAAgB,CAAC,iBAAiB,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,OAAO,CAAC,YAAY,CAAC,eAAe,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,IAAI,EAAE,CAAC;QAClI,CAAC,CAAC,EAAE,CAAC;IACN,OAAO,CAAC,GAAG,IAAI,CAAC,aAAa,CAAC,IAAI,CAAC,gBAAgB,CAAc,eAAe,CAAC,CAAC,CAAC,MAAM,CACxF,CAAC,MAAM,EAAE,EAAE,CACV,CAAC,MAAM,CAAC,OAAO,CAAC,oBAAoB,CAAC,IAAI,CAAC,MAAM,KAAK,IAAI,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,QAAQ,CAAC,QAAQ,CAAC,MAAM,CAAC,EAAE,CAAC,CAAC,CAAC,CAC5I,CAAC;AACH,CAAC"}
|
|
@@ -1,14 +1,17 @@
|
|
|
1
1
|
import { screenText } from "#internal/screenText.ts";
|
|
2
2
|
import type { ScreenTarget } from "#screenDriver.ts";
|
|
3
3
|
export declare function screenElements(root: () => HTMLElement, dialogs?: boolean): {
|
|
4
|
+
dialog: (target: ScreenTarget) => HTMLElement;
|
|
4
5
|
element: (selector: ScreenTarget) => HTMLElement;
|
|
5
6
|
enabled: (found: HTMLElement, selector: ScreenTarget) => void;
|
|
6
7
|
enter: (selector: ScreenTarget, value: string) => void;
|
|
7
8
|
form: (selector: ScreenTarget) => HTMLFormElement;
|
|
8
9
|
input: (selector: ScreenTarget) => HTMLInputElement | HTMLTextAreaElement;
|
|
10
|
+
labelled: (name: string | RegExp) => HTMLElement;
|
|
9
11
|
matches: (target: ScreenTarget) => HTMLElement[];
|
|
10
12
|
rendered: (found: HTMLElement, selector: string) => HTMLElement;
|
|
11
13
|
select: (selector: ScreenTarget, value: string) => void;
|
|
14
|
+
table: (selector: ScreenTarget) => HTMLTableElement;
|
|
12
15
|
text: typeof screenText;
|
|
13
16
|
textElement: (text: string | RegExp) => HTMLElement;
|
|
14
17
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenElements.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,WAAW,EAAE,OAAO,UAAO
|
|
1
|
+
{"version":3,"file":"screenElements.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenElements.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AACrD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAGrD,wBAAgB,cAAc,CAAC,IAAI,EAAE,MAAM,WAAW,EAAE,OAAO,UAAO;;wBAQ1C,YAAY;qBAsBf,WAAW,YAAY,YAAY;sBASxC,YAAY,SAAS,MAAM;qBAY5B,YAAY;sBA9BL,YAAY;;;sBAnBZ,WAAW,YAAY,MAAM;uBA6DlC,YAAY,SAAS,MAAM;sBAa5B,YAAY;;;EAU/B"}
|
|
@@ -33,6 +33,7 @@ export function screenElements(root, dialogs = true) {
|
|
|
33
33
|
}
|
|
34
34
|
}
|
|
35
35
|
return {
|
|
36
|
+
dialog: queries.dialogElement,
|
|
36
37
|
element,
|
|
37
38
|
enabled,
|
|
38
39
|
enter: (selector, value) => {
|
|
@@ -56,6 +57,7 @@ export function screenElements(root, dialogs = true) {
|
|
|
56
57
|
return found;
|
|
57
58
|
},
|
|
58
59
|
input,
|
|
60
|
+
labelled: queries.labelledElement,
|
|
59
61
|
matches: queries.matches,
|
|
60
62
|
rendered,
|
|
61
63
|
select: (selector, value) => {
|
|
@@ -71,6 +73,13 @@ export function screenElements(root, dialogs = true) {
|
|
|
71
73
|
field.value = value;
|
|
72
74
|
field.dispatchEvent(new Event("change", { bubbles: true }));
|
|
73
75
|
},
|
|
76
|
+
table: (selector) => {
|
|
77
|
+
const found = element(selector);
|
|
78
|
+
if (!(found instanceof HTMLTableElement)) {
|
|
79
|
+
throw new Error(`The screen's ${targetName(selector)} is not an HTML table.\nhelp: Select a native table to read its rows and cells.`);
|
|
80
|
+
}
|
|
81
|
+
return found;
|
|
82
|
+
},
|
|
74
83
|
text: screenText,
|
|
75
84
|
textElement: queries.textElement,
|
|
76
85
|
};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenElements.js","sourceRoot":"","sources":["../../../src/server/adapters/screenElements.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;AAErD,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD,MAAM,UAAU,cAAc,CAAC,IAAuB,EAAE,OAAO,GAAG,IAAI;IACrE,MAAM,OAAO,GAAG,aAAa,CAAC,IAAI,EAAE,OAAO,CAAC,CAAC;IAC7C,SAAS,QAAQ,CAAC,KAAkB,EAAE,QAAgB;QACrD,IAAI,CAAC,UAAU,CAAC,KAAK,CAAC,EAAE,CAAC;YACxB,MAAM,IAAI,KAAK,CAAC,gBAAgB,QAAQ,8FAA8F,CAAC,CAAC;QACzI,CAAC;QACD,OAAO,KAAK,CAAC;IACd,CAAC;IACD,SAAS,OAAO,CAAC,QAAsB;QACtC,IAAI,OAAO,QAAQ,KAAK,QAAQ,EAAE,CAAC;YAClC,OAAO,OAAO,CAAC,WAAW,CAAC,QAAQ,CAAC,CAAC;QACtC,CAAC;QACD,MAAM,OAAO,GAAG,OAAO,CAAC,KAAK,CAAC,QAAQ,CAAC,CAAC;QACxC,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;QACzB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;YACjD,MAAM,IAAI,KAAK,CACd,kBAAkB,OAAO,CAAC,MAAM,gBAAgB,IAAI,CAAC,SAAS,CAAC,QAAQ,CAAC,sEAAsE,CAC9I,CAAC;QACH,CAAC;QACD,OAAO,QAAQ,CAAC,KAAK,EAAE,QAAQ,CAAC,CAAC;IAClC,CAAC;IACD,SAAS,KAAK,CAAC,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AAC,EAAE,CAAC;gBACzE,MAAM,IAAI,KAAK,CAAC,gBAAgB,UAAU,CAAC,QAAQ,CAAC,kBAAkB,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,4CAA4C,CAAC,CAAC;YAC1I,CAAC;YACD,KAAK,CAAC,KAAK,EAAE,CAAC;YACd,KAAK,CAAC,KAAK,GAAG,KAAK,CAAC;YACpB,KAAK,CAAC,aAAa,CAAC,IAAI,KAAK,CAAC,QAAQ,EAAE,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC,CAAC;QAC7D,CAAC;QACD,KAAK,EAAE,CAAC,QAAsB,EAAE,EAAE;YACjC,MAAM,KAAK,GAAG,OAAO,CAAC,QAAQ,CAAC,CAAC;YAChC,IAAI,CAAC,CAAC,KAAK,YAAY,gBAAgB,CAAC,EAAE,CAAC;gBAC1C,MAAM,IAAI,KAAK,CAAC,gBAAgB,UAAU,CAAC,QAAQ,CAAC,iFAAiF,CAAC,CAAC;YACxI,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;QACD,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,OAAO,CAAC,WAAW;KAChC,CAAC;AACH,CAAC"}
|
|
@@ -1,5 +1,7 @@
|
|
|
1
1
|
import type { ScreenTarget } from "#screenDriver.ts";
|
|
2
2
|
export declare function screenQueries(root: () => HTMLElement, dialogs: boolean): {
|
|
3
|
+
dialogElement: (target: ScreenTarget) => HTMLElement;
|
|
4
|
+
labelledElement: (name: string | RegExp) => HTMLElement;
|
|
3
5
|
matches: (target: ScreenTarget) => HTMLElement[];
|
|
4
6
|
query: (selector: string) => HTMLElement[];
|
|
5
7
|
roleElement: (target: Exclude<ScreenTarget, string>) => HTMLElement;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenQueries.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenQueries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;
|
|
1
|
+
{"version":3,"file":"screenQueries.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenQueries.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAOrD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,WAAW,EAAE,OAAO,EAAE,OAAO;4BA4B7C,YAAY;4BAmBZ,MAAM,GAAG,MAAM;sBAUrB,YAAY;sBAxDN,MAAM;0BA6DR,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;wBAa/B,MAAM,GAAG,MAAM;EAepC"}
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { isInaccessible } from "dom-accessibility-api";
|
|
2
2
|
import { accessibility, isRendered, targetName } from "#internal/screenAccessibility.ts";
|
|
3
3
|
import { screenText } from "#internal/screenText.ts";
|
|
4
|
+
import { screenDialogs } from "./screenDialogs.js";
|
|
4
5
|
function matchesText(value, expected) {
|
|
5
6
|
return typeof expected === "string" ? value === expected : new RegExp(expected.source, expected.flags).test(value);
|
|
6
7
|
}
|
|
@@ -8,9 +9,7 @@ export function screenQueries(root, dialogs) {
|
|
|
8
9
|
function query(selector) {
|
|
9
10
|
const current = root();
|
|
10
11
|
const found = new Set(current.querySelectorAll(selector));
|
|
11
|
-
const portals = dialogs
|
|
12
|
-
? [...current.ownerDocument.querySelectorAll('dialog,[role="dialog"],[role="alertdialog"]')].filter((dialog) => !current.contains(dialog))
|
|
13
|
-
: [];
|
|
12
|
+
const portals = dialogs ? screenDialogs(current).filter((dialog) => !current.contains(dialog)) : [];
|
|
14
13
|
for (const dialog of portals) {
|
|
15
14
|
if (dialog.matches(selector)) {
|
|
16
15
|
found.add(dialog);
|
|
@@ -34,6 +33,31 @@ export function screenQueries(root, dialogs) {
|
|
|
34
33
|
return candidates().filter(({ role, name }) => role === target.role && matchesText(name, target.name));
|
|
35
34
|
}
|
|
36
35
|
return {
|
|
36
|
+
dialogElement: (target) => {
|
|
37
|
+
const matches = screenDialogs(root()).filter((dialog) => {
|
|
38
|
+
if (!isRendered(dialog) || isInaccessible(dialog)) {
|
|
39
|
+
return false;
|
|
40
|
+
}
|
|
41
|
+
if (typeof target === "string") {
|
|
42
|
+
return dialog.matches(target);
|
|
43
|
+
}
|
|
44
|
+
const { name, role } = accessibility(dialog);
|
|
45
|
+
return role === target.role && matchesText(name, target.name);
|
|
46
|
+
});
|
|
47
|
+
const found = matches[0];
|
|
48
|
+
if (matches.length !== 1 || found === undefined) {
|
|
49
|
+
throw new Error(`The screen has ${matches.length} dialogs for ${targetName(target)}.\nhelp: Identify exactly one visible dialog owned by this screen; link body portals from the member's trigger with aria-controls.`);
|
|
50
|
+
}
|
|
51
|
+
return found;
|
|
52
|
+
},
|
|
53
|
+
labelledElement: (name) => {
|
|
54
|
+
const matches = query("[aria-label],[aria-labelledby],button,input,textarea,select,output,meter,progress").filter((element) => isRendered(element) && !isInaccessible(element) && matchesText(accessibility(element).name, name));
|
|
55
|
+
const found = matches[0];
|
|
56
|
+
if (matches.length !== 1 || found === undefined) {
|
|
57
|
+
throw new Error(`The screen has ${matches.length} elements labelled ${String(name)}.\nhelp: Use a label for exactly one visible readout.`);
|
|
58
|
+
}
|
|
59
|
+
return found;
|
|
60
|
+
},
|
|
37
61
|
matches: (target) => (typeof target === "string" ? query(target).filter(isRendered) : roles(target).map(({ element }) => element)).filter((element) => element.isConnected),
|
|
38
62
|
query,
|
|
39
63
|
roleElement: (target) => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"screenQueries.js","sourceRoot":"","sources":["../../../src/server/adapters/screenQueries.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AACvD,OAAO,EAAE,aAAa,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,kCAAkC,CAAC;AACzF,OAAO,EAAE,UAAU,EAAE,MAAM,yBAAyB,CAAC;
|
|
1
|
+
{"version":3,"file":"screenQueries.js","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AC,OAAO,CAAC,OAAO,EAAE,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,IAAI,CAAC,CACvG,CAAC;YACF,MAAM,OAAO,GAAG,OAAO,CAAC,MAAM,CAAC,CAAC,OAAO,EAAE,EAAE,CAAC,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,OAAO,KAAK,KAAK,IAAI,OAAO,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC;YACpH,MAAM,KAAK,GAAG,OAAO,CAAC,CAAC,CAAC,CAAC;YACzB,IAAI,OAAO,CAAC,MAAM,KAAK,CAAC,IAAI,KAAK,KAAK,SAAS,EAAE,CAAC;gBACjD,MAAM,IAAI,KAAK,CACd,kBAAkB,OAAO,CAAC,MAAM,qBAAqB,MAAM,CAAC,IAAI,YAAY,MAAM,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,gEAAgE,CACjL,CAAC;YACH,CAAC;YACD,OAAO,KAAK,CAAC;QACd,CAAC;KACD,CAAC;AACH,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeSnapshot.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/writeSnapshot.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,4BAA4B,CAAC;AAW7D,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,EAAE,IAAI,EAAE,UAAU,EAAE,KAAK,EAAE,OAAO,EAAE,UAAU,EAAE,MAAM,GAAG,MAAM,EAAE,CAU1G"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
import { mkdirSync, writeFileSync } from "node:fs";
|
|
2
|
+
import { basename, dirname, join, relative } from "node:path";
|
|
3
|
+
import process from "node:process";
|
|
4
|
+
import { describeValue, toJson } from "#internal/render.ts";
|
|
5
|
+
import { wrap } from "#internal/wrap.ts";
|
|
6
|
+
function slug(text) {
|
|
7
|
+
return text
|
|
8
|
+
.toLowerCase()
|
|
9
|
+
.replaceAll(/[^a-z0-9.]+/gu, "-")
|
|
10
|
+
.slice(0, 80);
|
|
11
|
+
}
|
|
12
|
+
export function writeSnapshot(name, test, value, characters) {
|
|
13
|
+
const heading = `The ${name} when the test failed`;
|
|
14
|
+
const file = join(process.cwd(), "node_modules", ".cache", "test-story", `${slug(basename(test.file))}--${slug(test.name)}--${slug(name)}.json`);
|
|
15
|
+
try {
|
|
16
|
+
mkdirSync(dirname(file), { recursive: true });
|
|
17
|
+
writeFileSync(file, toJson(value, 2));
|
|
18
|
+
}
|
|
19
|
+
catch (error) {
|
|
20
|
+
return wrap(`${heading} could not be written to ${relative(process.cwd(), file)}: ${describeValue(error)}`);
|
|
21
|
+
}
|
|
22
|
+
return wrap(`${heading} is ${characters} characters of JSON, too long to print here. Read it in ${relative(process.cwd(), file)}`);
|
|
23
|
+
}
|
|
24
|
+
//# sourceMappingURL=writeSnapshot.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"writeSnapshot.js","sourceRoot":"","sources":["../../../src/server/adapters/writeSnapshot.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AACnD,OAAO,EAAE,QAAQ,EAAE,OAAO,EAAE,IAAI,EAAE,QAAQ,EAAE,MAAM,WAAW,CAAC;AAC9D,OAAO,OAAO,MAAM,cAAc,CAAC;AAEnC,OAAO,EAAE,aAAa,EAAE,MAAM,EAAE,MAAM,qBAAqB,CAAC;AAC5D,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AAEzC,SAAS,IAAI,CAAC,IAAY;IACzB,OAAO,IAAI;SACT,WAAW,EAAE;SACb,UAAU,CAAC,eAAe,EAAE,GAAG,CAAC;SAChC,KAAK,CAAC,CAAC,EAAE,EAAE,CAAC,CAAC;AAChB,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAY,EAAE,IAAgB,EAAE,KAAc,EAAE,UAAkB;IAC/F,MAAM,OAAO,GAAG,OAAO,IAAI,uBAAuB,CAAC;IACnD,MAAM,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,cAAc,EAAE,QAAQ,EAAE,YAAY,EAAE,GAAG,IAAI,CAAC,QAAQ,CAAC,IAAI,CAAC,IAAI,CAAC,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,KAAK,IAAI,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;IACjJ,IAAI,CAAC;QACJ,SAAS,CAAC,OAAO,CAAC,IAAI,CAAC,EAAE,EAAE,SAAS,EAAE,IAAI,EAAE,CAAC,CAAC;QAC9C,aAAa,CAAC,IAAI,EAAE,MAAM,CAAC,KAAK,EAAE,CAAC,CAAC,CAAC,CAAC;IACvC,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QAChB,OAAO,IAAI,CAAC,GAAG,OAAO,4BAA4B,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,KAAK,aAAa,CAAC,KAAK,CAAC,EAAE,CAAC,CAAC;IAC7G,CAAC;IACD,OAAO,IAAI,CAAC,GAAG,OAAO,OAAO,UAAU,2DAA2D,QAAQ,CAAC,OAAO,CAAC,GAAG,EAAE,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC;AACpI,CAAC"}
|
|
@@ -5,7 +5,7 @@ export type BrowserSubscription = {
|
|
|
5
5
|
readonly payload: unknown;
|
|
6
6
|
readonly tag: string;
|
|
7
7
|
} & ({
|
|
8
|
-
readonly state: "open" | "answered";
|
|
8
|
+
readonly state: "open" | "answered" | "closed";
|
|
9
9
|
} | {
|
|
10
10
|
readonly state: "refused";
|
|
11
11
|
readonly refusalTag: string;
|
|
@@ -53,7 +53,7 @@ export declare const browserReads: (options: BrowserReadsOptions) => Effect.Effe
|
|
|
53
53
|
subscriptions: () => ({
|
|
54
54
|
payload: unknown;
|
|
55
55
|
tag: string;
|
|
56
|
-
state: "open" | "answered";
|
|
56
|
+
state: "open" | "answered" | "closed";
|
|
57
57
|
} | {
|
|
58
58
|
payload: unknown;
|
|
59
59
|
tag: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"browserReads.d.ts","sourceRoot":"","sources":["../../src/server/browserReads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACrB,GAAG,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;
|
|
1
|
+
{"version":3,"file":"browserReads.d.ts","sourceRoot":"","sources":["../../src/server/browserReads.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AACxC,OAAO,KAAK,KAAK,KAAK,MAAM,cAAc,CAAC;AAC3C,OAAO,KAAK,KAAK,MAAM,MAAM,sBAAsB,CAAC;AAEpD,MAAM,MAAM,mBAAmB,GAAG;IACjC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACrB,GAAG,CAAC;IAAE,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,UAAU,GAAG,QAAQ,CAAA;CAAE,GAAG;IAAE,QAAQ,CAAC,KAAK,EAAE,SAAS,CAAC;IAAC,QAAQ,CAAC,UAAU,EAAE,MAAM,CAAA;CAAE,CAAC,CAAC;AAEtH,MAAM,WAAW,WAAW;IAC3B,QAAQ,CAAC,IAAI,EAAE,OAAO,GAAG,cAAc,CAAC;IACxC,QAAQ,CAAC,OAAO,EAAE,OAAO,CAAC;IAC1B,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;CACrB;AAED,MAAM,WAAW,mBAAmB;IACnC,QAAQ,CAAC,SAAS,EAAE,SAAS;QAC5B,QAAQ,CAAC,WAAW,EAAE;YAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;YAAC,QAAQ,CAAC,OAAO,EAAE,SAAS;gBAAE,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAA;aAAE,EAAE,CAAA;SAAE,CAAC;KACxG,EAAE,CAAC;IACJ,QAAQ,CAAC,OAAO,CAAC,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC;IACpD,QAAQ,CAAC,GAAG,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,oBAAoB,CAAC,EAAE,KAAK,CAAC,KAAK,CAAC,MAAM,CAAC,oBAAoB,CAAC,CAAC;CACzE;AAED,eAAO,MAAM,YAAY;;;;;;;;;;;;;;;;;;;;;;;iBAnBN,OAAO;aACX,MAAM;eACE,MAAM,GAAG,UAAU,GAAG,QAAQ;;iBAFlC,OAAO;aACX,MAAM;eACuD,SAAS;oBAAuB,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;uCAoBhH,CAAC"}
|
|
@@ -8,7 +8,7 @@ const domEnvironment = {
|
|
|
8
8
|
// Vitest loads environments outside the project's source resolution conditions.
|
|
9
9
|
const load = createRequire(import.meta.url);
|
|
10
10
|
const { documentTransport } = load("#internal/documentTransport.ts");
|
|
11
|
-
const { installOutbound } = load("#
|
|
11
|
+
const { installOutbound } = load("#adapters/installOutbound.ts");
|
|
12
12
|
const { installDomTimers } = load("#internal/installDomTimers.ts");
|
|
13
13
|
const native = Object.fromEntries(["fetch", "AbortController", "AbortSignal", "Headers", "Request", "Response"].map((name) => [name, Reflect.get(global, name)]));
|
|
14
14
|
const restoreOutbound = await installOutbound({}, true);
|
|
@@ -59,9 +59,11 @@ export interface FakeHttpHold {
|
|
|
59
59
|
readonly waiting: Effect.Effect<void>;
|
|
60
60
|
}
|
|
61
61
|
export declare const fakeHttpService: (options: FakeHttpServiceOptions) => Effect.Effect<{
|
|
62
|
+
completed: import("effect/Stream").Stream<FakeHttpRequestRecord, never, never>;
|
|
62
63
|
fault: (route: string, fault: FakeHttpFault, scope?: FakeHttpScope) => Effect.Effect<void, never, never>;
|
|
63
64
|
hold: (route: string, holdOptions?: FakeHttpHoldOptions) => Effect.Effect<FakeHttpHold, never, never>;
|
|
64
65
|
narrate: (sink: (line: string) => void) => void;
|
|
66
|
+
received: import("effect/Stream").Stream<FakeHttpRequestRecord, never, never>;
|
|
65
67
|
releaseOnArrival: (route: string, arrival: string, scope?: FakeHttpScope) => Effect.Effect<void, never, never>;
|
|
66
68
|
readonly requests: readonly FakeHttpRequestRecord[];
|
|
67
69
|
scriptFault: (route: string, fault: FakeHttpFault, scriptOptions?: FakeHttpScriptOptions) => Effect.Effect<FakeHttpScript, never, never>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"fakeHttpService.d.ts","sourceRoot":"","sources":["../../src/server/fakeHttpService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,KAAK,mBAAmB,EAAE,MAAM,WAAW,CAAC;AAEnE,OAAO,KAAK,MAAM,MAAM,eAAe,CAAC;AAKxC,OAAO,EAAE,KAAK,YAAY,EAAS,MAAM,WAAW,CAAC;AAErD,MAAM,WAAW,eAAe;IAC/B,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IACtB,QAAQ,CAAC,OAAO,EAAE,mBAAmB,CAAC;IACtC,QAAQ,CAAC,MAAM,EAAE,MAAM,CAAC;IACxB,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,MAAM,CAAC,MAAM,EAA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