foldkit 0.139.0 → 0.140.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/command/index.js +2 -2
- package/dist/dom/inert.d.ts +2 -1
- package/dist/dom/inert.d.ts.map +1 -1
- package/dist/dom/inert.js +15 -2
- package/dist/port/port.js +1 -1
- package/dist/runtime/browserListeners.js +1 -1
- package/dist/test/apps/contextMenu.d.ts +26 -0
- package/dist/test/apps/contextMenu.d.ts.map +1 -0
- package/dist/test/apps/contextMenu.js +62 -0
- package/dist/test/apps/formChild.d.ts +5 -5
- package/dist/test/apps/formChild.d.ts.map +1 -1
- package/dist/test/apps/formChild.js +5 -5
- package/dist/test/internal.d.ts +23 -6
- package/dist/test/internal.d.ts.map +1 -1
- package/dist/test/internal.js +33 -2
- package/dist/test/matchers.d.ts.map +1 -1
- package/dist/test/matchers.js +2 -12
- package/dist/test/query.d.ts +3 -1
- package/dist/test/query.d.ts.map +1 -1
- package/dist/test/query.js +45 -6
- package/dist/test/scene.d.ts +12 -20
- package/dist/test/scene.d.ts.map +1 -1
- package/dist/test/scene.js +50 -29
- package/dist/test/story.d.ts +7 -19
- package/dist/test/story.d.ts.map +1 -1
- package/dist/test/story.js +10 -3
- package/package.json +1 -1
package/dist/command/index.js
CHANGED
|
@@ -36,7 +36,7 @@ export function define(name, config) {
|
|
|
36
36
|
return definition;
|
|
37
37
|
}
|
|
38
38
|
}
|
|
39
|
-
const interrupt = maybeInterrupt
|
|
39
|
+
const { value: interrupt } = maybeInterrupt;
|
|
40
40
|
const maybeToKey = Predicate.isObject(interrupt) &&
|
|
41
41
|
Predicate.hasProperty(interrupt, 'toKey') &&
|
|
42
42
|
Predicate.isFunction(interrupt.toKey)
|
|
@@ -69,7 +69,7 @@ export function define(name, config) {
|
|
|
69
69
|
});
|
|
70
70
|
return definition;
|
|
71
71
|
}
|
|
72
|
-
const toKey = maybeToKey
|
|
72
|
+
const { value: toKey } = maybeToKey;
|
|
73
73
|
const toFullKey = (keyArgs) => `${name}:${toKey(keyArgs)}`;
|
|
74
74
|
const definition = (args) => {
|
|
75
75
|
const key = toFullKey(args);
|
package/dist/dom/inert.d.ts
CHANGED
|
@@ -3,7 +3,8 @@ import { Effect } from 'effect';
|
|
|
3
3
|
* Marks all DOM elements outside the given selectors as `inert` and
|
|
4
4
|
* `aria-hidden="true"`. Walks each allowed element up to `document.body`,
|
|
5
5
|
* marking siblings that don't contain an allowed element. Uses reference
|
|
6
|
-
* counting so nested calls are safe.
|
|
6
|
+
* counting so nested calls are safe. A restore before the pending render
|
|
7
|
+
* commits invalidates the request before it can change the DOM.
|
|
7
8
|
*
|
|
8
9
|
* @example
|
|
9
10
|
* ```typescript
|
package/dist/dom/inert.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"inert.d.ts","sourceRoot":"","sources":["../../src/dom/inert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAA2C,MAAM,QAAQ,CAAA;
|
|
1
|
+
{"version":3,"file":"inert.d.ts","sourceRoot":"","sources":["../../src/dom/inert.ts"],"names":[],"mappings":"AAAA,OAAO,EAAS,MAAM,EAA2C,MAAM,QAAQ,CAAA;AA0F/E;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,WAAW,GACtB,IAAI,MAAM,EACV,kBAAkB,aAAa,CAAC,MAAM,CAAC,KACtC,MAAM,CAAC,MAAM,CAAC,IAAI,CAyBjB,CAAA;AAEJ;;;;;;;;;GASG;AACH,eAAO,MAAM,YAAY,GAAI,IAAI,MAAM,KAAG,MAAM,CAAC,MAAM,CAAC,IAAI,CAUxD,CAAA"}
|
package/dist/dom/inert.js
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Array, Effect, Number, Option, Predicate, Result, pipe } from 'effect';
|
|
2
|
+
import { afterCommit } from '../render/render.js';
|
|
2
3
|
const inertState = {
|
|
3
4
|
originals: new Map(),
|
|
4
5
|
counts: new Map(),
|
|
5
6
|
cleanups: new Map(),
|
|
7
|
+
requests: new Map(),
|
|
6
8
|
};
|
|
7
9
|
const markInert = (element) => {
|
|
8
10
|
const count = inertState.counts.get(element) ?? 0;
|
|
@@ -52,14 +54,24 @@ const inertableSiblings = (parent, allowedElements) => pipe(parent.children, Arr
|
|
|
52
54
|
* Marks all DOM elements outside the given selectors as `inert` and
|
|
53
55
|
* `aria-hidden="true"`. Walks each allowed element up to `document.body`,
|
|
54
56
|
* marking siblings that don't contain an allowed element. Uses reference
|
|
55
|
-
* counting so nested calls are safe.
|
|
57
|
+
* counting so nested calls are safe. A restore before the pending render
|
|
58
|
+
* commits invalidates the request before it can change the DOM.
|
|
56
59
|
*
|
|
57
60
|
* @example
|
|
58
61
|
* ```typescript
|
|
59
62
|
* Dom.inertOthers('my-menu', ['#menu-button', '#menu-items'])
|
|
60
63
|
* ```
|
|
61
64
|
*/
|
|
62
|
-
export const inertOthers = (id, allowedSelectors) => Effect.
|
|
65
|
+
export const inertOthers = (id, allowedSelectors) => Effect.gen(function* () {
|
|
66
|
+
const request = yield* Effect.sync(() => {
|
|
67
|
+
const nextRequest = Symbol();
|
|
68
|
+
inertState.requests.set(id, nextRequest);
|
|
69
|
+
return nextRequest;
|
|
70
|
+
});
|
|
71
|
+
yield* afterCommit;
|
|
72
|
+
if (inertState.requests.get(id) !== request) {
|
|
73
|
+
return;
|
|
74
|
+
}
|
|
63
75
|
const allowedElements = resolveElements(allowedSelectors);
|
|
64
76
|
const cleanupFunctions = pipe(allowedElements, Array.flatMap(ancestorsUpToBody), Array.flatMap(ancestor => Array.map(inertableSiblings(ancestor, allowedElements), markInert)));
|
|
65
77
|
inertState.cleanups.set(id, cleanupFunctions);
|
|
@@ -75,6 +87,7 @@ export const inertOthers = (id, allowedSelectors) => Effect.sync(() => {
|
|
|
75
87
|
* ```
|
|
76
88
|
*/
|
|
77
89
|
export const restoreInert = (id) => Effect.sync(() => {
|
|
90
|
+
inertState.requests.delete(id);
|
|
78
91
|
const cleanupFunctions = inertState.cleanups.get(id);
|
|
79
92
|
if (cleanupFunctions) {
|
|
80
93
|
Array.forEach(cleanupFunctions, cleanup => cleanup());
|
package/dist/port/port.js
CHANGED
|
@@ -65,7 +65,7 @@ export const __makeInboundChannel = () => {
|
|
|
65
65
|
const attach = (push) => {
|
|
66
66
|
subscribers.add(push);
|
|
67
67
|
if (Option.isSome(maybeBacklog)) {
|
|
68
|
-
const backlog = maybeBacklog
|
|
68
|
+
const { value: backlog } = maybeBacklog;
|
|
69
69
|
maybeBacklog = Option.none();
|
|
70
70
|
backlog.forEach(push);
|
|
71
71
|
}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Schema as S } from 'effect';
|
|
2
|
+
import type { Html, HtmlBuilder } from '../../html/index.js';
|
|
3
|
+
export declare const Model: S.Struct<{
|
|
4
|
+
readonly contextMenu: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"Closed", {}>, import("../../schema/index.js").CallableTaggedStruct<"Open", {
|
|
5
|
+
source: S.Literals<readonly ["Direct", "Inner", "Outer"]>;
|
|
6
|
+
}>]>;
|
|
7
|
+
readonly openCount: S.Number;
|
|
8
|
+
}>;
|
|
9
|
+
export type Model = typeof Model.Type;
|
|
10
|
+
declare const Message: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"OpenedContextMenu", {
|
|
11
|
+
source: S.Literals<readonly ["Direct", "Inner", "Outer"]>;
|
|
12
|
+
}>]>;
|
|
13
|
+
type Message = typeof Message.Type;
|
|
14
|
+
export declare const initialModel: {
|
|
15
|
+
readonly contextMenu: {
|
|
16
|
+
readonly _tag: "Closed";
|
|
17
|
+
} | {
|
|
18
|
+
readonly _tag: "Open";
|
|
19
|
+
readonly source: "Direct" | "Inner" | "Outer";
|
|
20
|
+
};
|
|
21
|
+
readonly openCount: number;
|
|
22
|
+
};
|
|
23
|
+
export declare const update: (model: Model, message: Message) => readonly [Model, ReadonlyArray<never>];
|
|
24
|
+
export declare const view: (model: Model, h: HtmlBuilder<Message>) => Html;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=contextMenu.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"contextMenu.d.ts","sourceRoot":"","sources":["../../../src/test/apps/contextMenu.ts"],"names":[],"mappings":"AAAA,OAAO,EAAsB,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAExD,OAAO,KAAK,EAAE,IAAI,EAAE,WAAW,EAAE,MAAM,qBAAqB,CAAA;AAiB5D,eAAO,MAAM,KAAK;;;;;EAGhB,CAAA;AACF,MAAM,MAAM,KAAK,GAAG,OAAO,KAAK,CAAC,IAAI,CAAA;AAQrC,QAAA,MAAM,OAAO;;IAA+B,CAAA;AAC5C,KAAK,OAAO,GAAG,OAAO,OAAO,CAAC,IAAI,CAAA;AAIlC,eAAO,MAAM,YAAY;;;;;;;;CAGvB,CAAA;AAIF,eAAO,MAAM,MAAM,GACjB,OAAO,KAAK,EACZ,SAAS,OAAO,KACf,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,KAAK,CAAC,CAYrC,CAAA;AAIH,eAAO,MAAM,IAAI,GAAI,OAAO,KAAK,EAAE,GAAG,WAAW,CAAC,OAAO,CAAC,KAAG,IA4C5D,CAAA"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { Match as M, Number, Schema as S } from 'effect';
|
|
2
|
+
import { m } from '../../message/index.js';
|
|
3
|
+
import { ts } from '../../schema/index.js';
|
|
4
|
+
import { evo } from '../../struct/index.js';
|
|
5
|
+
// MODEL
|
|
6
|
+
const ContextMenuSource = S.Literals(['Direct', 'Inner', 'Outer']);
|
|
7
|
+
const Closed = ts('Closed');
|
|
8
|
+
const Open = ts('Open', {
|
|
9
|
+
source: ContextMenuSource,
|
|
10
|
+
});
|
|
11
|
+
const ContextMenuState = S.Union([Closed, Open]);
|
|
12
|
+
export const Model = S.Struct({
|
|
13
|
+
contextMenu: ContextMenuState,
|
|
14
|
+
openCount: S.Number,
|
|
15
|
+
});
|
|
16
|
+
// MESSAGE
|
|
17
|
+
const OpenedContextMenu = m('OpenedContextMenu', {
|
|
18
|
+
source: ContextMenuSource,
|
|
19
|
+
});
|
|
20
|
+
const Message = S.Union([OpenedContextMenu]);
|
|
21
|
+
// INIT
|
|
22
|
+
export const initialModel = Model.make({
|
|
23
|
+
contextMenu: Closed(),
|
|
24
|
+
openCount: 0,
|
|
25
|
+
});
|
|
26
|
+
// UPDATE
|
|
27
|
+
export const update = (model, message) => M.value(message).pipe(M.withReturnType(), M.tagsExhaustive({
|
|
28
|
+
OpenedContextMenu: ({ source }) => [
|
|
29
|
+
evo(model, {
|
|
30
|
+
contextMenu: () => Open({ source }),
|
|
31
|
+
openCount: Number.increment,
|
|
32
|
+
}),
|
|
33
|
+
[],
|
|
34
|
+
],
|
|
35
|
+
}));
|
|
36
|
+
// VIEW
|
|
37
|
+
export const view = (model, h) => {
|
|
38
|
+
const contextMenu = M.value(model.contextMenu).pipe(M.tagsExhaustive({
|
|
39
|
+
Closed: () => h.empty,
|
|
40
|
+
Open: ({ source }) => h.div([h.Role('menu'), h.AriaLabel(`${source} context menu`)], [`${source} context menu opens=${model.openCount}`]),
|
|
41
|
+
}));
|
|
42
|
+
return h.div([], [
|
|
43
|
+
h.section([
|
|
44
|
+
h.AriaLabel('outer context area'),
|
|
45
|
+
h.OnContextMenu(OpenedContextMenu({ source: 'Outer' })),
|
|
46
|
+
], [
|
|
47
|
+
h.span([h.AriaLabel('outer target')], ['Outer target']),
|
|
48
|
+
h.div([
|
|
49
|
+
h.AriaLabel('inner context area'),
|
|
50
|
+
h.OnContextMenu(OpenedContextMenu({ source: 'Inner' })),
|
|
51
|
+
], [
|
|
52
|
+
h.span([h.AriaLabel('nearest target')], ['Nearest target']),
|
|
53
|
+
h.button([
|
|
54
|
+
h.AriaLabel('direct target'),
|
|
55
|
+
h.OnContextMenu(OpenedContextMenu({ source: 'Direct' })),
|
|
56
|
+
], ['Direct target']),
|
|
57
|
+
]),
|
|
58
|
+
]),
|
|
59
|
+
h.span([h.AriaLabel('no handler')], ['No handler']),
|
|
60
|
+
contextMenu,
|
|
61
|
+
]);
|
|
62
|
+
};
|
|
@@ -5,12 +5,12 @@ export declare const ChildModel: S.Struct<{
|
|
|
5
5
|
}>;
|
|
6
6
|
export type ChildModel = typeof ChildModel.Type;
|
|
7
7
|
export declare const SubmittedForm: import("../../schema/index.js").CallableTaggedStruct<"SubmittedForm", {}>;
|
|
8
|
-
export declare const
|
|
8
|
+
export declare const SucceededSubmitForm: import("../../schema/index.js").CallableTaggedStruct<"SucceededSubmitForm", {
|
|
9
9
|
id: S.String;
|
|
10
10
|
}>;
|
|
11
11
|
export declare const CancelledForm: import("../../schema/index.js").CallableTaggedStruct<"CancelledForm", {}>;
|
|
12
12
|
export declare const CompletedResetForm: import("../../schema/index.js").CallableTaggedStruct<"CompletedResetForm", {}>;
|
|
13
|
-
export declare const ChildMessage: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"SubmittedForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"
|
|
13
|
+
export declare const ChildMessage: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"SubmittedForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"SucceededSubmitForm", {
|
|
14
14
|
id: S.String;
|
|
15
15
|
}>, import("../../schema/index.js").CallableTaggedStruct<"CancelledForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedResetForm", {}>]>;
|
|
16
16
|
export type ChildMessage = typeof ChildMessage.Type;
|
|
@@ -23,7 +23,7 @@ export declare const ChildOutMessage: S.Union<readonly [import("../../schema/ind
|
|
|
23
23
|
}>, import("../../schema/index.js").CallableTaggedStruct<"RequestedCancel", {}>]>;
|
|
24
24
|
export type ChildOutMessage = typeof ChildOutMessage.Type;
|
|
25
25
|
export declare const SubmitForm: Command.CommandDefinitionNoArgs<"SubmitForm", Effect.Effect<{
|
|
26
|
-
readonly _tag: "
|
|
26
|
+
readonly _tag: "SucceededSubmitForm";
|
|
27
27
|
readonly id: string;
|
|
28
28
|
}, never, never>>;
|
|
29
29
|
export declare const ResetForm: Command.CommandDefinitionNoArgs<"ResetForm", Effect.Effect<{
|
|
@@ -40,13 +40,13 @@ export declare const ParentModel: S.Struct<{
|
|
|
40
40
|
}>;
|
|
41
41
|
export type ParentModel = typeof ParentModel.Type;
|
|
42
42
|
export declare const GotChildMessage: import("../../schema/index.js").CallableTaggedStruct<"GotChildMessage", {
|
|
43
|
-
message: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"SubmittedForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"
|
|
43
|
+
message: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"SubmittedForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"SucceededSubmitForm", {
|
|
44
44
|
id: S.String;
|
|
45
45
|
}>, import("../../schema/index.js").CallableTaggedStruct<"CancelledForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedResetForm", {}>]>;
|
|
46
46
|
}>;
|
|
47
47
|
export declare const CompletedParentReset: import("../../schema/index.js").CallableTaggedStruct<"CompletedParentReset", {}>;
|
|
48
48
|
export declare const ParentMessage: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"GotChildMessage", {
|
|
49
|
-
message: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"SubmittedForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"
|
|
49
|
+
message: S.Union<readonly [import("../../schema/index.js").CallableTaggedStruct<"SubmittedForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"SucceededSubmitForm", {
|
|
50
50
|
id: S.String;
|
|
51
51
|
}>, import("../../schema/index.js").CallableTaggedStruct<"CancelledForm", {}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedResetForm", {}>]>;
|
|
52
52
|
}>, import("../../schema/index.js").CallableTaggedStruct<"CompletedParentReset", {}>]>;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"formChild.d.ts","sourceRoot":"","sources":["../../../src/test/apps/formChild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAKjD,eAAO,MAAM,UAAU;;EAErB,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAI/C,eAAO,MAAM,aAAa,2EAAqB,CAAA;AAC/C,eAAO,MAAM,
|
|
1
|
+
{"version":3,"file":"formChild.d.ts","sourceRoot":"","sources":["../../../src/test/apps/formChild.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAc,MAAM,EAAE,MAAM,IAAI,CAAC,EAAE,MAAM,QAAQ,CAAA;AAEhE,OAAO,KAAK,OAAO,MAAM,wBAAwB,CAAA;AAKjD,eAAO,MAAM,UAAU;;EAErB,CAAA;AACF,MAAM,MAAM,UAAU,GAAG,OAAO,UAAU,CAAC,IAAI,CAAA;AAI/C,eAAO,MAAM,aAAa,2EAAqB,CAAA;AAC/C,eAAO,MAAM,mBAAmB;;EAA6C,CAAA;AAC7E,eAAO,MAAM,aAAa,2EAAqB,CAAA;AAC/C,eAAO,MAAM,kBAAkB,gFAA0B,CAAA;AAEzD,eAAO,MAAM,YAAY;;+JAKvB,CAAA;AACF,MAAM,MAAM,YAAY,GAAG,OAAO,YAAY,CAAC,IAAI,CAAA;AAInD,eAAO,MAAM,aAAa;;EAAuC,CAAA;AACjE,eAAO,MAAM,eAAe,6EAAuB,CAAA;AAEnD,eAAO,MAAM,eAAe;;iFAA4C,CAAA;AACxE,MAAM,MAAM,eAAe,GAAG,OAAO,eAAe,CAAC,IAAI,CAAA;AAIzD,eAAO,MAAM,UAAU;;;iBAGrB,CAAA;AAEF,eAAO,MAAM,SAAS;;iBAGpB,CAAA;AAIF,eAAO,MAAM,iBAAiB,EAAE,UAA+B,CAAA;AAI/D,eAAO,MAAM,WAAW,GACtB,QAAQ,UAAU,EAClB,SAAS,YAAY,KACpB,SAAS,CACV,UAAU,EACV,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,YAAY,CAAC,CAAC,EAC5C,MAAM,CAAC,MAAM,CAAC,eAAe,CAAC,CA4B7B,CAAA;AAIH,eAAO,MAAM,WAAW;;;;;;EAItB,CAAA;AACF,MAAM,MAAM,WAAW,GAAG,OAAO,WAAW,CAAC,IAAI,CAAA;AAIjD,eAAO,MAAM,eAAe;;;;EAE1B,CAAA;AACF,eAAO,MAAM,oBAAoB,kFAA4B,CAAA;AAE7D,eAAO,MAAM,aAAa;;;;sFAAmD,CAAA;AAC7E,MAAM,MAAM,aAAa,GAAG,OAAO,aAAa,CAAC,IAAI,CAAA;AAIrD,eAAO,MAAM,kBAAkB,EAAE,WAIhC,CAAA;AAID,eAAO,MAAM,YAAY,GACvB,aAAa,WAAW,EACxB,SAAS,aAAa,KACrB,SAAS,CAAC,WAAW,EAAE,aAAa,CAAC,OAAO,CAAC,OAAO,CAAC,aAAa,CAAC,CAAC,CAqCpE,CAAA"}
|
|
@@ -7,12 +7,12 @@ export const ChildModel = S.Struct({
|
|
|
7
7
|
});
|
|
8
8
|
// CHILD MESSAGE
|
|
9
9
|
export const SubmittedForm = m('SubmittedForm');
|
|
10
|
-
export const
|
|
10
|
+
export const SucceededSubmitForm = m('SucceededSubmitForm', { id: S.String });
|
|
11
11
|
export const CancelledForm = m('CancelledForm');
|
|
12
12
|
export const CompletedResetForm = m('CompletedResetForm');
|
|
13
13
|
export const ChildMessage = S.Union([
|
|
14
14
|
SubmittedForm,
|
|
15
|
-
|
|
15
|
+
SucceededSubmitForm,
|
|
16
16
|
CancelledForm,
|
|
17
17
|
CompletedResetForm,
|
|
18
18
|
]);
|
|
@@ -22,8 +22,8 @@ export const RequestedCancel = m('RequestedCancel');
|
|
|
22
22
|
export const ChildOutMessage = S.Union([RequestedSave, RequestedCancel]);
|
|
23
23
|
// CHILD COMMAND
|
|
24
24
|
export const SubmitForm = Command.define('SubmitForm', {
|
|
25
|
-
messages: [
|
|
26
|
-
execute: Effect.sync(() =>
|
|
25
|
+
messages: [SucceededSubmitForm],
|
|
26
|
+
execute: Effect.sync(() => SucceededSubmitForm({ id: 'abc' })),
|
|
27
27
|
});
|
|
28
28
|
export const ResetForm = Command.define('ResetForm', {
|
|
29
29
|
messages: [CompletedResetForm],
|
|
@@ -38,7 +38,7 @@ export const childUpdate = (_model, message) => M.value(message).pipe(M.withRetu
|
|
|
38
38
|
[SubmitForm()],
|
|
39
39
|
Option.none(),
|
|
40
40
|
],
|
|
41
|
-
|
|
41
|
+
SucceededSubmitForm: ({ id }) => [
|
|
42
42
|
{ status: 'Submitted' },
|
|
43
43
|
[ResetForm()],
|
|
44
44
|
Option.some(RequestedSave({ id })),
|
package/dist/test/internal.d.ts
CHANGED
|
@@ -1,4 +1,6 @@
|
|
|
1
|
+
import type { Effect } from 'effect';
|
|
1
2
|
import { type CommandDefinition } from '../command/index.js';
|
|
3
|
+
import type * as Interruptible from '../command/interruptible/index.js';
|
|
2
4
|
import { type MountDefinition } from '../mount/index.js';
|
|
3
5
|
/** A Command in a test simulation. Carries `name` and optionally the `args`
|
|
4
6
|
* the runtime captured at construction. Instance matchers (Command values
|
|
@@ -35,6 +37,20 @@ export type AnyCommand = Readonly<{
|
|
|
35
37
|
* test is verifying, the right assertion is usually against the Model that
|
|
36
38
|
* the Command's result fed through update, not a partial Command shape. */
|
|
37
39
|
export type CommandMatcher = CommandDefinition<string, unknown> | AnyCommand;
|
|
40
|
+
/** A typed Command instance carrying the result Message type through its
|
|
41
|
+
* `effect` field. */
|
|
42
|
+
export type AnyCommandInstance<ResultMessage = unknown> = Readonly<{
|
|
43
|
+
name: string;
|
|
44
|
+
args?: Record<string, unknown>;
|
|
45
|
+
effect: Effect.Effect<ResultMessage, any, any>;
|
|
46
|
+
}>;
|
|
47
|
+
/** A Command Definition whose result Message can be supplied by Story and
|
|
48
|
+
* Scene resolution APIs. */
|
|
49
|
+
export type ResolvableCommandDefinition<Name extends string, ResultMessage> = CommandDefinition<Name, ResultMessage> | Interruptible.DefinitionNoArgs<Name, Effect.Effect<ResultMessage, any, any>> | Interruptible.DefinitionWithArgs<Name, any, any, Effect.Effect<ResultMessage, any, any>> | Interruptible.DefinitionWithArgsNameKeyed<Name, any, Effect.Effect<ResultMessage, any, any>>;
|
|
50
|
+
/** A Definition or Command instance accepted by Story and Scene resolution
|
|
51
|
+
* APIs. */
|
|
52
|
+
export type ResolvableCommandMatcher = ResolvableCommandDefinition<string, unknown> | AnyCommandInstance<unknown>;
|
|
53
|
+
type ResultMessageForMatcher<Matcher extends ResolvableCommandMatcher> = Matcher extends ResolvableCommandDefinition<string, infer ResultMessage> ? ResultMessage : Matcher extends AnyCommandInstance<infer ResultMessage> ? ResultMessage : never;
|
|
38
54
|
/** Formats a Command matcher for display in error messages. Definition
|
|
39
55
|
* matchers render as just the name; Instance matchers append the args. */
|
|
40
56
|
export declare const formatMatcher: (matcher: CommandMatcher) => string;
|
|
@@ -82,11 +98,8 @@ type UpdateResult<Model, OutMessage> = readonly [Model, ReadonlyArray<AnyCommand
|
|
|
82
98
|
* name; an Instance matcher resolves only the pending Command whose name AND
|
|
83
99
|
* args match. The matched Command's own message-mapping chain is applied to
|
|
84
100
|
* the result, so pass the child's raw result Message, not a parent-wrapped
|
|
85
|
-
* one. */
|
|
86
|
-
export type Resolver<
|
|
87
|
-
CommandMatcher,
|
|
88
|
-
ResultMessage
|
|
89
|
-
];
|
|
101
|
+
* one. The result Message must belong to the matched Command. */
|
|
102
|
+
export type Resolver<Matcher extends ResolvableCommandMatcher = ResolvableCommandMatcher> = readonly [Matcher, ResultMessageForMatcher<Matcher>];
|
|
90
103
|
/** A Mount matcher (Definition or Instance) paired with the raw result Message
|
|
91
104
|
* to resolve it with. Mirrors `Resolver` for Commands. When the mount lives
|
|
92
105
|
* inside a Submodel, the boundary's own `toParentMessage` chain (snapshotted at
|
|
@@ -120,13 +133,17 @@ export type BaseInternal<Model, Message, OutMessage = undefined> = Readonly<{
|
|
|
120
133
|
* chain to `resultMessage` first. Returns `undefined` when no pending Command
|
|
121
134
|
* matches. Definition matchers match by name; Instance matchers match by
|
|
122
135
|
* name + args. */
|
|
123
|
-
export declare const resolveByMatcher: <Model, Message>(internal: BaseInternal<Model, Message,
|
|
136
|
+
export declare const resolveByMatcher: <Model, Message, OutMessage>(internal: BaseInternal<Model, Message, OutMessage>, matcher: CommandMatcher, resultMessage: unknown) => BaseInternal<Model, Message, OutMessage> | undefined;
|
|
124
137
|
/** Resolves all listed Commands, cascading through any Commands produced by
|
|
125
138
|
* the result. Each entry is consumed by exactly one matching dispatch in
|
|
126
139
|
* declaration order; for N identical responses, compose with
|
|
127
140
|
* `Array.makeBy(n, () => [Def, message])`. Across calls, new entries replace
|
|
128
141
|
* any leftover resolvers sharing their fingerprint (latest wins). */
|
|
129
142
|
export declare const resolveAllInternal: <Model, Message, OutMessage>(internal: BaseInternal<Model, Message, OutMessage>, resolvers: ReadonlyArray<Resolver>) => BaseInternal<Model, Message, OutMessage>;
|
|
143
|
+
/** Resolves only the listed Command resolvers, cascading through result
|
|
144
|
+
* Messages, and throws unless every resolver matches one dispatched Command.
|
|
145
|
+
* Unlike `resolveAllInternal`, unmatched entries never carry forward. */
|
|
146
|
+
export declare const resolveAllExactInternal: <Model, Message, OutMessage>(internal: BaseInternal<Model, Message, OutMessage>, resolvers: ReadonlyArray<Resolver>) => BaseInternal<Model, Message, OutMessage>;
|
|
130
147
|
/** Throws if more than one pending Command matches the given matcher. Used
|
|
131
148
|
* by single-resolve paths (`Story.Command.resolve`, `Scene.Command.resolve`)
|
|
132
149
|
* where ambiguity is a bug. The test author can't have intended one specific
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"internal.d.ts","sourceRoot":"","sources":["../../src/test/internal.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"internal.d.ts","sourceRoot":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AM,8BAA8B,GACzC,qBAAqB,aAAa,CAAC,YAAY,CAAC,EAChD,SAAS,MAAM,KACd,IAQF,CAAA;AAED,sDAAsD;AACtD,eAAO,MAAM,uBAAuB,GAClC,eAAe,aAAa,CAAC,YAAY,CAAC,KACzC,IASF,CAAA;AAED,uEAAuE;AACvE,eAAO,MAAM,6BAA6B,GACxC,qBAAqB,aAAa,CAAC,YAAY,CAAC,KAC/C,IASF,CAAA"}
|
package/dist/test/internal.js
CHANGED
|
@@ -73,6 +73,10 @@ const MAX_CASCADE_DEPTH = 100;
|
|
|
73
73
|
const matcherFingerprint = (matcher) => isCommandDefinitionMatcher(matcher)
|
|
74
74
|
? `def:${matcher.name}`
|
|
75
75
|
: `inst:${matcher.name}:${JSON.stringify(matcher.args ?? null)}`;
|
|
76
|
+
const findNextMatch = (commands, resolvers) => {
|
|
77
|
+
const toMatchedResolver = (command) => pipe(resolvers, Array.findFirstWithIndex(({ matcher }) => commandMatches(matcher, command)), Option.map(([entry, resolverIndex]) => ({ entry, resolverIndex })));
|
|
78
|
+
return Array.findFirst(commands, toMatchedResolver);
|
|
79
|
+
};
|
|
76
80
|
/** Resolves all listed Commands, cascading through any Commands produced by
|
|
77
81
|
* the result. Each entry is consumed by exactly one matching dispatch in
|
|
78
82
|
* declaration order; for N identical responses, compose with
|
|
@@ -87,9 +91,8 @@ export const resolveAllInternal = (internal, resolvers) => {
|
|
|
87
91
|
...internal,
|
|
88
92
|
resolvers: [...survivingExisting, ...newEntries],
|
|
89
93
|
};
|
|
90
|
-
const findNextMatch = (state) => Array.findFirst(state.commands, command => pipe(state.resolvers, Array.findFirstIndex(({ matcher }) => commandMatches(matcher, command)), Option.flatMap(resolverIndex => pipe(state.resolvers, Array.get(resolverIndex), Option.map(entry => ({ entry, resolverIndex }))))));
|
|
91
94
|
for (let depth = 0; depth < MAX_CASCADE_DEPTH; depth++) {
|
|
92
|
-
const matched = findNextMatch(current);
|
|
95
|
+
const matched = findNextMatch(current.commands, current.resolvers);
|
|
93
96
|
if (Option.isNone(matched)) {
|
|
94
97
|
break;
|
|
95
98
|
}
|
|
@@ -109,6 +112,34 @@ export const resolveAllInternal = (internal, resolvers) => {
|
|
|
109
112
|
return current;
|
|
110
113
|
/* eslint-enable @typescript-eslint/consistent-type-assertions */
|
|
111
114
|
};
|
|
115
|
+
/** Resolves only the listed Command resolvers, cascading through result
|
|
116
|
+
* Messages, and throws unless every resolver matches one dispatched Command.
|
|
117
|
+
* Unlike `resolveAllInternal`, unmatched entries never carry forward. */
|
|
118
|
+
export const resolveAllExactInternal = (internal, resolvers) => {
|
|
119
|
+
let remainingResolvers = Array.map(resolvers, ([matcher, resultMessage]) => ({ matcher, resultMessage }));
|
|
120
|
+
let current = internal;
|
|
121
|
+
for (let depth = 0; depth < MAX_CASCADE_DEPTH; depth++) {
|
|
122
|
+
const matched = findNextMatch(current.commands, remainingResolvers);
|
|
123
|
+
if (Option.isNone(matched)) {
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
const next = resolveByMatcher(current, matched.value.entry.matcher, matched.value.entry.resultMessage);
|
|
127
|
+
if (Predicate.isUndefined(next)) {
|
|
128
|
+
break;
|
|
129
|
+
}
|
|
130
|
+
current = next;
|
|
131
|
+
remainingResolvers = Array.remove(remainingResolvers, matched.value.resolverIndex);
|
|
132
|
+
if (depth === MAX_CASCADE_DEPTH - 1) {
|
|
133
|
+
throw new Error('resolveAllExact hit the maximum cascade depth (100). ' +
|
|
134
|
+
'This usually means Commands are producing Commands in an infinite cycle.');
|
|
135
|
+
}
|
|
136
|
+
}
|
|
137
|
+
if (Array.isReadonlyArrayNonEmpty(remainingResolvers)) {
|
|
138
|
+
throw new Error(`resolveAllExact expected Commands that were not dispatched:\n\n${formatMatcherList(Array.map(remainingResolvers, ({ matcher }) => matcher))}\n\nPending Commands after resolving matches:\n\n${formatCommandList(current.commands)}`);
|
|
139
|
+
}
|
|
140
|
+
assertAllCommandsResolved(current.commands);
|
|
141
|
+
return current;
|
|
142
|
+
};
|
|
112
143
|
const formatCommandList = (commands) => Array.match(commands, {
|
|
113
144
|
onEmpty: () => ' (none)',
|
|
114
145
|
onNonEmpty: nonEmpty => pipe(nonEmpty, Array.map(command => ` ${formatCommand(command)}`), Array.join('\n')),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"matchers.d.ts","sourceRoot":"","sources":["../../src/test/matchers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAqB,MAAM,QAAQ,CAAA;AAElD,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAcvC,oGAAoG;AACpG,eAAO,MAAM,aAAa;yBACH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,MAAM,GAAG,MAAM;;;;;;;4BAqB5C,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,MAAM,GAAG,MAAM;;;;;;;0BAqBjD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,MAAM;;;;;;;yBAmBhD,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QACxB,MAAM,kBACI,MAAM;;;;;;;sBA2CN,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;;yBAWjB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;;0BAY7B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QACxB,MAAM,kBACI,MAAM;;;;;;;yBA8CH,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,MAAM;;;;;;;4BAsB/B,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,QAAQ,MAAM;;;;;;;0BAkBpC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,YAAY,MAAM;;;;;;;;;;2BA4BrC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;;;0BAyBrB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;;;wBAyBtB,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;uBAgBn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;;;;;;;;;0BA4BnC,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC;;;;;;;CAwB3C,CAAA"}
|
package/dist/test/matchers.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Option, String as String_ } from 'effect';
|
|
2
|
-
import { attr, textContent } from './query.js';
|
|
2
|
+
import { attr, isHidden, textContent } from './query.js';
|
|
3
3
|
const describeExpected = (expected) => expected instanceof RegExp ? `${expected}` : `"${expected}"`;
|
|
4
4
|
const textMatches = (value, expected) => expected instanceof RegExp ? expected.test(value) : value === expected;
|
|
5
5
|
const textIncludes = (value, expected) => expected instanceof RegExp ? expected.test(value) : value.includes(expected);
|
|
@@ -292,18 +292,8 @@ export const sceneMatchers = {
|
|
|
292
292
|
message: () => 'Expected element to be visible but the element does not exist.',
|
|
293
293
|
}),
|
|
294
294
|
onSome: vnode => {
|
|
295
|
-
const hiddenAttr = attr(vnode, 'hidden');
|
|
296
|
-
const hiddenByAttr = Option.isSome(hiddenAttr) && hiddenAttr.value !== 'false';
|
|
297
|
-
const ariaHidden = attr(vnode, 'aria-hidden');
|
|
298
|
-
const hiddenByAria = Option.isSome(ariaHidden) && ariaHidden.value === 'true';
|
|
299
|
-
const display = vnode.data?.style?.['display'];
|
|
300
|
-
const visibility = vnode.data?.style?.['visibility'];
|
|
301
|
-
const isHidden = hiddenByAttr ||
|
|
302
|
-
hiddenByAria ||
|
|
303
|
-
display === 'none' ||
|
|
304
|
-
visibility === 'hidden';
|
|
305
295
|
return {
|
|
306
|
-
pass: !isHidden,
|
|
296
|
+
pass: !isHidden(vnode),
|
|
307
297
|
message: () =>
|
|
308
298
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
309
299
|
this.isNot
|
package/dist/test/query.d.ts
CHANGED
|
@@ -14,6 +14,8 @@ type SimpleSelector = Readonly<{
|
|
|
14
14
|
}>;
|
|
15
15
|
type Selector = ReadonlyArray<SimpleSelector>;
|
|
16
16
|
export declare const parseSelector: (input: string) => Selector;
|
|
17
|
+
/** Returns whether an element is hidden from the accessibility tree. */
|
|
18
|
+
export declare const isHidden: (vnode: VNode) => boolean;
|
|
17
19
|
/** Returns the ancestor chain of `target` within `root`, ordered from root to
|
|
18
20
|
* the immediate parent of `target` (exclusive). Returns an empty array when
|
|
19
21
|
* `target` is `root` itself or is not present in the subtree. */
|
|
@@ -21,7 +23,7 @@ export declare const ancestorsOf: (target: VNode) => (root: VNode) => ReadonlyAr
|
|
|
21
23
|
/** Computes the accessible name of an element. Resolves via
|
|
22
24
|
* `aria-labelledby`, `aria-label`, `<label for>`, native host language
|
|
23
25
|
* attributes and child elements (img/area alt, input value/alt,
|
|
24
|
-
* fieldset legend, figure figcaption, table caption), text content,
|
|
26
|
+
* fieldset legend, figure figcaption, table caption), accessible text content,
|
|
25
27
|
* then `title`. */
|
|
26
28
|
export declare const accessibleName: (root: VNode) => (vnode: VNode) => string;
|
|
27
29
|
/** Computes the accessible description of an element. Resolves via
|
package/dist/test/query.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"query.d.ts","sourceRoot":"","sources":["../../src/test/query.ts"],"names":[],"mappings":"AAAA,OAAO,EAKL,MAAM,EAOP,MAAM,QAAQ,CAAA;AAIf,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,YAAY,CAAA;AAIvC,KAAK,SAAS,GAAG,OAAO,GAAG,YAAY,CAAA;AAEvC,KAAK,gBAAgB,GAAG,QAAQ,CAAC;IAC/B,IAAI,EAAE,MAAM,CAAA;IACZ,KAAK,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC5B,IAAI,EAAE,SAAS,CAAA;CAChB,CAAC,CAAA;AAEF,KAAK,cAAc,GAAG,QAAQ,CAAC;IAC7B,GAAG,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IAC1B,EAAE,EAAE,MAAM,CAAC,MAAM,CAAC,MAAM,CAAC,CAAA;IACzB,OAAO,EAAE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B,UAAU,CAAC,EAAE,MAAM,CAAA;CACpB,CAAC,CAAA;AAaF;;2EAE2E;AAC3E,eAAO,MAAM,MAAM,EAAE;IACnB,CAAC,UAAU,EAAE,UAAU,EAAE,OAAO,EAAE,aAAa,GAAG,UAAU,CAAA;IAC5D,CAAC,OAAO,EAAE,aAAa,GAAG,CAAC,UAAU,EAAE,UAAU,KAAK,UAAU,CAAA;CAyBjE,CAAA;AAED,+EAA+E;AAC/E,eAAO,MAAM,aAAa,GACxB,MAAM,KAAK,EACX,QAAQ,MAAM,GAAG,OAAO,KACvB,QAAQ,CAAC;IAAE,YAAY,EAAE,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC;IAAC,WAAW,EAAE,MAAM,CAAA;CAAE,CAQtE,CAAA"}
|
package/dist/test/query.js
CHANGED
|
@@ -56,6 +56,33 @@ export const parseSelector = (input) => {
|
|
|
56
56
|
// NODE UTILITIES
|
|
57
57
|
const lookupAttribute = (name) => (vnode) => pipe(vnode.data?.attrs?.[name], Option.fromNullishOr, Option.orElse(() => Option.fromNullishOr(vnode.data?.props?.[name])));
|
|
58
58
|
const lookupStringAttribute = (name) => (vnode) => pipe(vnode, lookupAttribute(name), Option.map(String));
|
|
59
|
+
/** Returns whether an element is hidden from the accessibility tree. */
|
|
60
|
+
export const isHidden = (vnode) => {
|
|
61
|
+
const maybeHiddenProperty = Option.fromNullishOr(vnode.data?.props?.['hidden']);
|
|
62
|
+
if (Option.exists(maybeHiddenProperty, Boolean)) {
|
|
63
|
+
return true;
|
|
64
|
+
}
|
|
65
|
+
if (Option.isNone(maybeHiddenProperty)) {
|
|
66
|
+
const maybeHiddenAttribute = Option.fromNullishOr(vnode.data?.attrs?.['hidden']);
|
|
67
|
+
if (Option.isSome(maybeHiddenAttribute) &&
|
|
68
|
+
maybeHiddenAttribute.value !== false) {
|
|
69
|
+
return true;
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
const maybeAriaHidden = lookupStringAttribute('aria-hidden')(vnode);
|
|
73
|
+
if (Option.isSome(maybeAriaHidden) && maybeAriaHidden.value === 'true') {
|
|
74
|
+
return true;
|
|
75
|
+
}
|
|
76
|
+
const display = vnode.data?.style?.['display'];
|
|
77
|
+
if (display === 'none') {
|
|
78
|
+
return true;
|
|
79
|
+
}
|
|
80
|
+
const visibility = vnode.data?.style?.['visibility'];
|
|
81
|
+
if (visibility === 'hidden') {
|
|
82
|
+
return true;
|
|
83
|
+
}
|
|
84
|
+
return false;
|
|
85
|
+
};
|
|
59
86
|
const isElement = (node) => !Predicate.isUndefined(node.sel);
|
|
60
87
|
const isVNode = (child) => !Predicate.isString(child);
|
|
61
88
|
const vnodeChildren = (vnode) => Array.filter(vnode.children ?? [], isVNode);
|
|
@@ -190,14 +217,26 @@ const implicitRole = (root) => (vnode) => pipe(vnode.sel, Option.fromNullishOr,
|
|
|
190
217
|
const resolveRoles = (root) => (vnode) => pipe(vnode, lookupStringAttribute('role'), Option.map(flow(String_.split(WHITESPACE_PATTERN), Array.filter(String_.isNonEmpty))), Option.getOrElse(() => Option.toArray(implicitRole(root)(vnode))));
|
|
191
218
|
// ACCESSIBLE NAME
|
|
192
219
|
const nonEmptyString = (value) => Option.filter(Option.some(String(value)), String_.isNonEmpty);
|
|
193
|
-
const
|
|
220
|
+
const accessibleTextContent = (vnode) => {
|
|
221
|
+
if (Predicate.isString(vnode.text)) {
|
|
222
|
+
return vnode.text;
|
|
223
|
+
}
|
|
224
|
+
return pipe(vnode.children ?? [], Array.map(child => {
|
|
225
|
+
if (Predicate.isString(child)) {
|
|
226
|
+
return child;
|
|
227
|
+
}
|
|
228
|
+
return isHidden(child) ? '' : accessibleTextContent(child);
|
|
229
|
+
}), Array.join(''));
|
|
230
|
+
};
|
|
231
|
+
const referencedTextContent = (vnode) => isHidden(vnode) ? textContent(vnode) : accessibleTextContent(vnode);
|
|
232
|
+
const nameFromLabelledBy = (root) => (vnode) => pipe(vnode, lookupAttribute('aria-labelledby'), Option.flatMap(nonEmptyString), Option.map(labelledBy => pipe(labelledBy, String_.split(WHITESPACE_PATTERN), Array.filterMap(flow(findById(root), Option.map(referencedTextContent), Result.fromOption(() => undefined))), Array.join(' '))), Option.filter(String_.isNonEmpty));
|
|
194
233
|
const nameFromAriaLabel = (vnode) => pipe(vnode, lookupAttribute('aria-label'), Option.flatMap(nonEmptyString));
|
|
195
234
|
const nameFromLabelFor = (root) => (vnode) => pipe(vnode, lookupStringAttribute('id'), Option.flatMap(idString => pipe(allNodesIn(root), Array.findFirst(node => node.sel === 'label' &&
|
|
196
|
-
pipe(node, lookupStringAttribute('htmlFor'), Option.exists(Equal.equals(idString)))), Option.map(
|
|
197
|
-
const nameFromTextContent = (vnode) => Option.filter(Option.some(
|
|
235
|
+
pipe(node, lookupStringAttribute('htmlFor'), Option.exists(Equal.equals(idString)))), Option.map(referencedTextContent))));
|
|
236
|
+
const nameFromTextContent = (vnode) => Option.filter(Option.some(accessibleTextContent(vnode)), String_.isNonEmpty);
|
|
198
237
|
const nameFromTitle = (vnode) => pipe(vnode, lookupAttribute('title'), Option.flatMap(nonEmptyString));
|
|
199
238
|
const findFirstDirectChildWithTag = (tag) => (vnode) => Array.findFirst(vnodeChildren(vnode), ({ sel }) => sel === tag);
|
|
200
|
-
const nameFromChildTag = (childTag) => (vnode) => pipe(vnode, findFirstDirectChildWithTag(childTag), Option.map(
|
|
239
|
+
const nameFromChildTag = (childTag) => (vnode) => pipe(vnode, findFirstDirectChildWithTag(childTag), Option.filter(child => !isHidden(child)), Option.map(accessibleTextContent), Option.flatMap(nonEmptyString));
|
|
201
240
|
const INPUT_BUTTON_TYPES = ['button', 'reset', 'submit'];
|
|
202
241
|
const nameFromInput = (vnode) => {
|
|
203
242
|
const type = pipe(vnode, lookupStringAttribute('type'), Option.getOrElse(() => 'text'));
|
|
@@ -213,14 +252,14 @@ const nameFromNativeHost = (vnode) => Match.value(vnode.sel).pipe(Match.whenOr('
|
|
|
213
252
|
/** Computes the accessible name of an element. Resolves via
|
|
214
253
|
* `aria-labelledby`, `aria-label`, `<label for>`, native host language
|
|
215
254
|
* attributes and child elements (img/area alt, input value/alt,
|
|
216
|
-
* fieldset legend, figure figcaption, table caption), text content,
|
|
255
|
+
* fieldset legend, figure figcaption, table caption), accessible text content,
|
|
217
256
|
* then `title`. */
|
|
218
257
|
export const accessibleName = (root) => (vnode) => pipe(vnode, nameFromLabelledBy(root), Option.orElse(() => nameFromAriaLabel(vnode)), Option.orElse(() => nameFromLabelFor(root)(vnode)), Option.orElse(() => nameFromNativeHost(vnode)), Option.orElse(() => nameFromTextContent(vnode)), Option.orElse(() => nameFromTitle(vnode)), Option.getOrElse(() => ''));
|
|
219
258
|
/** Computes the accessible description of an element. Resolves via
|
|
220
259
|
* `aria-describedby` (joining referenced elements' text content). */
|
|
221
260
|
export const accessibleDescription = (root) => (vnode) => pipe(vnode, lookupAttribute('aria-describedby'), Option.flatMap(nonEmptyString), Option.match({
|
|
222
261
|
onNone: () => '',
|
|
223
|
-
onSome: flow(String_.split(WHITESPACE_PATTERN), Array.filterMap(flow(findById(root), Option.map(
|
|
262
|
+
onSome: flow(String_.split(WHITESPACE_PATTERN), Array.filterMap(flow(findById(root), Option.map(referencedTextContent), Result.fromOption(() => undefined))), Array.join(' ')),
|
|
224
263
|
}));
|
|
225
264
|
// PUBLIC API
|
|
226
265
|
const findAllImpl = (selectorString) => (html) => {
|
package/dist/test/scene.d.ts
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type { CommandDefinition } from '../command/index.js';
|
|
3
|
-
import type * as Interruptible from '../command/interruptible/index.js';
|
|
1
|
+
import { Option, type Schema } from 'effect';
|
|
4
2
|
import type { CustomElementSpec } from '../customElement/index.js';
|
|
5
3
|
import type { File } from '../file/index.js';
|
|
6
4
|
import type { Document, Html, HtmlBuilder, KeyboardModifiers } from '../html/index.js';
|
|
7
5
|
import type { Entry as ManagedResourceEntry } from '../managedResource/index.js';
|
|
8
6
|
import type { MountDefinition } from '../mount/index.js';
|
|
9
7
|
import type { VNode } from '../vdom.js';
|
|
10
|
-
import type { AnyCommand, AnyMount, CommandMatcher, MountMatcher, MountResolver, PendingMount, Resolver } from './internal.js';
|
|
8
|
+
import type { AnyCommand, AnyCommandInstance, AnyMount, CommandMatcher, MountMatcher, MountResolver, PendingMount, ResolvableCommandDefinition, ResolvableCommandMatcher, Resolver } from './internal.js';
|
|
11
9
|
import type { Locator, LocatorAll } from './query.js';
|
|
12
10
|
export type { AnyCommand, AnyMount, MountMatcher, MountResolver, PendingMount, Resolver, };
|
|
13
11
|
export { find, findAll, textContent, attr, getByRole, getAllByRole, getByText, getByPlaceholder, getByLabel, getByAltText, getByTitle, getByTestId, getByDisplayValue, role, placeholder, label, altText, title, testId, displayValue, selector, text, within, getAllByText, getAllByLabel, getAllByPlaceholder, getAllByAltText, getAllByTitle, getAllByTestId, getAllByDisplayValue, first, last, nth, filter, } from './query.js';
|
|
@@ -54,20 +52,6 @@ type GivenStep<Model> = Readonly<{
|
|
|
54
52
|
}> & (<M, Message, OutMessage = undefined>(simulation: SceneSimulation<M, Message, OutMessage>) => SceneSimulation<M, Message, OutMessage>);
|
|
55
53
|
/** A single step in a scene: either a `given` step or a scene simulation transform. */
|
|
56
54
|
export type SceneStep<Model, Message, OutMessage> = GivenStep<NoInfer<Model>> | ((simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>);
|
|
57
|
-
/** A typed Command instance carrying the result Message type via its
|
|
58
|
-
* `effect` field, so passing `FetchWeather({ zipCode })` to `Scene.Command.resolve`
|
|
59
|
-
* preserves the link between the Command and its declared result Message. */
|
|
60
|
-
type SceneCommandInstance<ResultMessage = unknown> = Readonly<{
|
|
61
|
-
name: string;
|
|
62
|
-
args?: Record<string, unknown>;
|
|
63
|
-
effect: Effect.Effect<ResultMessage, any, any>;
|
|
64
|
-
}>;
|
|
65
|
-
/** A Command Definition accepted by `Scene.Command.resolve` as a name matcher:
|
|
66
|
-
* a plain `Command.define` Definition or an interruptible
|
|
67
|
-
* interruptible `Command.define` Definition. Both carry the
|
|
68
|
-
* `CommandDefinitionTypeId` brand and match by name at runtime, so `resolve`
|
|
69
|
-
* accepts either, the way `expectHas`/`expectExact` already do. */
|
|
70
|
-
type ResolvableCommandDefinition<Name extends string, ResultMessage> = CommandDefinition<Name, ResultMessage> | Interruptible.DefinitionNoArgs<Name, Effect.Effect<ResultMessage, any, any>> | Interruptible.DefinitionWithArgs<Name, any, any, Effect.Effect<ResultMessage, any, any>> | Interruptible.DefinitionWithArgsNameKeyed<Name, any, Effect.Effect<ResultMessage, any, any>>;
|
|
71
55
|
/** Sets the initial Model for a scene test. */
|
|
72
56
|
export declare const given: <Model>(model: Model) => GivenStep<Model>;
|
|
73
57
|
/** A ManagedResource entry a scene can drive: the Option-shaped requirements
|
|
@@ -80,14 +64,18 @@ export declare const Command: {
|
|
|
80
64
|
/** Resolves a specific pending Command with the given result Message. */
|
|
81
65
|
readonly resolve: {
|
|
82
66
|
<Name extends string, ResultMessage>(definition: ResolvableCommandDefinition<Name, ResultMessage>, resultMessage: ResultMessage): <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
83
|
-
<ResultMessage>(instance:
|
|
67
|
+
<ResultMessage>(instance: AnyCommandInstance<ResultMessage>, resultMessage: ResultMessage): <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
84
68
|
};
|
|
85
69
|
/** Resolves listed Commands with their result Messages, cascading through any
|
|
86
70
|
* Commands the result produces. Each entry resolves exactly one matching
|
|
87
71
|
* dispatch in declaration order; compose with `Array.makeBy` for N
|
|
88
72
|
* identical responses. Resolvers carry across calls; a new entry replaces
|
|
89
73
|
* any leftovers sharing its Definition or Instance shape (latest wins). */
|
|
90
|
-
readonly resolveAll: <
|
|
74
|
+
readonly resolveAll: <Matchers extends ReadonlyArray<ResolvableCommandMatcher>>(...resolvers: { [K in keyof Matchers]: Resolver<Matchers[K]>; }) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
75
|
+
/** Resolves listed Commands and throws unless every resolver matches one
|
|
76
|
+
* dispatch and no actual Commands remain unresolved. Entries apply only to
|
|
77
|
+
* this call and never carry forward. */
|
|
78
|
+
readonly resolveAllExact: <Matchers extends ReadonlyArray<ResolvableCommandMatcher>>(...resolvers: { [K in keyof Matchers]: Resolver<Matchers[K]>; }) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
91
79
|
/** Asserts that every given Command is among the pending Commands. */
|
|
92
80
|
readonly expectHas: (...matchers: ReadonlyArray<CommandMatcher>) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
93
81
|
/** Asserts that the pending Commands match the given definitions exactly (order-independent). */
|
|
@@ -182,6 +170,10 @@ export declare const click: (target: string | Locator) => <Model, Message, OutMe
|
|
|
182
170
|
* When the element has no dblclick handler, the event bubbles up to the
|
|
183
171
|
* nearest ancestor with one, mirroring browser event propagation. */
|
|
184
172
|
export declare const doubleClick: (target: string | Locator) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
173
|
+
/** Simulates a contextmenu event on the element matching the target.
|
|
174
|
+
* When the element has no contextmenu handler, the event bubbles up to the
|
|
175
|
+
* nearest ancestor with one, mirroring browser event propagation. */
|
|
176
|
+
export declare const contextMenu: (target: string | Locator) => <Model, Message, OutMessage = undefined>(simulation: SceneSimulation<Model, Message, OutMessage>) => SceneSimulation<Model, Message, OutMessage>;
|
|
185
177
|
type PointerDownOptions = Readonly<{
|
|
186
178
|
pointerType?: string;
|
|
187
179
|
button?: number;
|
package/dist/test/scene.d.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ymbol, __clearRuntime as clearHtmlRuntime, __htmlBuilder as htmlBuilderFor, __setRuntime as setHtmlRuntime, } from '../html/index.js';
|
|
5
5
|
import { MountTracker } from '../mount/index.js';
|
|
6
6
|
import { Dispatch } from '../runtime/index.js';
|
|
7
|
-
import { assertAllCommandsResolved, assertAllMountsResolved, assertAllUnmountsAcknowledged, assertExactCommands, assertExactMounts, assertHasCommands, assertHasMounts, assertNoUnacknowledgedUnmounts, assertNoUnresolvedCommands, assertNoUnresolvedMounts, assertResolveUnambiguous, assertZeroCommands, assertZeroMounts, formatCommand, formatMatcher, formatMountList, formatMountMatcher, mountMatches, resolveAllInternal, resolveByMatcher, resolveMountByMatcher, } from './internal.js';
|
|
8
|
-
import { accessibleDescription, accessibleName, ancestorsOf, attr, resolveTarget, selector, textContent, within, } from './query.js';
|
|
7
|
+
import { assertAllCommandsResolved, assertAllMountsResolved, assertAllUnmountsAcknowledged, assertExactCommands, assertExactMounts, assertHasCommands, assertHasMounts, assertNoUnacknowledgedUnmounts, assertNoUnresolvedCommands, assertNoUnresolvedMounts, assertResolveUnambiguous, assertZeroCommands, assertZeroMounts, formatCommand, formatMatcher, formatMountList, formatMountMatcher, mountMatches, resolveAllExactInternal, resolveAllInternal, resolveByMatcher, resolveMountByMatcher, } from './internal.js';
|
|
8
|
+
import { accessibleDescription, accessibleName, ancestorsOf, attr, isHidden, resolveTarget, selector, textContent, within, } from './query.js';
|
|
9
9
|
import { allAltText, allDisplayValue, allLabel, allPlaceholder, allRole, allSelector, allTestId, allText, allTitle, } from './query.js';
|
|
10
10
|
export { find, findAll, textContent, attr, getByRole, getAllByRole, getByText, getByPlaceholder, getByLabel, getByAltText, getByTitle, getByTestId, getByDisplayValue, role, placeholder, label, altText, title, testId, displayValue, selector, text, within, getAllByText, getAllByLabel, getAllByPlaceholder, getAllByAltText, getAllByTitle, getAllByTestId, getAllByDisplayValue, first, last, nth, filter, } from './query.js';
|
|
11
11
|
/** Multi-match Locator factories. Each returns a `LocatorAll` that resolves
|
|
@@ -147,6 +147,7 @@ const isDocument = (value) => value !== null && 'body' in value;
|
|
|
147
147
|
const EVENT_NAMES = {
|
|
148
148
|
click: 'OnClick',
|
|
149
149
|
dblclick: 'OnDoubleClick',
|
|
150
|
+
contextmenu: 'OnContextMenu',
|
|
150
151
|
submit: 'OnSubmit',
|
|
151
152
|
input: 'OnInput',
|
|
152
153
|
change: 'OnChange',
|
|
@@ -261,7 +262,6 @@ export const given = (model) => {
|
|
|
261
262
|
* a Command Definition (matches by name; any pending Command of that name)
|
|
262
263
|
* or a Command instance (matches by name AND args; strict). */
|
|
263
264
|
const resolveCommand = (matcher, resultMessage) => (simulation) => {
|
|
264
|
-
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
265
265
|
const internal = toInternal(simulation);
|
|
266
266
|
assertResolveUnambiguous(internal.commands, matcher);
|
|
267
267
|
const next = resolveByMatcher(internal, matcher, resultMessage);
|
|
@@ -274,8 +274,7 @@ const resolveCommand = (matcher, resultMessage) => (simulation) => {
|
|
|
274
274
|
`Pending Commands:\n${pending}\n\n` +
|
|
275
275
|
'Make sure the previous Message produced this Command.');
|
|
276
276
|
}
|
|
277
|
-
return next;
|
|
278
|
-
/* eslint-enable @typescript-eslint/consistent-type-assertions */
|
|
277
|
+
return { ...internal, ...next };
|
|
279
278
|
};
|
|
280
279
|
/** Resolves listed Commands with their result Messages, cascading through any
|
|
281
280
|
* Commands the result produces. Each entry is consumed by exactly one
|
|
@@ -289,6 +288,15 @@ const resolveCommand = (matcher, resultMessage) => (simulation) => {
|
|
|
289
288
|
const resolveAllCommands = (...resolvers) => (simulation) =>
|
|
290
289
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
291
290
|
resolveAllInternal(toInternal(simulation), resolvers);
|
|
291
|
+
/** Resolves listed Commands with their result Messages, cascading through any
|
|
292
|
+
* Commands the results produce. Every resolver must match one dispatch in
|
|
293
|
+
* this call, and no actual Commands may remain unresolved. Supplied resolvers
|
|
294
|
+
* do not carry forward. */
|
|
295
|
+
const resolveAllExactCommands = (...resolvers) => (simulation) => {
|
|
296
|
+
const internal = toInternal(simulation);
|
|
297
|
+
const next = resolveAllExactInternal(internal, resolvers);
|
|
298
|
+
return { ...internal, ...next };
|
|
299
|
+
};
|
|
292
300
|
/** Asserts that every given matcher matches a pending Command. Definition
|
|
293
301
|
* matchers match by name only; Instance matchers match by name + args. */
|
|
294
302
|
const expectHasCommandsStep = (...matchers) => (simulation) => {
|
|
@@ -492,7 +500,7 @@ const emitCustomElementEvent = (spec, target, eventName, detail) => (simulation)
|
|
|
492
500
|
throw new Error(`I could not find an element matching ${description}.\n\n` +
|
|
493
501
|
'Check that your selector matches an element in the current view.');
|
|
494
502
|
}
|
|
495
|
-
const element = maybeElement
|
|
503
|
+
const { value: element } = maybeElement;
|
|
496
504
|
if (element.data?.on?.[eventName] === undefined) {
|
|
497
505
|
throw new Error(`I found an element matching ${description} but it has no ${eventName} handler.\n\n` +
|
|
498
506
|
`Make sure the element has the On${kebabToPascal(eventName)} attribute from its CustomElement builder.`);
|
|
@@ -521,6 +529,10 @@ export const Command = {
|
|
|
521
529
|
* identical responses. Resolvers carry across calls; a new entry replaces
|
|
522
530
|
* any leftovers sharing its Definition or Instance shape (latest wins). */
|
|
523
531
|
resolveAll: resolveAllCommands,
|
|
532
|
+
/** Resolves listed Commands and throws unless every resolver matches one
|
|
533
|
+
* dispatch and no actual Commands remain unresolved. Entries apply only to
|
|
534
|
+
* this call and never carry forward. */
|
|
535
|
+
resolveAllExact: resolveAllExactCommands,
|
|
524
536
|
/** Asserts that every given Command is among the pending Commands. */
|
|
525
537
|
expectHas: expectHasCommandsStep,
|
|
526
538
|
/** Asserts that the pending Commands match the given definitions exactly (order-independent). */
|
|
@@ -673,7 +685,7 @@ export const click = (target) => (simulation) => {
|
|
|
673
685
|
throw new Error(`I could not find an element matching ${description}.\n\n` +
|
|
674
686
|
'Check that your selector matches an element in the current view.');
|
|
675
687
|
}
|
|
676
|
-
const element = maybeElement
|
|
688
|
+
const { value: element } = maybeElement;
|
|
677
689
|
if (isElementDisabled(element)) {
|
|
678
690
|
throw new Error(`I found an element matching ${description} but it is disabled.\n\n` +
|
|
679
691
|
'Disabled elements do not receive click events in the browser. ' +
|
|
@@ -716,7 +728,7 @@ export const doubleClick = (target) => (simulation) => {
|
|
|
716
728
|
throw new Error(`I could not find an element matching ${description}.\n\n` +
|
|
717
729
|
'Check that your selector matches an element in the current view.');
|
|
718
730
|
}
|
|
719
|
-
const element = maybeElement
|
|
731
|
+
const { value: element } = maybeElement;
|
|
720
732
|
const hasHandler = element.data?.on?.['dblclick'] !== undefined;
|
|
721
733
|
if (hasHandler) {
|
|
722
734
|
return captureFromElement(simulation, element, description, 'dblclick', handler => {
|
|
@@ -733,6 +745,32 @@ export const doubleClick = (target) => (simulation) => {
|
|
|
733
745
|
throw new Error(`I found an element matching ${description} but neither it nor any ancestor has a dblclick handler.\n\n` +
|
|
734
746
|
`Make sure the element or a parent has an ${attributeName} attribute.`);
|
|
735
747
|
};
|
|
748
|
+
/** Simulates a contextmenu event on the element matching the target.
|
|
749
|
+
* When the element has no contextmenu handler, the event bubbles up to the
|
|
750
|
+
* nearest ancestor with one, mirroring browser event propagation. */
|
|
751
|
+
export const contextMenu = (target) => (simulation) => {
|
|
752
|
+
const internal = toInternal(simulation);
|
|
753
|
+
const scopedTarget = applyScopeToTarget(internal.scope, target);
|
|
754
|
+
const { maybeElement, description } = resolveTarget(internal.html, scopedTarget);
|
|
755
|
+
if (Option.isNone(maybeElement)) {
|
|
756
|
+
throw new Error(`I could not find an element matching ${description}.\n\n` +
|
|
757
|
+
'Check that your selector matches an element in the current view.');
|
|
758
|
+
}
|
|
759
|
+
const { value: element } = maybeElement;
|
|
760
|
+
const invokeHandler = (handler) => {
|
|
761
|
+
handler({ preventDefault: Function.constVoid });
|
|
762
|
+
};
|
|
763
|
+
if (element.data?.on?.['contextmenu'] !== undefined) {
|
|
764
|
+
return captureFromElement(simulation, element, description, 'contextmenu', invokeHandler);
|
|
765
|
+
}
|
|
766
|
+
const maybeAncestor = findAncestorWithHandler(internal.html, element, 'contextmenu');
|
|
767
|
+
if (Option.isSome(maybeAncestor)) {
|
|
768
|
+
return captureFromElement(simulation, maybeAncestor.value, `ancestor of ${description}`, 'contextmenu', invokeHandler);
|
|
769
|
+
}
|
|
770
|
+
const attributeName = EVENT_NAMES['contextmenu'] ?? 'contextmenu';
|
|
771
|
+
throw new Error(`I found an element matching ${description} but neither it nor any ancestor has a contextmenu handler.\n\n` +
|
|
772
|
+
`Make sure the element or a parent has an ${attributeName} attribute.`);
|
|
773
|
+
};
|
|
736
774
|
const DEFAULT_POINTER_DOWN_OPTIONS = {
|
|
737
775
|
pointerType: 'mouse',
|
|
738
776
|
button: 0,
|
|
@@ -753,7 +791,7 @@ export const pointerDown = (target, options) => (simulation) => {
|
|
|
753
791
|
throw new Error(`I could not find an element matching ${description}.\n\n` +
|
|
754
792
|
'Check that your selector matches an element in the current view.');
|
|
755
793
|
}
|
|
756
|
-
const element = maybeElement
|
|
794
|
+
const { value: element } = maybeElement;
|
|
757
795
|
const { pointerType, button, screenX, screenY, clientX, clientY } = {
|
|
758
796
|
...DEFAULT_POINTER_DOWN_OPTIONS,
|
|
759
797
|
...options,
|
|
@@ -796,7 +834,7 @@ export const pointerUp = (target, options) => (simulation) => {
|
|
|
796
834
|
throw new Error(`I could not find an element matching ${description}.\n\n` +
|
|
797
835
|
'Check that your selector matches an element in the current view.');
|
|
798
836
|
}
|
|
799
|
-
const element = maybeElement
|
|
837
|
+
const { value: element } = maybeElement;
|
|
800
838
|
const { pointerType, screenX, screenY } = {
|
|
801
839
|
...DEFAULT_POINTER_UP_OPTIONS,
|
|
802
840
|
...options,
|
|
@@ -889,10 +927,8 @@ const wrapAssertion = (locator, assertion, isNot) => (simulation) => {
|
|
|
889
927
|
};
|
|
890
928
|
const assertOnElement = (check, expectation) => (maybeElement, description, isNot, root) => {
|
|
891
929
|
if (Option.isNone(maybeElement)) {
|
|
892
|
-
|
|
893
|
-
|
|
894
|
-
}
|
|
895
|
-
return;
|
|
930
|
+
const negation = isNot ? 'not ' : '';
|
|
931
|
+
throw new Error(`Expected element matching ${description} ${negation}to ${expectation} but the element does not exist.`);
|
|
896
932
|
}
|
|
897
933
|
const { pass, actual } = check(maybeElement.value, root);
|
|
898
934
|
if (isNot ? pass : !pass) {
|
|
@@ -1019,21 +1055,6 @@ const assertIsChecked = assertOnElement(vnode => {
|
|
|
1019
1055
|
(Option.isSome(ariaChecked) && ariaChecked.value === 'true');
|
|
1020
1056
|
return { pass, actual: 'it is not checked' };
|
|
1021
1057
|
}, 'be checked');
|
|
1022
|
-
const isHidden = (vnode) => {
|
|
1023
|
-
const hiddenAttr = attr(vnode, 'hidden');
|
|
1024
|
-
if (Option.isSome(hiddenAttr) && hiddenAttr.value !== 'false')
|
|
1025
|
-
return true;
|
|
1026
|
-
const ariaHidden = attr(vnode, 'aria-hidden');
|
|
1027
|
-
if (Option.isSome(ariaHidden) && ariaHidden.value === 'true')
|
|
1028
|
-
return true;
|
|
1029
|
-
const display = vnode.data?.style?.['display'];
|
|
1030
|
-
if (display === 'none')
|
|
1031
|
-
return true;
|
|
1032
|
-
const visibility = vnode.data?.style?.['visibility'];
|
|
1033
|
-
if (visibility === 'hidden')
|
|
1034
|
-
return true;
|
|
1035
|
-
return false;
|
|
1036
|
-
};
|
|
1037
1058
|
const assertIsVisible = assertOnElement(vnode => ({ pass: !isHidden(vnode), actual: 'it is hidden' }), 'be visible');
|
|
1038
1059
|
const assertHasAccessibleName = (expected) => assertOnElement((vnode, root) => {
|
|
1039
1060
|
const actual = accessibleName(root)(vnode);
|
package/dist/test/story.d.ts
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import type {
|
|
3
|
-
import type * as Interruptible from '../command/interruptible/index.js';
|
|
4
|
-
import type { AnyCommand, CommandMatcher, Resolver } from './internal.js';
|
|
1
|
+
import { Option } from 'effect';
|
|
2
|
+
import type { AnyCommand, AnyCommandInstance, CommandMatcher, ResolvableCommandDefinition, ResolvableCommandMatcher, Resolver } from './internal.js';
|
|
5
3
|
export type { AnyCommand, CommandMatcher, Resolver };
|
|
6
|
-
/** A typed Command instance carrying the result Message type via its
|
|
7
|
-
* `effect` field, so passing `FetchWeather({ zipCode })` to `Story.Command.resolve`
|
|
8
|
-
* preserves the link between the Command and its declared result Message. */
|
|
9
|
-
type AnyCommandInstance<ResultMessage = unknown> = Readonly<{
|
|
10
|
-
name: string;
|
|
11
|
-
args?: Record<string, unknown>;
|
|
12
|
-
effect: Effect.Effect<ResultMessage, any, any>;
|
|
13
|
-
}>;
|
|
14
|
-
/** A Command Definition accepted by `Story.Command.resolve` as a name matcher:
|
|
15
|
-
* a plain `Command.define` Definition or an interruptible
|
|
16
|
-
* interruptible `Command.define` Definition. Both carry the
|
|
17
|
-
* `CommandDefinitionTypeId` brand and match by name at runtime, so `resolve`
|
|
18
|
-
* accepts either, the way `expectHas`/`expectExact` already do. */
|
|
19
|
-
type ResolvableCommandDefinition<Name extends string, ResultMessage> = CommandDefinition<Name, ResultMessage> | Interruptible.DefinitionNoArgs<Name, Effect.Effect<ResultMessage, any, any>> | Interruptible.DefinitionWithArgs<Name, any, any, Effect.Effect<ResultMessage, any, any>> | Interruptible.DefinitionWithArgsNameKeyed<Name, any, Effect.Effect<ResultMessage, any, any>>;
|
|
20
4
|
/** An immutable test simulation of a Foldkit program. */
|
|
21
5
|
export type StorySimulation<Model, Message, OutMessage = undefined> = Readonly<{
|
|
22
6
|
/** @internal Carries the Message type through the step chain. */
|
|
@@ -57,7 +41,11 @@ export declare const Command: {
|
|
|
57
41
|
* dispatch in declaration order; compose with `Array.makeBy` for N
|
|
58
42
|
* identical responses. Resolvers carry across calls; a new entry replaces
|
|
59
43
|
* any leftovers sharing its Definition or Instance shape (latest wins). */
|
|
60
|
-
readonly resolveAll: <
|
|
44
|
+
readonly resolveAll: <Matchers extends ReadonlyArray<ResolvableCommandMatcher>>(...resolvers: { [K in keyof Matchers]: Resolver<Matchers[K]>; }) => <Model, Message, OutMessage = undefined>(simulation: StorySimulation<Model, Message, OutMessage>) => StorySimulation<Model, Message, OutMessage>;
|
|
45
|
+
/** Resolves listed Commands and throws unless every resolver matches one
|
|
46
|
+
* dispatch and no actual Commands remain unresolved. Entries apply only to
|
|
47
|
+
* this call and never carry forward. */
|
|
48
|
+
readonly resolveAllExact: <Matchers extends ReadonlyArray<ResolvableCommandMatcher>>(...resolvers: { [K in keyof Matchers]: Resolver<Matchers[K]>; }) => <Model, Message, OutMessage = undefined>(simulation: StorySimulation<Model, Message, OutMessage>) => StorySimulation<Model, Message, OutMessage>;
|
|
61
49
|
/** Asserts that every given Command is among the pending Commands. */
|
|
62
50
|
readonly expectHas: (...matchers: ReadonlyArray<CommandMatcher>) => <Model, Message, OutMessage = undefined>(simulation: StorySimulation<Model, Message, OutMessage>) => StorySimulation<Model, Message, OutMessage>;
|
|
63
51
|
/** Asserts that the pending Commands match the given definitions exactly (order-independent). */
|
package/dist/test/story.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../../src/test/story.ts"],"names":[],"mappings":"AAAA,OAAO,
|
|
1
|
+
{"version":3,"file":"story.d.ts","sourceRoot":"","sources":["../../src/test/story.ts"],"names":[],"mappings":"AAAA,OAAO,EAAgB,MAAM,EAAmB,MAAM,QAAQ,CAAA;AAE9D,OAAO,KAAK,EACV,UAAU,EACV,kBAAkB,EAClB,cAAc,EACd,2BAA2B,EAC3B,wBAAwB,EACxB,QAAQ,EAET,MAAM,eAAe,CAAA;AAetB,YAAY,EAAE,UAAU,EAAE,cAAc,EAAE,QAAQ,EAAE,CAAA;AAEpD,yDAAyD;AACzD,MAAM,MAAM,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,GAAG,SAAS,IAAI,QAAQ,CAAC;IAC7E,iEAAiE;IACjE,eAAe,CAAC,EAAE,OAAO,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,UAAU,CAAC,CAAC,KACrE,eAAe,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,CAAC,MAAM,CAAC,UAAU,CAAC,CAc3D,CAAA;AAIH,uEAAuE;AACvE,eAAO,MAAM,KAAK,EAAE;IAClB,CAAC,KAAK,EAAE,OAAO,EAAE,UAAU,EACzB,QAAQ,EAAE,CACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,KACb,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,EAAE,UAAU,CAAC,EAC5D,GAAG,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GACjD,IAAI,CAAA;IACP,CAAC,KAAK,EAAE,OAAO,EACb,QAAQ,EAAE,CACR,KAAK,EAAE,KAAK,EACZ,OAAO,EAAE,OAAO,KACb,SAAS,CAAC,KAAK,EAAE,aAAa,CAAC,UAAU,CAAC,CAAC,EAChD,GAAG,KAAK,EAAE,aAAa,CAAC,SAAS,CAAC,OAAO,CAAC,KAAK,CAAC,CAAC,CAAC,GACjD,IAAI,CAAA;CAoCR,CAAA"}
|
package/dist/test/story.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Array, Equal, Option, Predicate, pipe } from 'effect';
|
|
2
|
-
import { assertAllCommandsResolved, assertExactCommands, assertHasCommands, assertNoUnresolvedCommands, assertResolveUnambiguous, assertZeroCommands, formatCommand, formatMatcher, resolveAllInternal, resolveByMatcher, } from './internal.js';
|
|
2
|
+
import { assertAllCommandsResolved, assertExactCommands, assertHasCommands, assertNoUnresolvedCommands, assertResolveUnambiguous, assertZeroCommands, formatCommand, formatMatcher, resolveAllExactInternal, resolveAllInternal, resolveByMatcher, } from './internal.js';
|
|
3
3
|
const toInternal = (simulation) =>
|
|
4
4
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
5
5
|
simulation;
|
|
@@ -41,7 +41,6 @@ export const message = (message_) => (simulation) => {
|
|
|
41
41
|
* a Command Definition (matches by name; any pending Command of that name)
|
|
42
42
|
* or a Command instance (matches by name AND args; strict). */
|
|
43
43
|
const resolveCommand = (matcher, resultMessage) => (simulation) => {
|
|
44
|
-
/* eslint-disable @typescript-eslint/consistent-type-assertions */
|
|
45
44
|
const internal = toInternal(simulation);
|
|
46
45
|
assertResolveUnambiguous(internal.commands, matcher);
|
|
47
46
|
const next = resolveByMatcher(internal, matcher, resultMessage);
|
|
@@ -55,7 +54,6 @@ const resolveCommand = (matcher, resultMessage) => (simulation) => {
|
|
|
55
54
|
'Make sure the previous Message produced this Command.');
|
|
56
55
|
}
|
|
57
56
|
return next;
|
|
58
|
-
/* eslint-enable @typescript-eslint/consistent-type-assertions */
|
|
59
57
|
};
|
|
60
58
|
/** Resolves listed Commands with their result Messages, cascading through any
|
|
61
59
|
* Commands the result produces. Each entry is consumed by exactly one
|
|
@@ -69,6 +67,11 @@ const resolveCommand = (matcher, resultMessage) => (simulation) => {
|
|
|
69
67
|
const resolveAllCommands = (...resolvers) => (simulation) =>
|
|
70
68
|
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
|
|
71
69
|
resolveAllInternal(toInternal(simulation), resolvers);
|
|
70
|
+
/** Resolves listed Commands with their result Messages, cascading through any
|
|
71
|
+
* Commands the results produce. Every resolver must match one dispatch in
|
|
72
|
+
* this call, and no actual Commands may remain unresolved. Supplied resolvers
|
|
73
|
+
* do not carry forward. */
|
|
74
|
+
const resolveAllExactCommands = (...resolvers) => (simulation) => resolveAllExactInternal(toInternal(simulation), resolvers);
|
|
72
75
|
/** Runs an assertion function against the current Model. */
|
|
73
76
|
export const model = (f) => ({
|
|
74
77
|
_tag: 'ModelStep',
|
|
@@ -104,6 +107,10 @@ export const Command = {
|
|
|
104
107
|
* identical responses. Resolvers carry across calls; a new entry replaces
|
|
105
108
|
* any leftovers sharing its Definition or Instance shape (latest wins). */
|
|
106
109
|
resolveAll: resolveAllCommands,
|
|
110
|
+
/** Resolves listed Commands and throws unless every resolver matches one
|
|
111
|
+
* dispatch and no actual Commands remain unresolved. Entries apply only to
|
|
112
|
+
* this call and never carry forward. */
|
|
113
|
+
resolveAllExact: resolveAllExactCommands,
|
|
107
114
|
/** Asserts that every given Command is among the pending Commands. */
|
|
108
115
|
expectHas: expectHasCommandsStep,
|
|
109
116
|
/** Asserts that the pending Commands match the given definitions exactly (order-independent). */
|