@ripplo/testing 0.7.12 → 0.7.14
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/DSL.md +15 -13
- package/dist/{engine-CeG-3Q7o.d.ts → engine-D-X3F_hc.d.ts} +4 -3
- package/dist/express.d.ts +1 -1
- package/dist/express.js +2 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +81 -58
- package/package.json +3 -3
package/DSL.md
CHANGED
|
@@ -163,19 +163,20 @@ The compiler enumerates one concrete test per `when` branch at `ripplo compile`/
|
|
|
163
163
|
|
|
164
164
|
Each returns a step; chain `.expect(...assertions)` to assert after it runs.
|
|
165
165
|
|
|
166
|
-
| action | signature
|
|
167
|
-
| ---------- |
|
|
168
|
-
| `goto` | `` goto`/path/${handle.id}` ``
|
|
169
|
-
| `click` | `click(locator)`
|
|
170
|
-
| `dblclick` | `dblclick(locator)`
|
|
171
|
-
| `fill` | `fill(locator, value)`
|
|
172
|
-
| `clear` | `clear(locator)`
|
|
173
|
-
| `select` | `select(locator, value)`
|
|
174
|
-
|
|
|
175
|
-
| `
|
|
176
|
-
| `
|
|
177
|
-
| `
|
|
178
|
-
| `
|
|
166
|
+
| action | signature | example |
|
|
167
|
+
| ---------- | ----------------------------------------------------------------------------------------------------- | ----------------------------------------------- |
|
|
168
|
+
| `goto` | `` goto`/path/${handle.id}` `` | `` goto`/projects/${p.id}` `` |
|
|
169
|
+
| `click` | `click(locator)` | `click(button("Save"))` |
|
|
170
|
+
| `dblclick` | `dblclick(locator)` | `dblclick(testId\`row-${r.id}\`)` |
|
|
171
|
+
| `fill` | `fill(locator, value)` | `fill(textbox("Name"), "Acme")` |
|
|
172
|
+
| `clear` | `clear(locator)` | `clear(textbox("Name"))` |
|
|
173
|
+
| `select` | `select(locator, value)` | `select(combobox("Plan"), "pro")` |
|
|
174
|
+
| — | drives native `<select>` and ARIA comboboxes (react-select, etc.); `value` is the visible option text | `select(combobox("Timezone"), "Europe/London")` |
|
|
175
|
+
| `check` | `check(locator)` | `check(checkbox("Agree"))` |
|
|
176
|
+
| `uncheck` | `uncheck(locator)` | `uncheck(checkbox("Agree"))` |
|
|
177
|
+
| `hover` | `hover(locator)` | `hover(button("More"))` |
|
|
178
|
+
| `upload` | `upload(locator, files)` | `upload(testId\`avatar\`, ["face.png"])` |
|
|
179
|
+
| `press` | `press(key, locator?)` | `press("Enter", textbox("Search"))` |
|
|
179
180
|
|
|
180
181
|
`fill`/`select`/`value`/`text` accept a literal string or a `Binding<string>` (e.g. `arbitrary(...)` or a handle field). `goto`/`testId` are template literals — interpolate handle ids directly.
|
|
181
182
|
|
|
@@ -230,6 +231,7 @@ Used inside a step's `.expect(...)`.
|
|
|
230
231
|
| `disabled` | `disabled(locator)` | element is disabled |
|
|
231
232
|
| `enabled` | `enabled(locator)` | element is enabled |
|
|
232
233
|
| `focused` | `focused(locator)` | element has focus |
|
|
234
|
+
| `checked` | `checked(locator)` | checkbox, radio, or switch is checked |
|
|
233
235
|
| `value` | `value(locator, string\|binding)` | input's value equals |
|
|
234
236
|
| `text` | `text(locator, string\|binding)` | element's text equals |
|
|
235
237
|
| `not` | `not(assertion)` | negation — `not(visible(role("dialog")))` |
|
|
@@ -1009,6 +1009,7 @@ declare function visible(locator: Locator): LeafPredicate;
|
|
|
1009
1009
|
declare function disabled(locator: Locator): LeafPredicate;
|
|
1010
1010
|
declare function enabled(locator: Locator): LeafPredicate;
|
|
1011
1011
|
declare function focused(locator: Locator): LeafPredicate;
|
|
1012
|
+
declare function checked(locator: Locator): LeafPredicate;
|
|
1012
1013
|
declare function value(locator: Locator, binding: Binding<string> | string): LeafPredicate;
|
|
1013
1014
|
declare function text(locator: Locator, binding: Binding<string> | string): LeafPredicate;
|
|
1014
1015
|
declare function not(input: ConditionInput): ConditionPredicate;
|
|
@@ -1026,11 +1027,11 @@ interface BranchInput {
|
|
|
1026
1027
|
readonly branch: WhenBranch;
|
|
1027
1028
|
}
|
|
1028
1029
|
interface NamedBranch {
|
|
1029
|
-
readonly expect: (
|
|
1030
|
+
readonly expect: (...consequences: ReadonlyArray<PredicateInput>) => BranchInput;
|
|
1030
1031
|
readonly if: (condition: ConditionInput) => ConditionedBranch;
|
|
1031
1032
|
}
|
|
1032
1033
|
interface ConditionedBranch {
|
|
1033
|
-
readonly expect: (
|
|
1034
|
+
readonly expect: (...consequences: ReadonlyArray<PredicateInput>) => BranchInput;
|
|
1034
1035
|
}
|
|
1035
1036
|
declare function branch(name: string): NamedBranch;
|
|
1036
1037
|
declare function when(...branches: ReadonlyArray<BranchInput>): LeafPredicate;
|
|
@@ -1288,4 +1289,4 @@ interface Engine {
|
|
|
1288
1289
|
}
|
|
1289
1290
|
declare function createEngine<R extends DeclSource>(ripplo: R, impls: EngineImpls<R, "backend">, teardown: Teardown): Engine;
|
|
1290
1291
|
|
|
1291
|
-
export {
|
|
1292
|
+
export { entity as $, type AnyBinding as A, type Binding as B, type Capture as C, type DeclSource as D, type Engine as E, type FieldHandle as F, type GivenItem as G, type Handle as H, type SingletonConfig as I, type SingletonImpl as J, type SingletonValue as K, type Locator as L, type WithinMatcher as M, type NamedBranch as N, and as O, type PredicateInput as P, branch as Q, type Row as R, type Step as S, changed as T, type UniqueNames as U, checked as V, type Workflow as W, count as X, createEngine as Y, disabled as Z, enabled as _, type EntityList as a, field as a0, focused as a1, id as a2, key as a3, not as a4, singleton as a5, text as a6, v as a7, value as a8, visible as a9, when as aa, within as ab, type SingletonList as b, type Lockfile as c, type BrowserSingleton as d, type LeafPredicate as e, type Primitive as f, type Primitive$1 as g, type SingletonDef as h, type AbsenceHandle as i, type BranchInput as j, CLIENT_MOUNT_KEY as k, CLIENT_SEED_KEY as l, type ConditionInput as m, type ConditionPredicate as n, type ConditionedBranch as o, type CountCondition as p, type DuplicateEntityName as q, type EngineError as r, type EngineImpls as s, type EngineRead as t, type EntityDef as u, type EntityHandle as v, type EntityImpl as w, type FieldOptions as x, type Fields as y, type Selection as z };
|
package/dist/express.d.ts
CHANGED
package/dist/express.js
CHANGED
|
@@ -145,7 +145,7 @@ var conditionSchema = z2.lazy(
|
|
|
145
145
|
var whenBranchSchema = z2.lazy(
|
|
146
146
|
() => z2.object({
|
|
147
147
|
condition: z2.union([conditionSchema, z2.undefined()]).optional().transform((value) => value),
|
|
148
|
-
consequence: predicateSchema,
|
|
148
|
+
consequence: z2.array(predicateSchema),
|
|
149
149
|
name: z2.string().min(1)
|
|
150
150
|
})
|
|
151
151
|
);
|
|
@@ -155,6 +155,7 @@ var predicateSchema = z2.lazy(
|
|
|
155
155
|
z2.object({ kind: z2.literal("disabled"), locator: locatorSchema, wait }),
|
|
156
156
|
z2.object({ kind: z2.literal("enabled"), locator: locatorSchema, wait }),
|
|
157
157
|
z2.object({ kind: z2.literal("focused"), locator: locatorSchema, wait }),
|
|
158
|
+
z2.object({ kind: z2.literal("checked"), locator: locatorSchema, wait }),
|
|
158
159
|
z2.object({ kind: z2.literal("value"), locator: locatorSchema, value: stringValueSchema, wait }),
|
|
159
160
|
z2.object({ kind: z2.literal("text"), locator: locatorSchema, value: stringValueSchema, wait }),
|
|
160
161
|
singletonPredicateSchema,
|
package/dist/index.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { C as Capture, S as Step, P as PredicateInput, L as Locator, B as Binding, A as AnyBinding, G as GivenItem, W as Workflow, a as EntityList, b as SingletonList, c as Lockfile, U as UniqueNames, d as BrowserSingleton, e as LeafPredicate, f as Primitive, F as FieldHandle, D as DeclSource, R as Row, g as Primitive$1, h as SingletonDef } from './engine-
|
|
2
|
-
export { i as AbsenceHandle, j as BranchInput, k as CLIENT_MOUNT_KEY, l as CLIENT_SEED_KEY, m as ConditionInput, n as ConditionPredicate, o as ConditionedBranch, p as CountCondition, q as DuplicateEntityName, E as Engine, r as EngineError, s as EngineImpls, t as EngineRead, u as EntityDef, v as EntityHandle, w as EntityImpl, x as FieldOptions, y as Fields, H as Handle, N as NamedBranch, z as Selection, I as SingletonConfig, J as SingletonImpl, K as SingletonValue, M as WithinMatcher, O as and, Q as branch, T as changed, V as
|
|
1
|
+
import { C as Capture, S as Step, P as PredicateInput, L as Locator, B as Binding, A as AnyBinding, G as GivenItem, W as Workflow, a as EntityList, b as SingletonList, c as Lockfile, U as UniqueNames, d as BrowserSingleton, e as LeafPredicate, f as Primitive, F as FieldHandle, D as DeclSource, R as Row, g as Primitive$1, h as SingletonDef } from './engine-D-X3F_hc.js';
|
|
2
|
+
export { i as AbsenceHandle, j as BranchInput, k as CLIENT_MOUNT_KEY, l as CLIENT_SEED_KEY, m as ConditionInput, n as ConditionPredicate, o as ConditionedBranch, p as CountCondition, q as DuplicateEntityName, E as Engine, r as EngineError, s as EngineImpls, t as EngineRead, u as EntityDef, v as EntityHandle, w as EntityImpl, x as FieldOptions, y as Fields, H as Handle, N as NamedBranch, z as Selection, I as SingletonConfig, J as SingletonImpl, K as SingletonValue, M as WithinMatcher, O as and, Q as branch, T as changed, V as checked, X as count, Y as createEngine, Z as disabled, _ as enabled, $ as entity, a0 as field, a1 as focused, a2 as id, a3 as key, a4 as not, a5 as singleton, a6 as text, a7 as v, a8 as value, a9 as visible, aa as when, ab as within } from './engine-D-X3F_hc.js';
|
|
3
3
|
import 'neverthrow';
|
|
4
4
|
import 'zod';
|
|
5
5
|
|
package/dist/index.js
CHANGED
|
@@ -98,6 +98,9 @@ function enabled(locator) {
|
|
|
98
98
|
function focused(locator) {
|
|
99
99
|
return leaf({ kind: "focused", locator, wait: void 0 });
|
|
100
100
|
}
|
|
101
|
+
function checked(locator) {
|
|
102
|
+
return leaf({ kind: "checked", locator, wait: void 0 });
|
|
103
|
+
}
|
|
101
104
|
function value(locator, binding) {
|
|
102
105
|
return leaf({ kind: "value", locator, value: binding, wait: void 0 });
|
|
103
106
|
}
|
|
@@ -125,9 +128,9 @@ function count(entity2) {
|
|
|
125
128
|
};
|
|
126
129
|
}
|
|
127
130
|
function branch(name) {
|
|
128
|
-
const close = (condition) => (
|
|
129
|
-
const resolved = toPredicate(consequence);
|
|
130
|
-
if (containsWhen(
|
|
131
|
+
const close = (condition) => (...consequences) => {
|
|
132
|
+
const resolved = consequences.map((consequence) => toPredicate(consequence));
|
|
133
|
+
if (resolved.some((predicate) => containsWhen(predicate))) {
|
|
131
134
|
throw new Error(
|
|
132
135
|
`branch "${name}" nests a when() inside its consequence \u2014 whens are one level deep; split the scenario into another workflow`
|
|
133
136
|
);
|
|
@@ -730,7 +733,9 @@ function assertPredicateScoped(predicate, given) {
|
|
|
730
733
|
);
|
|
731
734
|
}
|
|
732
735
|
});
|
|
733
|
-
|
|
736
|
+
row2.consequence.forEach((consequence) => {
|
|
737
|
+
assertPredicateScoped(consequence, given);
|
|
738
|
+
});
|
|
734
739
|
});
|
|
735
740
|
}
|
|
736
741
|
function conditionSingletons(predicate) {
|
|
@@ -825,7 +830,8 @@ function predicateBindings(predicate) {
|
|
|
825
830
|
case "visible":
|
|
826
831
|
case "disabled":
|
|
827
832
|
case "enabled":
|
|
828
|
-
case "focused":
|
|
833
|
+
case "focused":
|
|
834
|
+
case "checked": {
|
|
829
835
|
return locatorBindings(predicate.locator);
|
|
830
836
|
}
|
|
831
837
|
case "value":
|
|
@@ -852,7 +858,7 @@ function predicateBindings(predicate) {
|
|
|
852
858
|
case "when": {
|
|
853
859
|
return predicate.branches.flatMap((row2) => [
|
|
854
860
|
...row2.condition == null ? [] : predicateBindings(row2.condition),
|
|
855
|
-
...
|
|
861
|
+
...row2.consequence.flatMap((consequence) => predicateBindings(consequence))
|
|
856
862
|
]);
|
|
857
863
|
}
|
|
858
864
|
case "and": {
|
|
@@ -972,7 +978,8 @@ function resolvePredicate(predicate, ctx) {
|
|
|
972
978
|
case "visible":
|
|
973
979
|
case "disabled":
|
|
974
980
|
case "enabled":
|
|
975
|
-
case "focused":
|
|
981
|
+
case "focused":
|
|
982
|
+
case "checked": {
|
|
976
983
|
return { ...predicate, locator: resolveLocator(predicate.locator, ctx) };
|
|
977
984
|
}
|
|
978
985
|
case "value":
|
|
@@ -1007,7 +1014,7 @@ function resolvePredicate(predicate, ctx) {
|
|
|
1007
1014
|
...predicate,
|
|
1008
1015
|
branches: predicate.branches.map((row2) => ({
|
|
1009
1016
|
condition: row2.condition == null ? void 0 : resolveCondition(row2.condition, ctx),
|
|
1010
|
-
consequence:
|
|
1017
|
+
consequence: row2.consequence.map((consequence) => resolvePredicate(consequence, ctx)),
|
|
1011
1018
|
name: row2.name
|
|
1012
1019
|
}))
|
|
1013
1020
|
};
|
|
@@ -1453,7 +1460,7 @@ var conditionSchema = z2.lazy(
|
|
|
1453
1460
|
var whenBranchSchema = z2.lazy(
|
|
1454
1461
|
() => z2.object({
|
|
1455
1462
|
condition: z2.union([conditionSchema, z2.undefined()]).optional().transform((value2) => value2),
|
|
1456
|
-
consequence: predicateSchema,
|
|
1463
|
+
consequence: z2.array(predicateSchema),
|
|
1457
1464
|
name: z2.string().min(1)
|
|
1458
1465
|
})
|
|
1459
1466
|
);
|
|
@@ -1463,6 +1470,7 @@ var predicateSchema = z2.lazy(
|
|
|
1463
1470
|
z2.object({ kind: z2.literal("disabled"), locator: locatorSchema, wait }),
|
|
1464
1471
|
z2.object({ kind: z2.literal("enabled"), locator: locatorSchema, wait }),
|
|
1465
1472
|
z2.object({ kind: z2.literal("focused"), locator: locatorSchema, wait }),
|
|
1473
|
+
z2.object({ kind: z2.literal("checked"), locator: locatorSchema, wait }),
|
|
1466
1474
|
z2.object({ kind: z2.literal("value"), locator: locatorSchema, value: stringValueSchema, wait }),
|
|
1467
1475
|
z2.object({ kind: z2.literal("text"), locator: locatorSchema, value: stringValueSchema, wait }),
|
|
1468
1476
|
singletonPredicateSchema,
|
|
@@ -1719,6 +1727,54 @@ function mountClientEngine(ripplo, impls, { enabled: enabled2 }) {
|
|
|
1719
1727
|
Reflect.set(globalThis, CLIENT_MOUNT_KEY, createClientEngine(ripplo, impls));
|
|
1720
1728
|
}
|
|
1721
1729
|
|
|
1730
|
+
// src/expand-refs.ts
|
|
1731
|
+
function usedRefHeads({
|
|
1732
|
+
singletons,
|
|
1733
|
+
steps,
|
|
1734
|
+
workflow: workflow2,
|
|
1735
|
+
world
|
|
1736
|
+
}) {
|
|
1737
|
+
const values = [
|
|
1738
|
+
...world.flatMap((setup) => Object.values(setup.set)),
|
|
1739
|
+
...workflow2.absent.flatMap((absence) => Object.values(absence.where)),
|
|
1740
|
+
...Object.values(singletons),
|
|
1741
|
+
...steps.flatMap((step) => stepRefValues(step))
|
|
1742
|
+
];
|
|
1743
|
+
return new Set(values.flatMap((value2) => refStrings(value2)).map((ref) => headOf(ref)));
|
|
1744
|
+
}
|
|
1745
|
+
function collectRefObjects(node) {
|
|
1746
|
+
if (Array.isArray(node)) {
|
|
1747
|
+
return node.flatMap((item) => collectRefObjects(item));
|
|
1748
|
+
}
|
|
1749
|
+
if (node == null || typeof node !== "object") {
|
|
1750
|
+
return [];
|
|
1751
|
+
}
|
|
1752
|
+
if ("ref" in node && typeof node.ref === "string" && Object.keys(node).length === 1) {
|
|
1753
|
+
return [node.ref];
|
|
1754
|
+
}
|
|
1755
|
+
return Object.values(node).flatMap((value2) => collectRefObjects(value2));
|
|
1756
|
+
}
|
|
1757
|
+
function isRefValue(value2) {
|
|
1758
|
+
return value2 != null && typeof value2 === "object" && "ref" in value2 ? value2.ref : void 0;
|
|
1759
|
+
}
|
|
1760
|
+
function headOf(ref) {
|
|
1761
|
+
const dot = ref.indexOf(".");
|
|
1762
|
+
return dot === -1 ? ref : ref.slice(0, dot);
|
|
1763
|
+
}
|
|
1764
|
+
function stepRefValues(step) {
|
|
1765
|
+
return collectRefObjects(step).map((ref) => ({ ref }));
|
|
1766
|
+
}
|
|
1767
|
+
function refStrings(value2) {
|
|
1768
|
+
const ref = isRefValue(value2);
|
|
1769
|
+
if (ref != null) {
|
|
1770
|
+
return [ref];
|
|
1771
|
+
}
|
|
1772
|
+
if (value2 != null && typeof value2 === "object" && "template" in value2) {
|
|
1773
|
+
return value2.template.flatMap((segment) => typeof segment === "string" ? [] : [segment.ref]);
|
|
1774
|
+
}
|
|
1775
|
+
return [];
|
|
1776
|
+
}
|
|
1777
|
+
|
|
1722
1778
|
// src/expand.ts
|
|
1723
1779
|
var MAX_CANDIDATES = 4096;
|
|
1724
1780
|
function singletonValuesOf(singletons) {
|
|
@@ -1834,7 +1890,7 @@ function targetsIn(predicate) {
|
|
|
1834
1890
|
}
|
|
1835
1891
|
return predicate.branches.flatMap((row2, index) => [
|
|
1836
1892
|
{ index, name: row2.name, when: predicate },
|
|
1837
|
-
...
|
|
1893
|
+
...row2.consequence.flatMap((consequence) => targetsIn(consequence))
|
|
1838
1894
|
]);
|
|
1839
1895
|
}
|
|
1840
1896
|
function proposeCandidates(workflow2, options) {
|
|
@@ -1891,7 +1947,7 @@ function conditionLiteralsIn(predicate) {
|
|
|
1891
1947
|
}
|
|
1892
1948
|
return predicate.branches.flatMap((row2) => [
|
|
1893
1949
|
...row2.condition == null ? [] : singletonLiteralsInCondition(row2.condition),
|
|
1894
|
-
...
|
|
1950
|
+
...row2.consequence.flatMap((consequence) => conditionLiteralsIn(consequence))
|
|
1895
1951
|
]);
|
|
1896
1952
|
}
|
|
1897
1953
|
function singletonLiteralsInCondition(condition) {
|
|
@@ -1991,11 +2047,18 @@ function foldWhen(acc, when2, state) {
|
|
|
1991
2047
|
return acc;
|
|
1992
2048
|
}
|
|
1993
2049
|
const choices = new Map([...acc.choices, [when2, picked]]);
|
|
1994
|
-
|
|
1995
|
-
|
|
1996
|
-
|
|
1997
|
-
|
|
1998
|
-
|
|
2050
|
+
return row2.consequence.reduce(
|
|
2051
|
+
(folded, consequence) => {
|
|
2052
|
+
if (folded == null) {
|
|
2053
|
+
return null;
|
|
2054
|
+
}
|
|
2055
|
+
if (consequence.kind === "when") {
|
|
2056
|
+
return foldWhen(folded, consequence, state);
|
|
2057
|
+
}
|
|
2058
|
+
return { choices: folded.choices, sets: { ...folded.sets, ...singletonSets([consequence]) } };
|
|
2059
|
+
},
|
|
2060
|
+
{ choices, sets: acc.sets }
|
|
2061
|
+
);
|
|
1999
2062
|
}
|
|
2000
2063
|
function pickBranch(when2, state) {
|
|
2001
2064
|
return when2.branches.reduce((picked, row2, index) => {
|
|
@@ -2042,9 +2105,6 @@ function compareValues(seeded, wanted) {
|
|
|
2042
2105
|
}
|
|
2043
2106
|
return sameSetValue(seeded, wanted);
|
|
2044
2107
|
}
|
|
2045
|
-
function isRefValue(value2) {
|
|
2046
|
-
return value2 != null && typeof value2 === "object" && "ref" in value2 ? value2.ref : void 0;
|
|
2047
|
-
}
|
|
2048
2108
|
function isTemplateValue(value2) {
|
|
2049
2109
|
return value2 != null && typeof value2 === "object" && "template" in value2;
|
|
2050
2110
|
}
|
|
@@ -2150,45 +2210,7 @@ function resolvePredicate2(predicate, choices) {
|
|
|
2150
2210
|
}
|
|
2151
2211
|
const picked = choices.get(predicate);
|
|
2152
2212
|
const row2 = picked == null ? void 0 : predicate.branches[picked];
|
|
2153
|
-
return row2 == null ? [] :
|
|
2154
|
-
}
|
|
2155
|
-
function usedRefHeads({ singletons, steps, workflow: workflow2, world }) {
|
|
2156
|
-
const values = [
|
|
2157
|
-
...world.flatMap((setup) => Object.values(setup.set)),
|
|
2158
|
-
...workflow2.absent.flatMap((absence) => Object.values(absence.where)),
|
|
2159
|
-
...Object.values(singletons),
|
|
2160
|
-
...steps.flatMap((step) => stepRefValues(step))
|
|
2161
|
-
];
|
|
2162
|
-
return new Set(values.flatMap((value2) => refStrings(value2)).map((ref) => headOf(ref)));
|
|
2163
|
-
}
|
|
2164
|
-
function stepRefValues(step) {
|
|
2165
|
-
return collectRefObjects(step).map((ref) => ({ ref }));
|
|
2166
|
-
}
|
|
2167
|
-
function collectRefObjects(node) {
|
|
2168
|
-
if (Array.isArray(node)) {
|
|
2169
|
-
return node.flatMap((item) => collectRefObjects(item));
|
|
2170
|
-
}
|
|
2171
|
-
if (node == null || typeof node !== "object") {
|
|
2172
|
-
return [];
|
|
2173
|
-
}
|
|
2174
|
-
if ("ref" in node && typeof node.ref === "string" && Object.keys(node).length === 1) {
|
|
2175
|
-
return [node.ref];
|
|
2176
|
-
}
|
|
2177
|
-
return Object.values(node).flatMap((value2) => collectRefObjects(value2));
|
|
2178
|
-
}
|
|
2179
|
-
function refStrings(value2) {
|
|
2180
|
-
const ref = isRefValue(value2);
|
|
2181
|
-
if (ref != null) {
|
|
2182
|
-
return [ref];
|
|
2183
|
-
}
|
|
2184
|
-
if (value2 != null && typeof value2 === "object" && "template" in value2) {
|
|
2185
|
-
return value2.template.flatMap((segment) => typeof segment === "string" ? [] : [segment.ref]);
|
|
2186
|
-
}
|
|
2187
|
-
return [];
|
|
2188
|
-
}
|
|
2189
|
-
function headOf(ref) {
|
|
2190
|
-
const dot = ref.indexOf(".");
|
|
2191
|
-
return dot === -1 ? ref : ref.slice(0, dot);
|
|
2213
|
+
return row2 == null ? [] : row2.consequence.flatMap((c) => resolvePredicate2(c, choices));
|
|
2192
2214
|
}
|
|
2193
2215
|
|
|
2194
2216
|
// src/build.ts
|
|
@@ -2304,6 +2326,7 @@ export {
|
|
|
2304
2326
|
changed,
|
|
2305
2327
|
check,
|
|
2306
2328
|
checkbox,
|
|
2329
|
+
checked,
|
|
2307
2330
|
clear,
|
|
2308
2331
|
click,
|
|
2309
2332
|
columnheader,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ripplo/testing",
|
|
3
|
-
"version": "0.7.
|
|
3
|
+
"version": "0.7.14",
|
|
4
4
|
"description": "Typed test DSL for Ripplo — declare entities and user flows, compile to a lockfile",
|
|
5
5
|
"homepage": "https://ripplo.ai",
|
|
6
6
|
"license": "SEE LICENSE IN LICENSE.md",
|
|
@@ -43,8 +43,8 @@
|
|
|
43
43
|
"tsup": "^8.5.1",
|
|
44
44
|
"typescript": "^5.9.3",
|
|
45
45
|
"vitest": "^4.1.4",
|
|
46
|
-
"@ripplo/
|
|
47
|
-
"@ripplo/
|
|
46
|
+
"@ripplo/spec": "^0.0.0",
|
|
47
|
+
"@ripplo/eslint-config": "0.0.0"
|
|
48
48
|
},
|
|
49
49
|
"scripts": {
|
|
50
50
|
"build": "tsup",
|