@ripplo/testing 0.6.1 → 0.7.1
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 +357 -0
- package/LICENSE.md +1 -0
- package/README.md +47 -273
- package/dist/engine-BfvzXgLg.d.ts +1091 -0
- package/dist/express.d.ts +7 -9
- package/dist/express.js +422 -48
- package/dist/index.d.ts +134 -59
- package/dist/index.js +1654 -1126
- package/package.json +31 -113
- package/dist/actions.d.ts +0 -260
- package/dist/actions.js +0 -177
- package/dist/assert.d.ts +0 -188
- package/dist/assert.js +0 -111
- package/dist/builder-SsgqYqSC.d.ts +0 -156
- package/dist/chunk-2YLI7VD4.js +0 -65
- package/dist/chunk-4MGIQFAJ.js +0 -16
- package/dist/chunk-DCJBLS2U.js +0 -26
- package/dist/chunk-MGATMMCZ.js +0 -16
- package/dist/chunk-XO36IU66.js +0 -88
- package/dist/chunk-YFOTJIVF.js +0 -134
- package/dist/chunk-YQAEOH5W.js +0 -111
- package/dist/compiler.d.ts +0 -32
- package/dist/compiler.js +0 -8
- package/dist/control.d.ts +0 -45
- package/dist/control.js +0 -17
- package/dist/elysia.d.ts +0 -78
- package/dist/elysia.js +0 -114
- package/dist/engine-BOqzK_go.d.ts +0 -61
- package/dist/fastify.d.ts +0 -14
- package/dist/fastify.js +0 -79
- package/dist/hono.d.ts +0 -19
- package/dist/hono.js +0 -89
- package/dist/koa.d.ts +0 -14
- package/dist/koa.js +0 -135
- package/dist/locators.d.ts +0 -40
- package/dist/locators.js +0 -11
- package/dist/lockfile.d.ts +0 -722
- package/dist/lockfile.js +0 -707
- package/dist/nestjs.d.ts +0 -17
- package/dist/nestjs.js +0 -139
- package/dist/nextjs.d.ts +0 -14
- package/dist/nextjs.js +0 -137
- package/dist/step-De52hTLd.d.ts +0 -19
- package/dist/types-BzZrl65Z.d.ts +0 -115
package/dist/index.d.ts
CHANGED
|
@@ -1,59 +1,134 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
import
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
declare function
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
interface
|
|
24
|
-
readonly
|
|
25
|
-
readonly
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
readonly
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
readonly
|
|
35
|
-
readonly
|
|
36
|
-
readonly
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
readonly
|
|
41
|
-
readonly
|
|
42
|
-
readonly
|
|
43
|
-
}
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
declare
|
|
55
|
-
declare
|
|
56
|
-
declare
|
|
57
|
-
declare
|
|
58
|
-
|
|
59
|
-
|
|
1
|
+
import { C as Capture, S as Step, P as PredicateInput, L as Locator, B as Binding, A as AnyBinding, G as GivenItem, T as Test, 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-BfvzXgLg.js';
|
|
2
|
+
export { i as AbsenceHandle, j as CLIENT_MOUNT_KEY, k as CLIENT_SEED_KEY, l as ConditionInput, m as ConditionPredicate, n as CountCondition, o as DuplicateEntityName, E as Engine, p as EngineError, q as EngineImpls, r as EngineRead, s as EntityDef, t as EntityHandle, u as EntityImpl, v as FieldOptions, w as Fields, H as Handle, x as Selection, y as SingletonConfig, z as SingletonImpl, I as SingletonValue, W as WhenClause, J as WithinMatcher, K as and, M as changed, N as count, O as createEngine, Q as disabled, V as enabled, X as entity, Y as field, Z as focused, _ as id, $ as key, a0 as not, a1 as singleton, a2 as text, a3 as v, a4 as value, a5 as visible, a6 as when, a7 as within } from './engine-BfvzXgLg.js';
|
|
3
|
+
import 'neverthrow';
|
|
4
|
+
import 'zod';
|
|
5
|
+
|
|
6
|
+
interface StepBuilder {
|
|
7
|
+
readonly captures: ReadonlyArray<Capture>;
|
|
8
|
+
readonly step: Step;
|
|
9
|
+
readonly expect: (...predicates: ReadonlyArray<PredicateInput>) => StepBuilder;
|
|
10
|
+
}
|
|
11
|
+
declare function goto(strings: TemplateStringsArray, ...values: readonly AnyBinding[]): StepBuilder;
|
|
12
|
+
declare function click(locator: Locator): StepBuilder;
|
|
13
|
+
declare function dblclick(locator: Locator): StepBuilder;
|
|
14
|
+
declare function fill(locator: Locator, binding: Binding<string> | string): StepBuilder;
|
|
15
|
+
declare function clear(locator: Locator): StepBuilder;
|
|
16
|
+
declare function select(locator: Locator, binding: Binding<string> | string): StepBuilder;
|
|
17
|
+
declare function check(locator: Locator): StepBuilder;
|
|
18
|
+
declare function uncheck(locator: Locator): StepBuilder;
|
|
19
|
+
declare function hover(locator: Locator): StepBuilder;
|
|
20
|
+
declare function upload(locator: Locator, files: ReadonlyArray<string>): StepBuilder;
|
|
21
|
+
declare function press(pressKey: string, locator?: Locator): StepBuilder;
|
|
22
|
+
|
|
23
|
+
interface TestBody {
|
|
24
|
+
readonly given: ReadonlyArray<GivenItem>;
|
|
25
|
+
readonly steps: ReadonlyArray<StepBuilder>;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
interface RipploTest {
|
|
29
|
+
readonly spec: Test;
|
|
30
|
+
}
|
|
31
|
+
declare function test(intent: string, fn?: () => TestBody): RipploTest;
|
|
32
|
+
|
|
33
|
+
interface RipploInput<S extends EntityList, Sg extends SingletonList> {
|
|
34
|
+
readonly entities: S & UniqueNames<S>;
|
|
35
|
+
readonly singletons: Sg;
|
|
36
|
+
readonly tests: ReadonlyArray<RipploTest>;
|
|
37
|
+
}
|
|
38
|
+
interface Ripplo<S extends EntityList, Sg extends SingletonList> {
|
|
39
|
+
readonly entities: S;
|
|
40
|
+
readonly lockfile: Lockfile;
|
|
41
|
+
readonly singletons: Sg;
|
|
42
|
+
readonly tests: ReadonlyArray<RipploTest>;
|
|
43
|
+
}
|
|
44
|
+
declare function createRipplo<const S extends EntityList, const Sg extends SingletonList>(input: RipploInput<S, Sg>): Ripplo<S, Sg>;
|
|
45
|
+
|
|
46
|
+
type LocatorName = string | Binding<string> | TemplateStringsArray;
|
|
47
|
+
type NamedLocator = (name: LocatorName, ...bindings: ReadonlyArray<AnyBinding>) => Locator;
|
|
48
|
+
type ContainerLocator = (name?: LocatorName, ...bindings: ReadonlyArray<AnyBinding>) => Locator;
|
|
49
|
+
declare function role(roleName: string, name?: LocatorName, ...bindings: ReadonlyArray<AnyBinding>): Locator;
|
|
50
|
+
declare function inside(scope: Locator, target: Locator): Locator;
|
|
51
|
+
declare function testId(value: string | TemplateStringsArray, ...bindings: ReadonlyArray<AnyBinding>): Locator;
|
|
52
|
+
declare const alertdialog: NamedLocator;
|
|
53
|
+
declare const button: NamedLocator;
|
|
54
|
+
declare const cell: NamedLocator;
|
|
55
|
+
declare const checkbox: NamedLocator;
|
|
56
|
+
declare const columnheader: NamedLocator;
|
|
57
|
+
declare const combobox: NamedLocator;
|
|
58
|
+
declare const dialog: NamedLocator;
|
|
59
|
+
declare const heading: NamedLocator;
|
|
60
|
+
declare const img: NamedLocator;
|
|
61
|
+
declare const link: NamedLocator;
|
|
62
|
+
declare const listitem: NamedLocator;
|
|
63
|
+
declare const menuitem: NamedLocator;
|
|
64
|
+
declare const option: NamedLocator;
|
|
65
|
+
declare const radio: NamedLocator;
|
|
66
|
+
declare const row: NamedLocator;
|
|
67
|
+
declare const searchbox: NamedLocator;
|
|
68
|
+
declare const slider: NamedLocator;
|
|
69
|
+
declare const spinbutton: NamedLocator;
|
|
70
|
+
declare const switchControl: NamedLocator;
|
|
71
|
+
declare const tab: NamedLocator;
|
|
72
|
+
declare const textbox: NamedLocator;
|
|
73
|
+
declare const treeitem: NamedLocator;
|
|
74
|
+
declare const alert: ContainerLocator;
|
|
75
|
+
declare const banner: ContainerLocator;
|
|
76
|
+
declare const complementary: ContainerLocator;
|
|
77
|
+
declare const contentinfo: ContainerLocator;
|
|
78
|
+
declare const form: ContainerLocator;
|
|
79
|
+
declare const grid: ContainerLocator;
|
|
80
|
+
declare const group: ContainerLocator;
|
|
81
|
+
declare const list: ContainerLocator;
|
|
82
|
+
declare const main: ContainerLocator;
|
|
83
|
+
declare const menu: ContainerLocator;
|
|
84
|
+
declare const navigation: ContainerLocator;
|
|
85
|
+
declare const progressbar: ContainerLocator;
|
|
86
|
+
declare const radiogroup: ContainerLocator;
|
|
87
|
+
declare const region: ContainerLocator;
|
|
88
|
+
declare const status: ContainerLocator;
|
|
89
|
+
declare const table: ContainerLocator;
|
|
90
|
+
declare const tablist: ContainerLocator;
|
|
91
|
+
declare const tabpanel: ContainerLocator;
|
|
92
|
+
declare const toolbar: ContainerLocator;
|
|
93
|
+
|
|
94
|
+
interface BrowserSingletonDef<Name extends BrowserSingleton> {
|
|
95
|
+
readonly name: Name;
|
|
96
|
+
readonly is: (strings: TemplateStringsArray, ...values: readonly Binding<string>[]) => LeafPredicate;
|
|
97
|
+
}
|
|
98
|
+
declare const url: BrowserSingletonDef<"url">;
|
|
99
|
+
declare const title: BrowserSingletonDef<"title">;
|
|
100
|
+
declare const viewport: BrowserSingletonDef<"viewport">;
|
|
101
|
+
|
|
102
|
+
declare function arbitrary<T extends Primitive>(field: FieldHandle<T>, example?: T): Binding<T>;
|
|
103
|
+
|
|
104
|
+
interface ClientSingletonImpl<T extends Primitive$1> {
|
|
105
|
+
readonly read: () => T | null;
|
|
106
|
+
readonly seed: (value: T) => void;
|
|
107
|
+
}
|
|
108
|
+
interface ClientEntityImpl {
|
|
109
|
+
readonly read: () => ReadonlyArray<Row>;
|
|
110
|
+
}
|
|
111
|
+
type ValueOf<D> = D extends SingletonDef<string, infer T> ? T : Primitive$1;
|
|
112
|
+
interface ClientEngineImpls<R extends DeclSource> {
|
|
113
|
+
readonly entities: {
|
|
114
|
+
readonly [D in Extract<R["entities"][number], {
|
|
115
|
+
readonly source: "client";
|
|
116
|
+
}> as D["name"]]: ClientEntityImpl;
|
|
117
|
+
};
|
|
118
|
+
readonly singletons: {
|
|
119
|
+
readonly [D in Extract<R["singletons"][number], {
|
|
120
|
+
readonly source: "client";
|
|
121
|
+
}> as D["name"]]: ClientSingletonImpl<ValueOf<D>>;
|
|
122
|
+
};
|
|
123
|
+
}
|
|
124
|
+
interface ClientEngineMount {
|
|
125
|
+
readonly readEntity: (name: string) => ReadonlyArray<Row>;
|
|
126
|
+
readonly readSingleton: (name: string) => Primitive$1 | null;
|
|
127
|
+
}
|
|
128
|
+
declare function createClientEngine<R extends DeclSource>(_ripplo: R, impls: ClientEngineImpls<R>): ClientEngineMount;
|
|
129
|
+
interface MountClientEngineOptions {
|
|
130
|
+
readonly enabled: boolean;
|
|
131
|
+
}
|
|
132
|
+
declare function mountClientEngine<R extends DeclSource>(ripplo: R, impls: ClientEngineImpls<R>, { enabled }: MountClientEngineOptions): void;
|
|
133
|
+
|
|
134
|
+
export { AnyBinding, Binding, type BrowserSingletonDef, type ClientEngineImpls, type ClientEngineMount, type ClientEntityImpl, type ClientSingletonImpl, type ContainerLocator, EntityList, FieldHandle, GivenItem, type LocatorName, type MountClientEngineOptions, type NamedLocator, Primitive, type Ripplo, type RipploTest, SingletonDef, SingletonList, type TestBody, UniqueNames, alert, alertdialog, arbitrary, banner, button, cell, check, checkbox, clear, click, columnheader, combobox, complementary, contentinfo, createClientEngine, createRipplo, dblclick, dialog, fill, form, goto, grid, group, heading, hover, img, inside, link, list, listitem, main, menu, menuitem, mountClientEngine, navigation, option, press, progressbar, radio, radiogroup, region, role, row, searchbox, select, slider, spinbutton, status, switchControl, tab, table, tablist, tabpanel, test, testId, textbox, title, toolbar, treeitem, uncheck, upload, url, viewport };
|