@shivaedev/test-story 0.29.0 → 0.30.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.
Files changed (68) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/README.md +62 -34
  3. package/dist/server/adapters/outcomeMatchers.d.ts +12 -0
  4. package/dist/server/adapters/outcomeMatchers.d.ts.map +1 -0
  5. package/dist/server/adapters/outcomeMatchers.js +22 -0
  6. package/dist/server/adapters/outcomeMatchers.js.map +1 -0
  7. package/dist/server/{internal → adapters}/screenElements.d.ts +5 -2
  8. package/dist/server/adapters/screenElements.d.ts.map +1 -0
  9. package/dist/server/{internal → adapters}/screenElements.js +22 -5
  10. package/dist/server/adapters/screenElements.js.map +1 -0
  11. package/dist/server/adapters/screenMutations.d.ts +3 -0
  12. package/dist/server/adapters/screenMutations.d.ts.map +1 -0
  13. package/dist/server/adapters/screenMutations.js +11 -0
  14. package/dist/server/adapters/screenMutations.js.map +1 -0
  15. package/dist/server/adapters/screenNavigation.d.ts +3 -0
  16. package/dist/server/adapters/screenNavigation.d.ts.map +1 -0
  17. package/dist/server/adapters/screenNavigation.js +34 -0
  18. package/dist/server/adapters/screenNavigation.js.map +1 -0
  19. package/dist/server/adapters/screenQueries.d.ts +8 -0
  20. package/dist/server/adapters/screenQueries.d.ts.map +1 -0
  21. package/dist/server/adapters/screenQueries.js +62 -0
  22. package/dist/server/adapters/screenQueries.js.map +1 -0
  23. package/dist/server/internal/nextClientHint.d.ts +4 -0
  24. package/dist/server/internal/nextClientHint.d.ts.map +1 -0
  25. package/dist/server/internal/{screenActivity.js → nextClientHint.js} +1 -5
  26. package/dist/server/internal/nextClientHint.js.map +1 -0
  27. package/dist/server/internal/screenAccessibility.d.ts +0 -1
  28. package/dist/server/internal/screenAccessibility.d.ts.map +1 -1
  29. package/dist/server/internal/screenAccessibility.js +1 -22
  30. package/dist/server/internal/screenAccessibility.js.map +1 -1
  31. package/dist/server/internal/screenReadouts.d.ts +1 -1
  32. package/dist/server/internal/screenReadouts.d.ts.map +1 -1
  33. package/dist/server/internal/screenReadouts.js +3 -3
  34. package/dist/server/internal/screenReadouts.js.map +1 -1
  35. package/dist/server/internal/screenWaits.d.ts +28 -0
  36. package/dist/server/internal/screenWaits.d.ts.map +1 -0
  37. package/dist/server/internal/screenWaits.js +47 -0
  38. package/dist/server/internal/screenWaits.js.map +1 -0
  39. package/dist/server/internal/waitForScreen.d.ts +9 -0
  40. package/dist/server/internal/waitForScreen.d.ts.map +1 -0
  41. package/dist/server/internal/waitForScreen.js +36 -0
  42. package/dist/server/internal/waitForScreen.js.map +1 -0
  43. package/dist/server/outcomes.d.ts +8 -1
  44. package/dist/server/outcomes.d.ts.map +1 -1
  45. package/dist/server/outcomes.js +6 -6
  46. package/dist/server/outcomes.js.map +1 -1
  47. package/dist/server/screenDriver.d.ts +19 -9
  48. package/dist/server/screenDriver.d.ts.map +1 -1
  49. package/dist/server/screenDriver.js +18 -58
  50. package/dist/server/screenDriver.js.map +1 -1
  51. package/package.json +3 -3
  52. package/src/server/adapters/outcomeMatchers.ts +33 -0
  53. package/src/server/{internal → adapters}/screenElements.ts +22 -5
  54. package/src/server/adapters/screenMutations.ts +14 -0
  55. package/src/server/adapters/screenNavigation.ts +37 -0
  56. package/src/server/adapters/screenQueries.ts +75 -0
  57. package/src/server/internal/{screenActivity.ts → nextClientHint.ts} +1 -5
  58. package/src/server/internal/screenAccessibility.ts +1 -25
  59. package/src/server/internal/screenReadouts.ts +3 -3
  60. package/src/server/internal/screenWaits.ts +105 -0
  61. package/src/server/internal/waitForScreen.ts +48 -0
  62. package/src/server/outcomes.ts +19 -10
  63. package/src/server/screenDriver.ts +25 -73
  64. package/dist/server/internal/screenActivity.d.ts +0 -5
  65. package/dist/server/internal/screenActivity.d.ts.map +0 -1
  66. package/dist/server/internal/screenActivity.js.map +0 -1
  67. package/dist/server/internal/screenElements.d.ts.map +0 -1
  68. package/dist/server/internal/screenElements.js.map +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,28 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.30.0 - 2026-10-31
4
+
5
+ ### Added
6
+
7
+ - `test-story` exports `lessThan`, `atMost`, `greaterThan` and `atLeast` from `server/adapters/outcomeMatchers.ts` for numeric bounds, including in nested expected values. Failure diffs show the bound and received value.
8
+ - Supply a native `Stream<boolean>` as the screen driver's `pending` signal to wake settlement and target searches when application work changes without a DOM mutation.
9
+ - Wait for visible text with `findText`, removal or hiding with `gone`, and a destination URL prefix with `navigatedAway`. Wait failures name their targets in the story report.
10
+ - Change native select controls with `select(target, value)` inside the renderer's `act` adapter.
11
+
12
+ ### Changed
13
+
14
+ - The shared story-testing skill teaches ordered lazy outcomes, nested partial expectations and numeric bounds. Quality’s grouped-outcomes diagnostic recommends the ordered callback form.
15
+
16
+ ### Fixed
17
+
18
+ - Reach portalled dialogs from the screen driver while keeping `within` scopes local, and find unnamed alerts by their visible text.
19
+ - Avoid holding `act` open between DOM mutations when no pending signal is supplied.
20
+
21
+ ### Breaking
22
+
23
+ - `test-story` outcomes now takes an ordered list of `[label, () => readout(), expected]` rows. Migrate each `label: [readout(), expected]` object entry to a tuple and wrap its readout in a callback. Keep labels natural and put rows in their intended run order. Readouts are built only when their row starts. Expected objects match partially at every depth with native `toMatchObject` semantics; arrays retain length and order. Use a plain `expect(...).toEqual(...)` when exact object equality is required.
24
+ - Screen settlement and target searches react to DOM mutations instead of polling. Boolean pending samplers run on the initial check and mutations. Migrate samplers that complete work without a mutation to a pending stream. Target searches now wait for pending work to finish and for the target to render, with the existing timeout diagnostics.
25
+
3
26
  ## 0.29.0 - 2026-10-31
4
27
 
5
28
  ### Added
package/README.md CHANGED
@@ -308,10 +308,10 @@ app.it("exports the work span without the planted secret", [], function* ({ runW
308
308
  yield* runWork();
309
309
  yield* disposeRuntime();
310
310
 
311
- yield* outcomes({
312
- "exported spans": [exportedSpanNames(), ["CountWords"]],
313
- "exports with the planted secret": [exportsContaining("planted-secret"), 0],
314
- });
311
+ yield* outcomes([
312
+ ["exported spans", () => exportedSpanNames(), ["CountWords"]],
313
+ ["exports with the planted secret", () => exportsContaining("planted-secret"), 0],
314
+ ]);
315
315
  });
316
316
  ```
317
317
 
@@ -489,7 +489,7 @@ bakery.it("tells each step into the story", [ovenIsLit()], function* ({ baker, o
489
489
 
490
490
  A spec starts a story, acts through verbs and checks what a user would see. When it needs a setup or an action the kit lacks, add a trait or verb to the kit instead of building it in the spec.
491
491
 
492
- For several outcomes after one action, use `outcomes` from `@shivaedev/test-story/server/outcomes.ts`. Each row puts its label beside an Effect readout and its expected value:
492
+ For several outcomes after one action, use `outcomes` from `@shivaedev/test-story/server/outcomes.ts`. Each row is `[label, () => readout(), expected]`. The list states the run order, independently of alphabetical key sorting:
493
493
 
494
494
  ```ts
495
495
  import { outcomes } from "@shivaedev/test-story/server/outcomes.ts";
@@ -497,15 +497,33 @@ import { outcomes } from "@shivaedev/test-story/server/outcomes.ts";
497
497
  accounts.it("removing Bob leaves Alice signed in", [bobAndAliceAreSignedIn()], function* ({ remove, request, sessions }) {
498
498
  yield* remove("bob");
499
499
 
500
- yield* outcomes({
501
- "bob's next request": [request("bob"), "unauthorized"],
502
- "bob's sessions": [sessions("bob"), 0],
503
- "alice's next request": [request("alice"), "ok"],
504
- });
500
+ yield* outcomes([
501
+ ["bob's next request", () => request("bob"), "unauthorized"],
502
+ ["bob's sessions", () => sessions("bob"), 0],
503
+ ["alice's next request", () => request("alice"), "ok"],
504
+ ]);
505
+ });
506
+ ```
507
+
508
+ `outcomes` builds and runs each readout only when its row starts, so a verb that tells its line before returning an Effect still prints in row order. It compares all results with one native Vitest `toMatchObject`: objects match partially at every depth, arrays keep their length and order, and asymmetric matchers such as `expect.any(Number)` still work. Each expected value is checked against its own readout’s success type. Repeated labels remain separate rows. A failing readout keeps its typed error and stops later rows; a mismatch shows a labelled diff and the story report points to the `outcomes` call.
509
+
510
+ Import `lessThan`, `atMost`, `greaterThan` or `atLeast` from `@shivaedev/test-story/server/adapters/outcomeMatchers.ts` to state numeric bounds, including inside nested partial values:
511
+
512
+ ```ts
513
+ import { atMost, lessThan } from "@shivaedev/test-story/server/adapters/outcomeMatchers.ts";
514
+ import { outcomes } from "@shivaedev/test-story/server/outcomes.ts";
515
+
516
+ accounts.it("removing Bob leaves no sessions within the request budget", [bobIsSignedIn()], function* ({ remove, details, elapsed }) {
517
+ yield* remove("bob");
518
+
519
+ yield* outcomes([
520
+ ["bob’s account", () => details("bob"), { account: { sessions: atMost(0) } }],
521
+ ["request time", () => elapsed(), lessThan(100)],
522
+ ]);
505
523
  });
506
524
  ```
507
525
 
508
- `outcomes` runs readouts in row order, then compares the actual and expected label-keyed objects with one native Vitest `toEqual`. Expected values follow their readout's success type and accept Vitest asymmetric matchers such as `expect.objectContaining(...)`. A failing readout keeps its typed error; an equality failure shows one labelled diff and the story report points to the `outcomes` call. For one outcome, keep a plain `expect`:
526
+ `lessThan` and `greaterThan` exclude the limit; `atMost` and `atLeast` include it. A bound mismatch prints its name and limit beside the received value. For one outcome, keep a plain `expect`:
509
527
 
510
528
  ```ts
511
529
  accounts.it("removing Bob ends his session", [bobIsSignedIn()], function* ({ remove, request }) {
@@ -743,15 +761,18 @@ pnpm add --save-dev react react-dom @effect/atom-react @types/react @types/react
743
761
 
744
762
  `screenDriver(options)` supplies DOM verbs and readouts for a kit's `verbs` hook. Give it the mounted `root` (or a getter for a root that navigation replaces) and the story's `tell`. The `pending` option is required for `settle()`; `nextLiveHint()` requires client activity in that option. DOM actions, lookups and synchronous readouts work without it. Without `pending`, `settle()` fails immediately in its error channel with `MissingScreenPending`, exported from `server/screenDriver.ts`, even when the screen is idle.
745
763
 
746
- To use `settle()`, supply a `pending()` function that reads the application's own request or atom state. Settlement then keeps its `Effect<void>` type with no typed errors and waits until that signal is false; repeated identical renders never count as completion. The application must keep the signal true until its resulting screen work is ready to render.
764
+ To use `settle()`, supply a native `Stream<boolean>` as `pending`, emitting the current pending state on subscription and every subsequent change. For example, a package that tracks work in a native `SubscriptionRef<boolean>` supplies `pending: SubscriptionRef.changes(requests.pending)`. For a native boolean atom, use `AtomRegistry.toStream(view.registry, pendingAtom)` from `effect/reactivity/AtomRegistry`. Keep pending true until the resulting screen work is ready to render. Settlement keeps its `Effect<void>` type with no typed errors and waits until the stream emits false; DOM mutations also wake the driver, and repeated identical renders never count as completion. `find()` waits for pending work to finish and its target to appear, reacting to both signals and mutations.
765
+
766
+ A `pending: () => boolean` sampler remains available for packages whose pending work completes with a DOM mutation. It is sampled after the initial renderer flush and on mutations, without a polling timer. Use the stream when pending can become false without changing the DOM.
747
767
 
748
768
  ```ts
769
+ import { SubscriptionRef } from "effect";
749
770
  import { screenDriver } from "@shivaedev/test-story/server/screenDriver.ts";
750
771
 
751
772
  verbs: ({ view, requests }, story) =>
752
773
  screenDriver({
753
774
  root: view.container,
754
- pending: () => requests.pending,
775
+ pending: SubscriptionRef.changes(requests.pending),
755
776
  tell: story.tell,
756
777
  });
757
778
  ```
@@ -768,18 +789,24 @@ yield* screen.settle();
768
789
  expect(screen.text("output")).toBe("Saved title");
769
790
  ```
770
791
 
771
- 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. With client activity, `find()` settles before looking up its target once. 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`.
792
+ 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`.
772
793
 
773
- `click(selector)`, `enter(selector, value)` and `submit(selector = "form")` return Effects. Selectors identify exactly one descendant of the root; 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. Disabled controls refuse clicks and entry, 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()`.
794
+ `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()`.
774
795
 
775
- `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. Settlement keeps the original pending signal and error type.
796
+ `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.
776
797
 
777
798
  `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.
778
799
 
779
- `click`, `enter`, `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. 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.
800
+ `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.
780
801
 
781
802
  `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, narrates the lookup, and uses the driver's live-time `timeoutMs` limit unless `timeout` overrides it in milliseconds. If no unique element appears before the limit, it fails with the same target diagnostics as the actions, including visible candidates for role/name targets.
782
803
 
804
+ `findText(text, { timeout }?)` waits for one visible element with matching text, returning the deepest matching `HTMLElement`. Strings match exactly after whitespace normalization; regular expressions also work. Inline markup stays joined and hidden text is excluded. Separate visible matches are ambiguous, and a timeout names the text being awaited.
805
+
806
+ `gone(target, { timeout }?)` waits until no rendered element matches the selector or role/name target. It accepts an already absent target and observes removal and hiding through DOM mutations, without polling. Like `find`, both waits also observe a supplied pending signal and wait until it is idle.
807
+
808
+ `navigatedAway(prefix, { timeout }?)` waits until the document's URL starts with the expected destination prefix, such as `https://identity.example/authorize`. It accepts navigation that already happened and observes happy-dom location assignment, including `assign` and `replace`, without polling or waiting for app work to settle. A timeout reports the prefix and current URL. The temporary location observer is released on completion, timeout or interruption. These waits use the driver's `timeoutMs` unless a per-call `timeout` overrides it.
809
+
783
810
  `accessible(selector)` returns `{ name, role }` computed by `dom-accessibility-api`, including native roles and label references that take precedence over `aria-label`. It narrates the readout and uses the same single rendered target checks as other readouts. Assert on this result when checking a control's accessible name; reading its raw attributes does not compute that name. This DOM computation does not inspect a browser's accessibility tree or prove speech from a screen reader.
784
811
 
785
812
  `accessible(element)` uses the same computation on an `Element` the kit already holds and tells no story line.
@@ -807,23 +834,24 @@ A story calls `const hints = yield* watchHints()` before the write, then `yield*
807
834
 
808
835
  Import each module with the prefix `@shivaedev/test-story/`; there is no root entry.
809
836
 
810
- | Module | Exports |
811
- | --------------------------------- | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
812
- | `server/storyKit.ts` | `storyKit`, `Trait`, `RunUntilOptions`, `Story`, `RunHooks`, `StoryKitDefinition`, `Told`, `StoryBody`, `StoryTest`, `StoryIt`, `StoryKit` |
813
- | `server/outcomes.ts` | `outcomes(rows)` |
814
- | `server/until.ts` | `until(stream, matches, options)`, `collectUntil(stream, matches, options)`, `UntilOptions`, `SignalNotReceived` |
815
- | `server/browserReads.ts` | `browserReads(options)`, `BrowserReadsOptions`, `BrowserRead`, `BrowserSubscription` |
816
- | `server/domFetch.ts` | `domFetch(baseUrl, target?)` |
817
- | `server/seedCookies.ts` | `seedCookies(cookies, target?)`, `DomCookie` |
818
- | `server/routeOutbound.ts` | `routeOutbound(routes)` |
819
- | `server/screenDriver.ts` | `screenDriver(options)`, `ScreenDriverOptions`, `ScreenDriver`, `ScreenTarget`, `MissingScreenPending` |
820
- | `server/memberScreens.ts` | `memberScreens(options)`, `MemberScreen` |
821
- | `server/domNavigate.ts` | `domNavigate(url?)` |
822
- | `server/genreTags.ts` | `genreTags(...kitNames)`, `GenreTag` |
823
- | `server/domEnvironment.config.ts` | Default Vitest environment preserving Node host globals and happy-dom document transport |
824
- | `server/fakeHttpService.ts` | `fakeHttpService(options)`, `FakeHttpRoute`, `FakeHttpRequest`, `FakeHttpRequestRecord` (`status`: number, `"pending"` or `"unanswered"`), `FakeHttpReply`, `FakeHttpReplySource` (fixed or request/time function), `FakeHttpFault`, `FakeHttpHold`, `FakeHttpHoldOptions` (`params`, `once`), `FakeHttpScope`, `FakeHttpScriptOptions`, `FakeHttpScript`, `FakeHttpServiceOptions` |
825
- | `server/forwardingProxy.ts` | `forwardingProxy(upstream, options?)`, `ForwardingProxyOptions` |
826
- | `server/otlpReceiver.ts` | `otlpReceiver(options?)`, `OtlpSpan`, `OtlpExport`, `OtlpReceiverOptions` |
837
+ | Module | Exports |
838
+ | ------------------------------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
839
+ | `server/storyKit.ts` | `storyKit`, `Trait`, `RunUntilOptions`, `Story`, `RunHooks`, `StoryKitDefinition`, `Told`, `StoryBody`, `StoryTest`, `StoryIt`, `StoryKit` |
840
+ | `server/adapters/outcomeMatchers.ts` | `lessThan(limit)`, `atMost(limit)`, `greaterThan(limit)`, `atLeast(limit)`, `NumericBound` |
841
+ | `server/outcomes.ts` | `outcomes(rows)` |
842
+ | `server/until.ts` | `until(stream, matches, options)`, `collectUntil(stream, matches, options)`, `UntilOptions`, `SignalNotReceived` |
843
+ | `server/browserReads.ts` | `browserReads(options)`, `BrowserReadsOptions`, `BrowserRead`, `BrowserSubscription` |
844
+ | `server/domFetch.ts` | `domFetch(baseUrl, target?)` |
845
+ | `server/seedCookies.ts` | `seedCookies(cookies, target?)`, `DomCookie` |
846
+ | `server/routeOutbound.ts` | `routeOutbound(routes)` |
847
+ | `server/screenDriver.ts` | `screenDriver(options)`, `ScreenDriverOptions`, `ScreenDriver`, `ScreenTarget`, `MissingScreenPending` |
848
+ | `server/memberScreens.ts` | `memberScreens(options)`, `MemberScreen` |
849
+ | `server/domNavigate.ts` | `domNavigate(url?)` |
850
+ | `server/genreTags.ts` | `genreTags(...kitNames)`, `GenreTag` |
851
+ | `server/domEnvironment.config.ts` | Default Vitest environment preserving Node host globals and happy-dom document transport |
852
+ | `server/fakeHttpService.ts` | `fakeHttpService(options)`, `FakeHttpRoute`, `FakeHttpRequest`, `FakeHttpRequestRecord` (`status`: number, `"pending"` or `"unanswered"`), `FakeHttpReply`, `FakeHttpReplySource` (fixed or request/time function), `FakeHttpFault`, `FakeHttpHold`, `FakeHttpHoldOptions` (`params`, `once`), `FakeHttpScope`, `FakeHttpScriptOptions`, `FakeHttpScript`, `FakeHttpServiceOptions` |
853
+ | `server/forwardingProxy.ts` | `forwardingProxy(upstream, options?)`, `ForwardingProxyOptions` |
854
+ | `server/otlpReceiver.ts` | `otlpReceiver(options?)`, `OtlpSpan`, `OtlpExport`, `OtlpReceiverOptions` |
827
855
 
828
856
  ### Install and limits
829
857
 
@@ -0,0 +1,12 @@
1
+ export interface NumericBound {
2
+ readonly $$typeof: symbol;
3
+ readonly asymmetricMatch: (actual: unknown) => boolean;
4
+ readonly getExpectedType: () => string;
5
+ readonly toAsymmetricMatcher: () => string;
6
+ readonly toString: () => string;
7
+ }
8
+ export declare function lessThan(limit: number): NumericBound;
9
+ export declare function atMost(limit: number): NumericBound;
10
+ export declare function greaterThan(limit: number): NumericBound;
11
+ export declare function atLeast(limit: number): NumericBound;
12
+ //# sourceMappingURL=outcomeMatchers.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outcomeMatchers.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/outcomeMatchers.ts"],"names":[],"mappings":"AAAA,MAAM,WAAW,YAAY;IAC5B,QAAQ,CAAC,QAAQ,EAAE,MAAM,CAAC;IAC1B,QAAQ,CAAC,eAAe,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,OAAO,CAAC;IACvD,QAAQ,CAAC,eAAe,EAAE,MAAM,MAAM,CAAC;IACvC,QAAQ,CAAC,mBAAmB,EAAE,MAAM,MAAM,CAAC;IAC3C,QAAQ,CAAC,QAAQ,EAAE,MAAM,MAAM,CAAC;CAChC;AAYD,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,gBAErC;AAED,wBAAgB,MAAM,CAAC,KAAK,EAAE,MAAM,gBAEnC;AAED,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,gBAExC;AAED,wBAAgB,OAAO,CAAC,KAAK,EAAE,MAAM,gBAEpC"}
@@ -0,0 +1,22 @@
1
+ function bound(name, limit, compare) {
2
+ return {
3
+ $$typeof: Symbol.for("jest.asymmetricMatcher"),
4
+ asymmetricMatch: (actual) => typeof actual === "number" && compare(actual, limit),
5
+ getExpectedType: () => "number",
6
+ toAsymmetricMatcher: () => `${name}(${limit})`,
7
+ toString: () => name,
8
+ };
9
+ }
10
+ export function lessThan(limit) {
11
+ return bound("lessThan", limit, (actual, value) => actual < value);
12
+ }
13
+ export function atMost(limit) {
14
+ return bound("atMost", limit, (actual, value) => actual <= value);
15
+ }
16
+ export function greaterThan(limit) {
17
+ return bound("greaterThan", limit, (actual, value) => actual > value);
18
+ }
19
+ export function atLeast(limit) {
20
+ return bound("atLeast", limit, (actual, value) => actual >= value);
21
+ }
22
+ //# sourceMappingURL=outcomeMatchers.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"outcomeMatchers.js","sourceRoot":"","sources":["../../../src/server/adapters/outcomeMatchers.ts"],"names":[],"mappings":"AAQA,SAAS,KAAK,CAAC,IAAY,EAAE,KAAa,EAAE,OAAmD;IAC9F,OAAO;QACN,QAAQ,EAAE,MAAM,CAAC,GAAG,CAAC,wBAAwB,CAAC;QAC9C,eAAe,EAAE,CAAC,MAAM,EAAE,EAAE,CAAC,OAAO,MAAM,KAAK,QAAQ,IAAI,OAAO,CAAC,MAAM,EAAE,KAAK,CAAC;QACjF,eAAe,EAAE,GAAG,EAAE,CAAC,QAAQ;QAC/B,mBAAmB,EAAE,GAAG,EAAE,CAAC,GAAG,IAAI,IAAI,KAAK,GAAG;QAC9C,QAAQ,EAAE,GAAG,EAAE,CAAC,IAAI;KACpB,CAAC;AACH,CAAC;AAED,MAAM,UAAU,QAAQ,CAAC,KAAa;IACrC,OAAO,KAAK,CAAC,UAAU,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACpE,CAAC;AAED,MAAM,UAAU,MAAM,CAAC,KAAa;IACnC,OAAO,KAAK,CAAC,QAAQ,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AACnE,CAAC;AAED,MAAM,UAAU,WAAW,CAAC,KAAa;IACxC,OAAO,KAAK,CAAC,aAAa,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,GAAG,KAAK,CAAC,CAAC;AACvE,CAAC;AAED,MAAM,UAAU,OAAO,CAAC,KAAa;IACpC,OAAO,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,CAAC,MAAM,EAAE,KAAK,EAAE,EAAE,CAAC,MAAM,IAAI,KAAK,CAAC,CAAC;AACpE,CAAC"}
@@ -1,12 +1,15 @@
1
+ import { screenText } from "#internal/screenText.ts";
1
2
  import type { ScreenTarget } from "#screenDriver.ts";
2
- import { screenText } from "./screenText.ts";
3
- export declare function screenElements(root: () => HTMLElement): {
3
+ export declare function screenElements(root: () => HTMLElement, dialogs?: boolean): {
4
4
  element: (selector: ScreenTarget) => HTMLElement;
5
5
  enabled: (found: HTMLElement, selector: ScreenTarget) => void;
6
6
  enter: (selector: ScreenTarget, value: string) => void;
7
7
  form: (selector: ScreenTarget) => HTMLFormElement;
8
8
  input: (selector: ScreenTarget) => HTMLInputElement | HTMLTextAreaElement;
9
+ matches: (target: ScreenTarget) => HTMLElement[];
9
10
  rendered: (found: HTMLElement, selector: string) => HTMLElement;
11
+ select: (selector: ScreenTarget, value: string) => void;
10
12
  text: typeof screenText;
13
+ textElement: (text: string | RegExp) => HTMLElement;
11
14
  };
12
15
  //# sourceMappingURL=screenElements.d.ts.map
@@ -0,0 +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;wBAQ1C,YAAY;qBAsBf,WAAW,YAAY,YAAY;sBAQxC,YAAY,SAAS,MAAM;qBAY5B,YAAY;sBA7BL,YAAY;;sBAnBZ,WAAW,YAAY,MAAM;uBA2DlC,YAAY,SAAS,MAAM;;;EAgB/C"}
@@ -1,6 +1,8 @@
1
- import { isRendered, roleElement, targetName } from "#internal/screenAccessibility.ts";
2
- import { screenText } from "./screenText.js";
3
- export function screenElements(root) {
1
+ import { isRendered, targetName } from "#internal/screenAccessibility.ts";
2
+ import { screenText } from "#internal/screenText.ts";
3
+ import { screenQueries } from "./screenQueries.js";
4
+ export function screenElements(root, dialogs = true) {
5
+ const queries = screenQueries(root, dialogs);
4
6
  function rendered(found, selector) {
5
7
  if (!isRendered(found)) {
6
8
  throw new Error(`The screen's ${selector} is not rendered.\nhelp: Reveal the target and its ancestors before acting on or reading it.`);
@@ -9,9 +11,9 @@ export function screenElements(root) {
9
11
  }
10
12
  function element(selector) {
11
13
  if (typeof selector !== "string") {
12
- return roleElement(root(), selector);
14
+ return queries.roleElement(selector);
13
15
  }
14
- const matches = root().querySelectorAll(selector);
16
+ const matches = queries.query(selector);
15
17
  const found = matches[0];
16
18
  if (matches.length !== 1 || found === undefined) {
17
19
  throw new Error(`The screen has ${matches.length} matches for ${JSON.stringify(selector)}.\nhelp: Use a selector for exactly one rendered control or readout.`);
@@ -54,8 +56,23 @@ export function screenElements(root) {
54
56
  return found;
55
57
  },
56
58
  input,
59
+ matches: queries.matches,
57
60
  rendered,
61
+ select: (selector, value) => {
62
+ const field = element(selector);
63
+ if (!(field instanceof HTMLSelectElement)) {
64
+ throw new Error(`The screen's ${targetName(selector)} is not a select.\nhelp: Select a rendered select control.`);
65
+ }
66
+ enabled(field, selector);
67
+ if (!Array.from(field.options).some((option) => option.value === value)) {
68
+ throw new Error(`The screen's ${targetName(selector)} has no option ${JSON.stringify(value)}.\nhelp: Choose an available option value.`);
69
+ }
70
+ field.focus();
71
+ field.value = value;
72
+ field.dispatchEvent(new Event("change", { bubbles: true }));
73
+ },
58
74
  text: screenText,
75
+ textElement: queries.textElement,
59
76
  };
60
77
  }
61
78
  //# sourceMappingURL=screenElements.js.map
@@ -0,0 +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;Y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AC,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,IAAI,EAAE,UAAU;QAChB,WAAW,EAAE,OAAO,CAAC,WAAW;KAChC,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Effect } from "effect";
2
+ export declare function screenMutations(root: HTMLElement, changed: () => void): Effect.Effect<MutationObserver, never, import("effect/Scope").Scope>;
3
+ //# sourceMappingURL=screenMutations.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenMutations.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,wBAAgB,eAAe,CAAC,IAAI,EAAE,WAAW,EAAE,OAAO,EAAE,MAAM,IAAI,wEAWrE"}
@@ -0,0 +1,11 @@
1
+ import { Effect } from "effect";
2
+ export function screenMutations(root, changed) {
3
+ return Effect.acquireRelease(Effect.sync(() => {
4
+ const observer = new MutationObserver(changed);
5
+ // Root getters can follow navigation, and visibility can change on an ancestor.
6
+ observer.observe(root.ownerDocument, { attributes: true, characterData: true, childList: true, subtree: true });
7
+ observer.observe(root, { attributes: true, characterData: true, childList: true, subtree: true });
8
+ return observer;
9
+ }), (observer) => Effect.sync(() => observer.disconnect()));
10
+ }
11
+ //# sourceMappingURL=screenMutations.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenMutations.js","sourceRoot":"","sources":["../../../src/server/adapters/screenMutations.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,UAAU,eAAe,CAAC,IAAiB,EAAE,OAAmB;IACrE,OAAO,MAAM,CAAC,cAAc,CAC3B,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;QAChB,MAAM,QAAQ,GAAG,IAAI,gBAAgB,CAAC,OAAO,CAAC,CAAC;QAC/C,gFAAgF;QAChF,QAAQ,CAAC,OAAO,CAAC,IAAI,CAAC,aAAa,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAChH,QAAQ,CAAC,OAAO,CAAC,IAAI,EAAE,EAAE,UAAU,EAAE,IAAI,EAAE,aAAa,EAAE,IAAI,EAAE,SAAS,EAAE,IAAI,EAAE,OAAO,EAAE,IAAI,EAAE,CAAC,CAAC;QAClG,OAAO,QAAQ,CAAC;IACjB,CAAC,CAAC,EACF,CAAC,QAAQ,EAAE,EAAE,CAAC,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE,CAAC,QAAQ,CAAC,UAAU,EAAE,CAAC,CACtD,CAAC;AACH,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { Effect } from "effect";
2
+ export declare function screenNavigation(root: () => HTMLElement, prefix: string): Effect.Effect<void, never, never>;
3
+ //# sourceMappingURL=screenNavigation.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenNavigation.d.ts","sourceRoot":"","sources":["../../../src/server/adapters/screenNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,wBAAgB,gBAAgB,CAAC,IAAI,EAAE,MAAM,WAAW,EAAE,MAAM,EAAE,MAAM,qCAkCvE"}
@@ -0,0 +1,34 @@
1
+ import { Effect } from "effect";
2
+ export function screenNavigation(root, prefix) {
3
+ return Effect.suspend(() => {
4
+ const location = root().ownerDocument.location;
5
+ const original = Object.getOwnPropertyDescriptor(location, "href");
6
+ const descriptor = original ?? Object.getOwnPropertyDescriptor(Object.getPrototypeOf(location), "href");
7
+ const wait = Effect.callback((resume) => {
8
+ function changed() {
9
+ if (location.href.startsWith(prefix)) {
10
+ resume(Effect.void);
11
+ }
12
+ }
13
+ // happy-dom's detached window changes location without emitting a navigation event.
14
+ Object.defineProperty(location, "href", {
15
+ configurable: true,
16
+ get: () => descriptor?.get?.call(location),
17
+ set: (value) => {
18
+ descriptor?.set?.call(location, value);
19
+ changed();
20
+ },
21
+ });
22
+ changed();
23
+ });
24
+ return wait.pipe(Effect.ensuring(Effect.sync(() => {
25
+ if (original) {
26
+ Object.defineProperty(location, "href", original);
27
+ }
28
+ else {
29
+ Reflect.deleteProperty(location, "href");
30
+ }
31
+ })));
32
+ });
33
+ }
34
+ //# sourceMappingURL=screenNavigation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"screenNavigation.js","sourceRoot":"","sources":["../../../src/server/adapters/screenNavigation.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAEhC,MAAM,UAAU,gBAAgB,CAAC,IAAuB,EAAE,MAAc;IACvE,OAAO,MAAM,CAAC,OAAO,CAAC,GAAG,EAAE;QAC1B,MAAM,QAAQ,GAAG,IAAI,EAAE,CAAC,aAAa,CAAC,QAAQ,CAAC;QAC/C,MAAM,QAAQ,GAAG,MAAM,CAAC,wBAAwB,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACnE,MAAM,UAAU,GAAG,QAAQ,IAAI,MAAM,CAAC,wBAAwB,CAAC,MAAM,CAAC,cAAc,CAAC,QAAQ,CAAC,EAAE,MAAM,CAAC,CAAC;QACxG,MAAM,IAAI,GAAG,MAAM,CAAC,QAAQ,CAAO,CAAC,MAAM,EAAE,EAAE;YAC7C,SAAS,OAAO;gBACf,IAAI,QAAQ,CAAC,IAAI,CAAC,UAAU,CAAC,MAAM,CAAC,EAAE,CAAC;oBACtC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC;gBACrB,CAAC;YACF,CAAC;YACD,oFAAoF;YACpF,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE;gBACvC,YAAY,EAAE,IAAI;gBAClB,GAAG,EAAE,GAAG,EAAE,CAAC,UAAU,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,CAAC;gBAC1C,GAAG,EAAE,CAAC,KAAa,EAAE,EAAE;oBACtB,UAAU,EAAE,GAAG,EAAE,IAAI,CAAC,QAAQ,EAAE,KAAK,CAAC,CAAC;oBACvC,OAAO,EAAE,CAAC;gBACX,CAAC;aACD,CAAC,CAAC;YACH,OAAO,EAAE,CAAC;QACX,CAAC,CAAC,CAAC;QACH,OAAO,IAAI,CAAC,IAAI,CACf,MAAM,CAAC,QAAQ,CACd,MAAM,CAAC,IAAI,CAAC,GAAG,EAAE;YAChB,IAAI,QAAQ,EAAE,CAAC;gBACd,MAAM,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,EAAE,QAAQ,CAAC,CAAC;YACnD,CAAC;iBAAM,CAAC;gBACP,OAAO,CAAC,cAAc,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;YAC1C,CAAC;QACF,CAAC,CAAC,CACF,CACD,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC"}
@@ -0,0 +1,8 @@
1
+ import type { ScreenTarget } from "#screenDriver.ts";
2
+ export declare function screenQueries(root: () => HTMLElement, dialogs: boolean): {
3
+ matches: (target: ScreenTarget) => HTMLElement[];
4
+ query: (selector: string) => HTMLElement[];
5
+ roleElement: (target: Exclude<ScreenTarget, string>) => HTMLElement;
6
+ textElement: (text: string | RegExp) => HTMLElement;
7
+ };
8
+ //# sourceMappingURL=screenQueries.d.ts.map
@@ -0,0 +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;AAMrD,wBAAgB,aAAa,CAAC,IAAI,EAAE,MAAM,WAAW,EAAE,OAAO,EAAE,OAAO;sBAgCnD,YAAY;sBA/BN,MAAM;0BAoCR,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC;wBAa/B,MAAM,GAAG,MAAM;EAepC"}
@@ -0,0 +1,62 @@
1
+ import { isInaccessible } from "dom-accessibility-api";
2
+ import { accessibility, isRendered, targetName } from "#internal/screenAccessibility.ts";
3
+ import { screenText } from "#internal/screenText.ts";
4
+ function matchesText(value, expected) {
5
+ return typeof expected === "string" ? value === expected : new RegExp(expected.source, expected.flags).test(value);
6
+ }
7
+ export function screenQueries(root, dialogs) {
8
+ function query(selector) {
9
+ const current = root();
10
+ 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
+ : [];
14
+ for (const dialog of portals) {
15
+ if (dialog.matches(selector)) {
16
+ found.add(dialog);
17
+ }
18
+ for (const child of dialog.querySelectorAll(selector)) {
19
+ found.add(child);
20
+ }
21
+ }
22
+ return [...found];
23
+ }
24
+ function candidates() {
25
+ return query("*")
26
+ .filter((element) => isRendered(element) && !isInaccessible(element))
27
+ .map((element) => {
28
+ const { role, name } = accessibility(element);
29
+ return { element, name: role === "alert" && name === "" ? screenText(element).replace(/\s+/gu, " ").trim() : name, role };
30
+ })
31
+ .filter(({ role }) => role !== null);
32
+ }
33
+ function roles(target) {
34
+ return candidates().filter(({ role, name }) => role === target.role && matchesText(name, target.name));
35
+ }
36
+ return {
37
+ matches: (target) => (typeof target === "string" ? query(target).filter(isRendered) : roles(target).map(({ element }) => element)).filter((element) => element.isConnected),
38
+ query,
39
+ roleElement: (target) => {
40
+ const matches = roles(target);
41
+ const found = matches[0];
42
+ if (matches.length === 1 && found) {
43
+ return found.element;
44
+ }
45
+ const listing = candidates()
46
+ .map(({ role, name }) => ` - ${role} named ${JSON.stringify(name)}`)
47
+ .join("\n");
48
+ throw new Error(`The screen has ${matches.length} matches for ${targetName(target)}.\nhelp: Use a role and name for exactly one visible target.\nCandidates on screen:\n${listing || " (none)"}`);
49
+ },
50
+ textElement: (text) => {
51
+ const current = root();
52
+ const matches = [current, ...query("*")].filter((element) => isRendered(element) && matchesText(screenText(element).replace(/\s+/gu, " ").trim(), text));
53
+ const deepest = matches.filter((element) => !matches.some((other) => element !== other && element.contains(other)));
54
+ const found = deepest[0];
55
+ if (deepest.length !== 1 || found === undefined) {
56
+ throw new Error(`The screen has ${deepest.length} matches for text ${String(text instanceof RegExp ? text : JSON.stringify(text))}.\nhelp: Use text that identifies exactly one visible element.`);
57
+ }
58
+ return found;
59
+ },
60
+ };
61
+ }
62
+ //# sourceMappingURL=screenQueries.js.map
@@ -0,0 +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;AAGrD,SAAS,WAAW,CAAC,KAAa,EAAE,QAAyB;IAC5D,OAAO,OAAO,QAAQ,KAAK,QAAQ,CAAC,CAAC,CAAC,KAAK,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,MAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;AACpH,CAAC;AAED,MAAM,UAAU,aAAa,CAAC,IAAuB,EAAE,OAAgB;IACtE,SAAS,KAAK,CAAC,QAAgB;QAC9B,MAAM,OAAO,GAAG,IAAI,EAAE,CAAC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,CACd,kBAAkB,OAAO,CAAC,MAAM,gBAAgB,UAAU,CAAC,MAAM,CAAC,wFAAwF,OAAO,IAAI,UAAU,EAAE,CACjL,CAAC;QACH,CAAC;QACD,WAAW,EAAE,CAAC,IAAqB,EAAE,EAAE;YACtC,MAAM,OAAO,GAAG,IAAI,EAAE,CAAC;YACvB,MAAM,OAAO,GAAG,CAAC,OAAO,EAAE,GAAG,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,MAAM,CAC9C,CAAC,OAAO,EAAE,EAAE,CAAC,UAAU,CAAC,OAAO,CAAC,IAAI,WAAW,CAAC,UAAU,CAAC,OAAO,CAAC,CAAC,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,4 @@
1
+ import { Effect } from "effect";
2
+ import type { ClientActivity } from "@shivaedev/contract/clientActivity.ts";
3
+ export declare const nextClientHint: (activity: ClientActivity) => Effect.Effect<void, never, never>;
4
+ //# sourceMappingURL=nextClientHint.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextClientHint.d.ts","sourceRoot":"","sources":["../../../src/server/internal/nextClientHint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAU,MAAM,QAAQ,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,uCAAuC,CAAC;AAE5E,eAAO,MAAM,cAAc,iEAOzB,CAAC"}
@@ -1,10 +1,6 @@
1
1
  import { Effect, Stream } from "effect";
2
- import { isClientIdle } from "@shivaedev/contract/clientActivity.ts";
3
- export function waitForClient(activity) {
4
- return activity.pipe(Stream.filter(isClientIdle), Stream.take(1), Stream.runDrain);
5
- }
6
2
  export const nextClientHint = Effect.fnUntraced(function* (activity) {
7
3
  const before = (yield* activity.current).liveHints;
8
4
  return yield* activity.pipe(Stream.filter((state) => state.liveHints > before), Stream.take(1), Stream.runDrain);
9
5
  });
10
- //# sourceMappingURL=screenActivity.js.map
6
+ //# sourceMappingURL=nextClientHint.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"nextClientHint.js","sourceRoot":"","sources":["../../../src/server/internal/nextClientHint.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAGxC,MAAM,CAAC,MAAM,cAAc,GAAG,MAAM,CAAC,UAAU,CAAC,QAAQ,CAAC,EAAE,QAAwB;IAClF,MAAM,MAAM,GAAG,CAAC,KAAK,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,CAAC,SAAS,CAAC;IACnD,OAAO,KAAK,CAAC,CAAC,QAAQ,CAAC,IAAI,CAC1B,MAAM,CAAC,MAAM,CAAC,CAAC,KAAK,EAAE,EAAE,CAAC,KAAK,CAAC,SAAS,GAAG,MAAM,CAAC,EAClD,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,EACd,MAAM,CAAC,QAAQ,CACf,CAAC;AACH,CAAC,CAAC,CAAC"}
@@ -5,5 +5,4 @@ export declare function accessibility(element: Element): {
5
5
  };
6
6
  export declare function targetName(target: ScreenTarget): string;
7
7
  export declare function isRendered(found: HTMLElement): boolean;
8
- export declare function roleElement(root: HTMLElement, target: Exclude<ScreenTarget, string>): HTMLElement;
9
8
  //# sourceMappingURL=screenAccessibility.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenAccessibility.d.ts","sourceRoot":"","sources":["../../../src/server/internal/screenAccessibility.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO;IACpC,IAAI;IAAkC,IAAI;EACnD;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAIvD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,WAY5C;AAED,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,YAAY,EAAE,MAAM,CAAC,eAsBnF"}
1
+ {"version":3,"file":"screenAccessibility.d.ts","sourceRoot":"","sources":["../../../src/server/internal/screenAccessibility.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,kBAAkB,CAAC;AAErD,wBAAgB,aAAa,CAAC,OAAO,EAAE,OAAO;IACpC,IAAI;IAAkC,IAAI;EACnD;AAED,wBAAgB,UAAU,CAAC,MAAM,EAAE,YAAY,GAAG,MAAM,CAIvD;AAED,wBAAgB,UAAU,CAAC,KAAK,EAAE,WAAW,WAY5C"}
@@ -1,4 +1,4 @@
1
- import { computeAccessibleName, getRole, isInaccessible } from "dom-accessibility-api";
1
+ import { computeAccessibleName, getRole } from "dom-accessibility-api";
2
2
  export function accessibility(element) {
3
3
  return { name: computeAccessibleName(element), role: getRole(element) };
4
4
  }
@@ -20,25 +20,4 @@ export function isRendered(found) {
20
20
  }
21
21
  return true;
22
22
  }
23
- export function roleElement(root, target) {
24
- const candidates = Array.from(root.querySelectorAll("*"))
25
- .filter((element) => isRendered(element) && !isInaccessible(element))
26
- .map((element) => ({ ...accessibility(element), element }))
27
- .filter(({ role }) => role !== null);
28
- const matches = candidates.filter(({ role, name }) => {
29
- if (role !== target.role) {
30
- return false;
31
- }
32
- if (typeof target.name === "string") {
33
- return name === target.name;
34
- }
35
- return new RegExp(target.name.source, target.name.flags).test(name);
36
- });
37
- const found = matches[0];
38
- if (matches.length === 1 && found) {
39
- return found.element;
40
- }
41
- const listing = candidates.map(({ role, name }) => ` - ${role} named ${JSON.stringify(name)}`).join("\n");
42
- throw new Error(`The screen has ${matches.length} matches for ${targetName(target)}.\nhelp: Use a role and name for exactly one visible target.\nCandidates on screen:\n${listing || " (none)"}`);
43
- }
44
23
  //# sourceMappingURL=screenAccessibility.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenAccessibility.js","sourceRoot":"","sources":["../../../src/server/internal/screenAccessibility.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,qBAAqB,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,uBAAuB,CAAC;AAGvF,MAAM,UAAU,aAAa,CAAC,OAAgB;IAC7C,OAAO,EAAE,IAAI,EAAE,qBAAqB,CAAC,OAAO,CAAC,EAAE,IAAI,EAAE,OAAO,CAAC,OAAO,CAAC,EAAE,CAAC;AACzE,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,MAAoB;IAC9C,OAAO,OAAO,MAAM,KAAK,QAAQ;QAChC,CAAC,CAAC,MAAM;QACR,CAAC,CAAC,GAAG,MAAM,CAAC,IAAI,UAAU,OAAO,MAAM,CAAC,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,CAAC,EAAE,CAAC;AAClH,CAAC;AAED,MAAM,UAAU,UAAU,CAAC,KAAkB;IAC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