@jterrazz/test 16.0.0 → 16.1.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/appium.adapter.js +59 -4
- package/dist/browser/index.js +88 -40
- package/dist/checker.js +272 -63
- package/dist/index.d.ts +33 -4
- package/dist/index.js +47 -24
- package/dist/oxlint.cjs +100 -27
- package/dist/oxlint.js +100 -27
- package/dist/playwright.adapter.js +14 -65
- package/dist/{ambiguity.js → substring-warning.js} +99 -1
- package/dist/vitest.js +71 -11
- package/docs/01-architecture.md +95 -0
- package/docs/02-developing.md +351 -0
- package/docs/03-testing.md +495 -0
- package/docs/04-operating.md +101 -0
- package/docs/05-module-tests.md +152 -0
- package/docs/06-integration.md +180 -0
- package/docs/07-component.md +246 -0
- package/docs/08-website.md +404 -0
- package/docs/09-mobile.md +270 -0
- package/docs/10-api.md +264 -0
- package/docs/11-jobs.md +157 -0
- package/docs/12-cli.md +677 -0
- package/docs/13-elements.md +242 -0
- package/docs/14-assertions.md +314 -0
- package/docs/15-tokens.md +253 -0
- package/docs/16-contracts.md +438 -0
- package/docs/17-services.md +188 -0
- package/docs/18-conventions.md +305 -0
- package/docs/19-linting.md +510 -0
- package/docs/README.md +36 -0
- package/docs/decisions/001-v9-conventions-on-three-channels.md +50 -0
- package/docs/decisions/002-the-statique-channel-holds-only-what-upstream-does-not.md +49 -0
- package/docs/decisions/003-a-rendered-component-is-a-facet-on-vitest-browser-mode.md +84 -0
- package/docs/decisions/004-a-module-against-real-services-or-a-golden-is-the-integration-facet.md +81 -0
- package/docs/decisions/005-the-doubles-ladder-is-closed.md +86 -0
- package/docs/decisions/006-the-catalogue-reaches-a-file-by-its-role.md +245 -0
- package/docs/decisions/007-compose-mode-leaves-the-package.md +53 -0
- package/docs/decisions/008-vitest-5-node-24-and-the-native-seams-as-optional-peers.md +75 -0
- package/docs/decisions/_template.md +22 -0
- package/docs/reference/classes/Matcher.md +120 -0
- package/docs/reference/classes/ProcessHandle.md +368 -0
- package/docs/reference/functions/defineContract.md +39 -0
- package/docs/reference/functions/defineContracts.md +36 -0
- package/docs/reference/functions/disabled.md +28 -0
- package/docs/reference/functions/enabled.md +20 -0
- package/docs/reference/functions/focused.md +26 -0
- package/docs/reference/functions/mockOf.md +79 -0
- package/docs/reference/functions/postgres.md +31 -0
- package/docs/reference/functions/process.md +33 -0
- package/docs/reference/functions/redis.md +28 -0
- package/docs/reference/functions/required.md +41 -0
- package/docs/reference/functions/selected.md +26 -0
- package/docs/reference/functions/sqlite.md +33 -0
- package/docs/reference/functions/testId.md +20 -0
- package/docs/reference/functions/text.md +40 -0
- package/docs/reference/functions/valued.md +28 -0
- package/docs/reference/functions/waitUntil.md +46 -0
- package/docs/reference/functions/within.md +29 -0
- package/docs/reference/index.md +196 -0
- package/docs/reference/interfaces/BaseResult.md +87 -0
- package/docs/reference/interfaces/CallResult.md +160 -0
- package/docs/reference/interfaces/CaptureScope.md +82 -0
- package/docs/reference/interfaces/CliResult.md +253 -0
- package/docs/reference/interfaces/ContainerAccessor.md +166 -0
- package/docs/reference/interfaces/DirectoryAccessor.md +33 -0
- package/docs/reference/interfaces/FetchResult.md +180 -0
- package/docs/reference/interfaces/FilesystemAccessor.md +46 -0
- package/docs/reference/interfaces/HttpResult.md +126 -0
- package/docs/reference/interfaces/JsonAccessor.md +46 -0
- package/docs/reference/interfaces/PageResult.md +356 -0
- package/docs/reference/interfaces/RenderResult.md +72 -0
- package/docs/reference/interfaces/RenderedText.md +110 -0
- package/docs/reference/interfaces/ResponseAccessor.md +47 -0
- package/docs/reference/interfaces/ScreenResult.md +128 -0
- package/docs/reference/interfaces/TableAccessor.md +26 -0
- package/docs/reference/interfaces/TextAccessor.md +96 -0
- package/docs/reference/type-aliases/ApiHandle.md +68 -0
- package/docs/reference/type-aliases/ApiSpecification.md +213 -0
- package/docs/reference/type-aliases/ApiSpecificationOptions.md +68 -0
- package/docs/reference/type-aliases/BrowserConsoleMessage.md +30 -0
- package/docs/reference/type-aliases/BrowserLinkElement.md +50 -0
- package/docs/reference/type-aliases/BrowserMetaElement.md +40 -0
- package/docs/reference/type-aliases/BrowserOpenOptions.md +87 -0
- package/docs/reference/type-aliases/BrowserPage.md +132 -0
- package/docs/reference/type-aliases/BrowserPort.md +51 -0
- package/docs/reference/type-aliases/CliEnv.md +11 -0
- package/docs/reference/type-aliases/CliHandle.md +80 -0
- package/docs/reference/type-aliases/CliInput.md +36 -0
- package/docs/reference/type-aliases/CliOutput.md +46 -0
- package/docs/reference/type-aliases/CliPort.md +58 -0
- package/docs/reference/type-aliases/CliSpecification.md +144 -0
- package/docs/reference/type-aliases/CliSpecificationOptions.md +134 -0
- package/docs/reference/type-aliases/ComponentChain.md +156 -0
- package/docs/reference/type-aliases/ComponentScenario.md +20 -0
- package/docs/reference/type-aliases/ComponentUi.md +47 -0
- package/docs/reference/type-aliases/ComponentVisitor.md +10 -0
- package/docs/reference/type-aliases/ContainerPort.md +113 -0
- package/docs/reference/type-aliases/Contract.md +68 -0
- package/docs/reference/type-aliases/ContractInput.md +13 -0
- package/docs/reference/type-aliases/ContractRequest.md +95 -0
- package/docs/reference/type-aliases/ContractResponder.md +23 -0
- package/docs/reference/type-aliases/ContractResponse.md +78 -0
- package/docs/reference/type-aliases/ContractResponseValue.md +13 -0
- package/docs/reference/type-aliases/Contracts.md +48 -0
- package/docs/reference/type-aliases/DatabaseKeys.md +16 -0
- package/docs/reference/type-aliases/DatabasePort.md +72 -0
- package/docs/reference/type-aliases/DeviceOpenOptions.md +46 -0
- package/docs/reference/type-aliases/DevicePort.md +51 -0
- package/docs/reference/type-aliases/DeviceScreen.md +32 -0
- package/docs/reference/type-aliases/DeviceTimeouts.md +39 -0
- package/docs/reference/type-aliases/DockerSpecConfig.md +43 -0
- package/docs/reference/type-aliases/DomMount.md +21 -0
- package/docs/reference/type-aliases/ElementKind.md +27 -0
- package/docs/reference/type-aliases/ElementMatch.md +74 -0
- package/docs/reference/type-aliases/ElementOptions.md +29 -0
- package/docs/reference/type-aliases/ElementRef.md +128 -0
- package/docs/reference/type-aliases/ExecOptions.md +37 -0
- package/docs/reference/type-aliases/FileAccessor.md +54 -0
- package/docs/reference/type-aliases/HonoApp.md +31 -0
- package/docs/reference/type-aliases/HttpContractFilter.md +49 -0
- package/docs/reference/type-aliases/HttpResponseInit.md +46 -0
- package/docs/reference/type-aliases/HttpStreamInit.md +58 -0
- package/docs/reference/type-aliases/IntegrationHandle.md +46 -0
- package/docs/reference/type-aliases/IntegrationSpecification.md +111 -0
- package/docs/reference/type-aliases/IntegrationSpecificationOptions.md +42 -0
- package/docs/reference/type-aliases/Intercept.md +19 -0
- package/docs/reference/type-aliases/InterceptOptions.md +28 -0
- package/docs/reference/type-aliases/InterceptScope.md +11 -0
- package/docs/reference/type-aliases/IsolationStrategy.md +75 -0
- package/docs/reference/type-aliases/JobHandle.md +34 -0
- package/docs/reference/type-aliases/JobsHandle.md +57 -0
- package/docs/reference/type-aliases/JobsResult.md +16 -0
- package/docs/reference/type-aliases/JobsSpecification.md +94 -0
- package/docs/reference/type-aliases/JobsSpecificationOptions.md +56 -0
- package/docs/reference/type-aliases/LandmarkKind.md +20 -0
- package/docs/reference/type-aliases/LiterateRunFlags.md +27 -0
- package/docs/reference/type-aliases/LiterateServeRegistration.md +70 -0
- package/docs/reference/type-aliases/MatchFixtureOptions.md +27 -0
- package/docs/reference/type-aliases/MatchableRequest.md +61 -0
- package/docs/reference/type-aliases/MatcherKind.md +34 -0
- package/docs/reference/type-aliases/MobileBackendOptions.md +28 -0
- package/docs/reference/type-aliases/MobileElementKind.md +14 -0
- package/docs/reference/type-aliases/MobileElementMatch.md +60 -0
- package/docs/reference/type-aliases/MobileElementRef.md +20 -0
- package/docs/reference/type-aliases/MobileHandle.md +65 -0
- package/docs/reference/type-aliases/MobileScenario.md +20 -0
- package/docs/reference/type-aliases/MobileSpecification.md +51 -0
- package/docs/reference/type-aliases/MobileSpecificationOptions.md +126 -0
- package/docs/reference/type-aliases/MobileVisitor.md +81 -0
- package/docs/reference/type-aliases/MockOfOptions.md +26 -0
- package/docs/reference/type-aliases/MockPort.md +10 -0
- package/docs/reference/type-aliases/PinnedClock.md +10 -0
- package/docs/reference/type-aliases/PostgresOptions.md +32 -0
- package/docs/reference/type-aliases/ProcessOptions.md +112 -0
- package/docs/reference/type-aliases/RedisOptions.md +20 -0
- package/docs/reference/type-aliases/RenderSubject.md +12 -0
- package/docs/reference/type-aliases/ScreenNode.md +67 -0
- package/docs/reference/type-aliases/ServerPort.md +36 -0
- package/docs/reference/type-aliases/ServerResponse.md +46 -0
- package/docs/reference/type-aliases/ServerSpec.md +21 -0
- package/docs/reference/type-aliases/ServiceHandle.md +216 -0
- package/docs/reference/type-aliases/ServiceRecord.md +12 -0
- package/docs/reference/type-aliases/SpecDocument.md +84 -0
- package/docs/reference/type-aliases/SpecEnvToken.md +21 -0
- package/docs/reference/type-aliases/SpecFileAssertion.md +27 -0
- package/docs/reference/type-aliases/SpecFixture.md +30 -0
- package/docs/reference/type-aliases/SpecKind.md +8 -0
- package/docs/reference/type-aliases/SpecRun.md +108 -0
- package/docs/reference/type-aliases/SpecServeEntry.md +40 -0
- package/docs/reference/type-aliases/SpecStream.md +32 -0
- package/docs/reference/type-aliases/SpecificationConfig.md +290 -0
- package/docs/reference/type-aliases/SqliteOptions.md +36 -0
- package/docs/reference/type-aliases/SseEvent.md +58 -0
- package/docs/reference/type-aliases/StreamBody.md +61 -0
- package/docs/reference/type-aliases/TextFilter.md +22 -0
- package/docs/reference/type-aliases/VisitScenario.md +20 -0
- package/docs/reference/type-aliases/Visitor.md +215 -0
- package/docs/reference/type-aliases/WaitUntilOptions.md +46 -0
- package/docs/reference/type-aliases/WebsiteBackendOptions.md +37 -0
- package/docs/reference/type-aliases/WebsiteHandle.md +51 -0
- package/docs/reference/type-aliases/WebsiteSpecification.md +118 -0
- package/docs/reference/type-aliases/WebsiteSpecificationOptions.md +40 -0
- package/docs/reference/variables/anthropic.md +19 -0
- package/docs/reference/variables/banner.md +10 -0
- package/docs/reference/variables/button.md +10 -0
- package/docs/reference/variables/clock.md +16 -0
- package/docs/reference/variables/complementary.md +10 -0
- package/docs/reference/variables/component.md +10 -0
- package/docs/reference/variables/content.md +10 -0
- package/docs/reference/variables/contentinfo.md +10 -0
- package/docs/reference/variables/dialog.md +10 -0
- package/docs/reference/variables/field.md +10 -0
- package/docs/reference/variables/form.md +10 -0
- package/docs/reference/variables/heading.md +10 -0
- package/docs/reference/variables/http.md +40 -0
- package/docs/reference/variables/intercept.md +11 -0
- package/docs/reference/variables/link.md +10 -0
- package/docs/reference/variables/listitem.md +10 -0
- package/docs/reference/variables/main.md +10 -0
- package/docs/reference/variables/match.md +8 -0
- package/docs/reference/variables/navigation.md +10 -0
- package/docs/reference/variables/openai.md +21 -0
- package/docs/reference/variables/option.md +17 -0
- package/docs/reference/variables/region.md +10 -0
- package/docs/reference/variables/row.md +10 -0
- package/docs/reference/variables/search.md +10 -0
- package/docs/reference/variables/specification.md +8 -0
- package/docs/reference/variables/status.md +10 -0
- package/docs/reference/variables/table.md +10 -0
- package/package.json +2 -1
|
@@ -0,0 +1,94 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: JobsSpecification\<DatabaseKey\>
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type JobsSpecification<DatabaseKey> = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/chain/builder.ts:216](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L216)
|
|
9
|
+
|
|
10
|
+
## Type Parameters
|
|
11
|
+
|
|
12
|
+
| Type Parameter | Default type |
|
|
13
|
+
| ------ | ------ |
|
|
14
|
+
| `DatabaseKey` *extends* `string` | `string` |
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### clock
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
clock: (iso) => JobsSpecification<DatabaseKey>;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: [src/model/chain/builder.ts:218](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L218)
|
|
25
|
+
|
|
26
|
+
Pin the job's `Date` at `iso` for this chain — the calendar the job reads.
|
|
27
|
+
|
|
28
|
+
#### Parameters
|
|
29
|
+
|
|
30
|
+
| Parameter | Type |
|
|
31
|
+
| ------ | ------ |
|
|
32
|
+
| `iso` | `string` |
|
|
33
|
+
|
|
34
|
+
#### Returns
|
|
35
|
+
|
|
36
|
+
`JobsSpecification`\<`DatabaseKey`\>
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### intercept
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
intercept: InterceptMethod<JobsSpecification<DatabaseKey>>;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Defined in: [src/model/chain/builder.ts:220](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L220)
|
|
47
|
+
|
|
48
|
+
Declare outgoing calls — a contract, a list, a composite, or an inline request + response pair.
|
|
49
|
+
|
|
50
|
+
***
|
|
51
|
+
|
|
52
|
+
### seed
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
seed: (file, options?) => JobsSpecification<DatabaseKey>;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Defined in: [src/model/chain/builder.ts:222](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L222)
|
|
59
|
+
|
|
60
|
+
Queue a SQL seed file from `_seeds/` to run before the action.
|
|
61
|
+
|
|
62
|
+
#### Parameters
|
|
63
|
+
|
|
64
|
+
| Parameter | Type |
|
|
65
|
+
| ------ | ------ |
|
|
66
|
+
| `file` | `string` |
|
|
67
|
+
| `options?` | \{ `database?`: `DatabaseKey`; \} |
|
|
68
|
+
| `options.database?` | `DatabaseKey` |
|
|
69
|
+
|
|
70
|
+
#### Returns
|
|
71
|
+
|
|
72
|
+
`JobsSpecification`\<`DatabaseKey`\>
|
|
73
|
+
|
|
74
|
+
***
|
|
75
|
+
|
|
76
|
+
### trigger
|
|
77
|
+
|
|
78
|
+
```ts
|
|
79
|
+
trigger: (name) => Promise<JobsResult>;
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
Defined in: [src/model/chain/builder.ts:225](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L225)
|
|
83
|
+
|
|
84
|
+
Execute the named job registered via the `jobs` option and resolve with the result.
|
|
85
|
+
|
|
86
|
+
#### Parameters
|
|
87
|
+
|
|
88
|
+
| Parameter | Type |
|
|
89
|
+
| ------ | ------ |
|
|
90
|
+
| `name` | `string` |
|
|
91
|
+
|
|
92
|
+
#### Returns
|
|
93
|
+
|
|
94
|
+
`Promise`\<[`JobsResult`](JobsResult.md)\>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: JobsSpecificationOptions\<Services\>
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type JobsSpecificationOptions<Services> = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/facets/jobs/jobs.specification.ts:18](https://github.com/jterrazz/package-test/blob/main/src/facets/jobs/jobs.specification.ts#L18)
|
|
9
|
+
|
|
10
|
+
Options for startJobs \| specification.jobs.
|
|
11
|
+
|
|
12
|
+
## Type Parameters
|
|
13
|
+
|
|
14
|
+
| Type Parameter | Default type |
|
|
15
|
+
| ------ | ------ |
|
|
16
|
+
| `Services` *extends* [`ServiceRecord`](ServiceRecord.md) | [`ServiceRecord`](ServiceRecord.md) |
|
|
17
|
+
|
|
18
|
+
## Properties
|
|
19
|
+
|
|
20
|
+
### jobs
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
jobs:
|
|
24
|
+
| ((services) => JobHandle[])
|
|
25
|
+
| JobHandle[];
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
Defined in: [src/facets/jobs/jobs.specification.ts:24](https://github.com/jterrazz/package-test/blob/main/src/facets/jobs/jobs.specification.ts#L24)
|
|
29
|
+
|
|
30
|
+
Named jobs triggerable via `jobs.trigger(name)` — a factory receiving
|
|
31
|
+
the started services record, or a static array. Jobs run in-process by
|
|
32
|
+
definition (CONVENTIONS A8).
|
|
33
|
+
|
|
34
|
+
***
|
|
35
|
+
|
|
36
|
+
### root?
|
|
37
|
+
|
|
38
|
+
```ts
|
|
39
|
+
optional root?: string;
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
Defined in: [src/facets/jobs/jobs.specification.ts:26](https://github.com/jterrazz/package-test/blob/main/src/facets/jobs/jobs.specification.ts#L26)
|
|
43
|
+
|
|
44
|
+
Project root override — see the `root` option of `specification.api()`.
|
|
45
|
+
|
|
46
|
+
***
|
|
47
|
+
|
|
48
|
+
### services?
|
|
49
|
+
|
|
50
|
+
```ts
|
|
51
|
+
optional services?: Services;
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
Defined in: [src/facets/jobs/jobs.specification.ts:28](https://github.com/jterrazz/package-test/blob/main/src/facets/jobs/jobs.specification.ts#L28)
|
|
55
|
+
|
|
56
|
+
Named infrastructure record started via testcontainers.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: LandmarkKind
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type LandmarkKind =
|
|
6
|
+
| "banner"
|
|
7
|
+
| "complementary"
|
|
8
|
+
| "contentinfo"
|
|
9
|
+
| "form"
|
|
10
|
+
| "main"
|
|
11
|
+
| "navigation"
|
|
12
|
+
| "region"
|
|
13
|
+
| "search";
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Defined in: [src/model/ports/browser.port.ts:6](https://github.com/jterrazz/package-test/blob/main/src/model/ports/browser.port.ts#L6)
|
|
17
|
+
|
|
18
|
+
The landmark roles — the standard set of page regions, and the only
|
|
19
|
+
containers a scope can name. Closed on purpose: ARIA defines exactly these,
|
|
20
|
+
so `within()` never becomes a second selector language.
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: LiterateRunFlags
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type LiterateRunFlags = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/facets/cli/literate.ts:66](https://github.com/jterrazz/package-test/blob/main/src/facets/cli/literate.ts#L66)
|
|
9
|
+
|
|
10
|
+
Per-call options for runSpecDocument / `cli.run()`.
|
|
11
|
+
|
|
12
|
+
## Properties
|
|
13
|
+
|
|
14
|
+
### frozen?
|
|
15
|
+
|
|
16
|
+
```ts
|
|
17
|
+
optional frozen?: boolean;
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Defined in: [src/facets/cli/literate.ts:75](https://github.com/jterrazz/package-test/blob/main/src/facets/cli/literate.ts#L75)
|
|
21
|
+
|
|
22
|
+
Opt this document OUT of the update-mode rewrite. A frozen document is
|
|
23
|
+
NEVER written under `TEST_UPDATE=1`: its mismatch still throws its diff.
|
|
24
|
+
That is what makes a DELIBERATELY-WRONG `.spec.yaml` — one whose failure
|
|
25
|
+
rendering is the subject of a negative test — survive an update run
|
|
26
|
+
instead of being silently corrected into a passing file. The document's
|
|
27
|
+
mirror of `toMatch(name, { frozen: true })`.
|
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: LiterateServeRegistration
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type LiterateServeRegistration = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/facets/cli/literate.ts:51](https://github.com/jterrazz/package-test/blob/main/src/facets/cli/literate.ts#L51)
|
|
9
|
+
|
|
10
|
+
A server a document may start by name (`serve: mcp`), registered once per app
|
|
11
|
+
in the `serve` option of `specification.cli()`.
|
|
12
|
+
|
|
13
|
+
## Properties
|
|
14
|
+
|
|
15
|
+
### command
|
|
16
|
+
|
|
17
|
+
```ts
|
|
18
|
+
command: string;
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
Defined in: [src/facets/cli/literate.ts:53](https://github.com/jterrazz/package-test/blob/main/src/facets/cli/literate.ts#L53)
|
|
22
|
+
|
|
23
|
+
Shell command that starts the server, run from the project root.
|
|
24
|
+
|
|
25
|
+
***
|
|
26
|
+
|
|
27
|
+
### env
|
|
28
|
+
|
|
29
|
+
```ts
|
|
30
|
+
env: string;
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
Defined in: [src/facets/cli/literate.ts:55](https://github.com/jterrazz/package-test/blob/main/src/facets/cli/literate.ts#L55)
|
|
34
|
+
|
|
35
|
+
The variable the resolved URL is bound to in every run's child env.
|
|
36
|
+
|
|
37
|
+
***
|
|
38
|
+
|
|
39
|
+
### ready
|
|
40
|
+
|
|
41
|
+
```ts
|
|
42
|
+
ready: RegExp;
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
Defined in: [src/facets/cli/literate.ts:60](https://github.com/jterrazz/package-test/blob/main/src/facets/cli/literate.ts#L60)
|
|
46
|
+
|
|
47
|
+
Matched against the server's output; the FIRST capture group is the port
|
|
48
|
+
it chose — named (`(?<port>\d+)`) or not, it is group 1 either way.
|
|
49
|
+
|
|
50
|
+
***
|
|
51
|
+
|
|
52
|
+
### url
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
url: (port) => string;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Defined in: [src/facets/cli/literate.ts:62](https://github.com/jterrazz/package-test/blob/main/src/facets/cli/literate.ts#L62)
|
|
59
|
+
|
|
60
|
+
Builds the URL bound to [env](#env) from the announced port.
|
|
61
|
+
|
|
62
|
+
#### Parameters
|
|
63
|
+
|
|
64
|
+
| Parameter | Type |
|
|
65
|
+
| ------ | ------ |
|
|
66
|
+
| `port` | `number` |
|
|
67
|
+
|
|
68
|
+
#### Returns
|
|
69
|
+
|
|
70
|
+
`string`
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MatchFixtureOptions
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MatchFixtureOptions = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/result/match-options.ts:21](https://github.com/jterrazz/package-test/blob/main/src/model/result/match-options.ts#L21)
|
|
9
|
+
|
|
10
|
+
Per-call options for the fixture-file `toMatch` subjects. `frozen` opts a
|
|
11
|
+
single fixture OUT of update-mode rewriting: a frozen fixture is NEVER
|
|
12
|
+
written under `TEST_UPDATE=1` (or vitest `-u`) — in update mode a frozen
|
|
13
|
+
mismatch still throws its diff, and a frozen missing fixture still throws its
|
|
14
|
+
"does not exist" error. This is what makes a DELIBERATELY-WRONG fixture (the
|
|
15
|
+
subject of a negative test that asserts the mismatch/error rendering)
|
|
16
|
+
survivable across update runs instead of being silently overwritten with the
|
|
17
|
+
actual output.
|
|
18
|
+
|
|
19
|
+
## Properties
|
|
20
|
+
|
|
21
|
+
### frozen?
|
|
22
|
+
|
|
23
|
+
```ts
|
|
24
|
+
optional frozen?: boolean;
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
Defined in: [src/model/result/match-options.ts:22](https://github.com/jterrazz/package-test/blob/main/src/model/result/match-options.ts#L22)
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MatchableRequest
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MatchableRequest = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/contracts/types.ts:7](https://github.com/jterrazz/package-test/blob/main/src/model/contracts/types.ts#L7)
|
|
9
|
+
|
|
10
|
+
The observed outgoing request, reduced to what contract matchers inspect.
|
|
11
|
+
Built once per request by the engine (MSW on api/jobs, the stub backend on
|
|
12
|
+
website/mobile) and handed to [ContractRequest.match](ContractRequest.md#match) and to a
|
|
13
|
+
[ContractResponder](ContractResponder.md).
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### body
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
body: unknown;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Defined in: [src/model/contracts/types.ts:9](https://github.com/jterrazz/package-test/blob/main/src/model/contracts/types.ts#L9)
|
|
24
|
+
|
|
25
|
+
Parsed JSON body when the payload is JSON, the raw text otherwise, or `null` when absent.
|
|
26
|
+
|
|
27
|
+
***
|
|
28
|
+
|
|
29
|
+
### headers
|
|
30
|
+
|
|
31
|
+
```ts
|
|
32
|
+
headers: Record<string, string>;
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
Defined in: [src/model/contracts/types.ts:11](https://github.com/jterrazz/package-test/blob/main/src/model/contracts/types.ts#L11)
|
|
36
|
+
|
|
37
|
+
Request headers, keyed by lowercased header name.
|
|
38
|
+
|
|
39
|
+
***
|
|
40
|
+
|
|
41
|
+
### method
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
method: string;
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
Defined in: [src/model/contracts/types.ts:13](https://github.com/jterrazz/package-test/blob/main/src/model/contracts/types.ts#L13)
|
|
48
|
+
|
|
49
|
+
Uppercased HTTP method of the observed request.
|
|
50
|
+
|
|
51
|
+
***
|
|
52
|
+
|
|
53
|
+
### url
|
|
54
|
+
|
|
55
|
+
```ts
|
|
56
|
+
url: string;
|
|
57
|
+
```
|
|
58
|
+
|
|
59
|
+
Defined in: [src/model/contracts/types.ts:15](https://github.com/jterrazz/package-test/blob/main/src/model/contracts/types.ts#L15)
|
|
60
|
+
|
|
61
|
+
The request URL — fully-qualified, or origin-relative for the stub backend.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MatcherKind
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MatcherKind =
|
|
6
|
+
| "any"
|
|
7
|
+
| "base64"
|
|
8
|
+
| "date"
|
|
9
|
+
| "duration"
|
|
10
|
+
| "email"
|
|
11
|
+
| "float"
|
|
12
|
+
| "hex"
|
|
13
|
+
| "includes"
|
|
14
|
+
| "int"
|
|
15
|
+
| "ip"
|
|
16
|
+
| "iso8601"
|
|
17
|
+
| "number"
|
|
18
|
+
| "path"
|
|
19
|
+
| "port"
|
|
20
|
+
| "ref"
|
|
21
|
+
| "regex"
|
|
22
|
+
| "semver"
|
|
23
|
+
| "sha"
|
|
24
|
+
| "string"
|
|
25
|
+
| "time"
|
|
26
|
+
| "ulid"
|
|
27
|
+
| "url"
|
|
28
|
+
| "uuid"
|
|
29
|
+
| "workdir";
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
Defined in: [src/model/matching/match.ts:12](https://github.com/jterrazz/package-test/blob/main/src/model/matching/match.ts#L12)
|
|
33
|
+
|
|
34
|
+
The frozen token vocabulary (CONVENTIONS D4) plus the code-only kinds.
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MobileBackendOptions
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MobileBackendOptions = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/facets/mobile/mobile.specification.ts:23](https://github.com/jterrazz/package-test/blob/main/src/facets/mobile/mobile.specification.ts#L23)
|
|
9
|
+
|
|
10
|
+
The declared stub backend behind the app under test. The framework owns
|
|
11
|
+
the simulator and appium but NOT the JS bundler (Metro belongs to the
|
|
12
|
+
caller's repo, like `next build` belongs to a website's) — so nothing is
|
|
13
|
+
injected: the handle exposes `backendUrl` and the CALLER wires it into its
|
|
14
|
+
own bundler env.
|
|
15
|
+
|
|
16
|
+
## Properties
|
|
17
|
+
|
|
18
|
+
### port?
|
|
19
|
+
|
|
20
|
+
```ts
|
|
21
|
+
optional port?: number;
|
|
22
|
+
```
|
|
23
|
+
|
|
24
|
+
Defined in: [src/facets/mobile/mobile.specification.ts:29](https://github.com/jterrazz/package-test/blob/main/src/facets/mobile/mobile.specification.ts#L29)
|
|
25
|
+
|
|
26
|
+
Fixed port — pins a stable stub URL across runs. Metro inlines
|
|
27
|
+
`EXPO_PUBLIC_*` values at bundle-serve time; a stable port lets a warm
|
|
28
|
+
Metro survive between runs. Default: a free OS-assigned port.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MobileElementKind
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MobileElementKind = "button" | "field" | "testId" | "text";
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/ports/device.port.ts:10](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L10)
|
|
9
|
+
|
|
10
|
+
The element kinds a mobile screen can designate — the structural subset of
|
|
11
|
+
[ElementRef](ElementRef.md) kinds that map onto the XCUITest accessibility tree.
|
|
12
|
+
There is ONE element vocabulary across facets: `button('Bookmark')` works
|
|
13
|
+
in a visit scenario and a mobile scenario alike. Landmarks have no iOS
|
|
14
|
+
analog — passing one to a mobile verb refuses at runtime.
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MobileElementMatch
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MobileElementMatch = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/ports/device.port.ts:32](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L32)
|
|
9
|
+
|
|
10
|
+
One candidate captured when a descriptor matched more than one element —
|
|
11
|
+
the evidence the ambiguity error enumerates so the author can disambiguate
|
|
12
|
+
without opening the simulator.
|
|
13
|
+
|
|
14
|
+
## Properties
|
|
15
|
+
|
|
16
|
+
### identifier?
|
|
17
|
+
|
|
18
|
+
```ts
|
|
19
|
+
optional identifier?: string;
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
Defined in: [src/model/ports/device.port.ts:34](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L34)
|
|
23
|
+
|
|
24
|
+
The accessibility identifier (`testId()` target), when one is set.
|
|
25
|
+
|
|
26
|
+
***
|
|
27
|
+
|
|
28
|
+
### label?
|
|
29
|
+
|
|
30
|
+
```ts
|
|
31
|
+
optional label?: string;
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Defined in: [src/model/ports/device.port.ts:36](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L36)
|
|
35
|
+
|
|
36
|
+
The accessible label, whitespace-collapsed and truncated.
|
|
37
|
+
|
|
38
|
+
***
|
|
39
|
+
|
|
40
|
+
### type
|
|
41
|
+
|
|
42
|
+
```ts
|
|
43
|
+
type: string;
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Defined in: [src/model/ports/device.port.ts:38](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L38)
|
|
47
|
+
|
|
48
|
+
Element type without the `XCUIElementType` prefix — `Button`, `StaticText`.
|
|
49
|
+
|
|
50
|
+
***
|
|
51
|
+
|
|
52
|
+
### value?
|
|
53
|
+
|
|
54
|
+
```ts
|
|
55
|
+
optional value?: string;
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Defined in: [src/model/ports/device.port.ts:40](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L40)
|
|
59
|
+
|
|
60
|
+
The element value (text-field content, adjustable value), when present.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MobileElementRef
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MobileElementRef = ElementRef;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/ports/device.port.ts:25](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L25)
|
|
9
|
+
|
|
10
|
+
A user-facing element descriptor for mobile scenarios — pure data, built by
|
|
11
|
+
the shared element vocabulary (`button()`, `field()`, `content()`,
|
|
12
|
+
`testId()`, `within()`) and translated into iOS predicate strings by the
|
|
13
|
+
device integration. Structurally the same ref type as the browser's, so the
|
|
14
|
+
vocabulary stays single; kinds outside [MobileElementKind](MobileElementKind.md) (the ARIA
|
|
15
|
+
landmarks) are refused at runtime with a message naming the boundary.
|
|
16
|
+
|
|
17
|
+
A descriptor must designate exactly ONE element when a verb ACTS on it
|
|
18
|
+
(`tap`, `fill`) — see [MobileElementMatch](MobileElementMatch.md) and CONVENTIONS W3.
|
|
19
|
+
`see()` acts on nothing, so any visible match satisfies it: XCUITest trees
|
|
20
|
+
legitimately duplicate a label across container and child.
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MobileHandle
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MobileHandle = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/facets/mobile/mobile.specification.ts:83](https://github.com/jterrazz/package-test/blob/main/src/facets/mobile/mobile.specification.ts#L83)
|
|
9
|
+
|
|
10
|
+
The record returned by startMobile \| specification.mobile.
|
|
11
|
+
Destructure with the canonical names (CONVENTIONS A3):
|
|
12
|
+
|
|
13
|
+
const { mobile, cleanup, udid } = await specification.mobile(…);
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### backendUrl?
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
optional backendUrl?: string;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Defined in: [src/facets/mobile/mobile.specification.ts:89](https://github.com/jterrazz/package-test/blob/main/src/facets/mobile/mobile.specification.ts#L89)
|
|
24
|
+
|
|
25
|
+
Base URL of the declared stub backend — present only with the
|
|
26
|
+
`backend` option. The caller injects it into its own bundler env
|
|
27
|
+
(e.g. `EXPO_PUBLIC_API_URL`); the framework never touches the bundler.
|
|
28
|
+
|
|
29
|
+
***
|
|
30
|
+
|
|
31
|
+
### cleanup
|
|
32
|
+
|
|
33
|
+
```ts
|
|
34
|
+
cleanup: () => Promise<void>;
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
Defined in: [src/facets/mobile/mobile.specification.ts:91](https://github.com/jterrazz/package-test/blob/main/src/facets/mobile/mobile.specification.ts#L91)
|
|
38
|
+
|
|
39
|
+
End the driver session, stop the appium server and the stub backend.
|
|
40
|
+
|
|
41
|
+
#### Returns
|
|
42
|
+
|
|
43
|
+
`Promise`\<`void`\>
|
|
44
|
+
|
|
45
|
+
***
|
|
46
|
+
|
|
47
|
+
### mobile
|
|
48
|
+
|
|
49
|
+
```ts
|
|
50
|
+
mobile: MobileSpecification;
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Defined in: [src/facets/mobile/mobile.specification.ts:92](https://github.com/jterrazz/package-test/blob/main/src/facets/mobile/mobile.specification.ts#L92)
|
|
54
|
+
|
|
55
|
+
***
|
|
56
|
+
|
|
57
|
+
### udid
|
|
58
|
+
|
|
59
|
+
```ts
|
|
60
|
+
udid: string;
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
Defined in: [src/facets/mobile/mobile.specification.ts:94](https://github.com/jterrazz/package-test/blob/main/src/facets/mobile/mobile.specification.ts#L94)
|
|
64
|
+
|
|
65
|
+
The resolved simulator UDID the specs run against.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MobileScenario
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MobileScenario = (visitor) => Promise<void>;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/ports/device.port.ts:60](https://github.com/jterrazz/package-test/blob/main/src/model/ports/device.port.ts#L60)
|
|
9
|
+
|
|
10
|
+
The behavior of an open — the When of the spec; assertions stay in the Then.
|
|
11
|
+
|
|
12
|
+
## Parameters
|
|
13
|
+
|
|
14
|
+
| Parameter | Type |
|
|
15
|
+
| ------ | ------ |
|
|
16
|
+
| `visitor` | [`MobileVisitor`](MobileVisitor.md) |
|
|
17
|
+
|
|
18
|
+
## Returns
|
|
19
|
+
|
|
20
|
+
`Promise`\<`void`\>
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
<!-- GENERATED by `typescript docs` — DO NOT EDIT -->
|
|
2
|
+
# Type Alias: MobileSpecification
|
|
3
|
+
|
|
4
|
+
```ts
|
|
5
|
+
type MobileSpecification = object;
|
|
6
|
+
```
|
|
7
|
+
|
|
8
|
+
Defined in: [src/model/chain/builder.ts:332](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L332)
|
|
9
|
+
|
|
10
|
+
The `mobile` facet — screen chain entry handed out by
|
|
11
|
+
`specification.mobile()`. `.open()` is the single, terminal action: it
|
|
12
|
+
terminates and relaunches the app (deterministic fresh state), applies the
|
|
13
|
+
deep link, runs the scenario, and captures the final screen.
|
|
14
|
+
|
|
15
|
+
## Properties
|
|
16
|
+
|
|
17
|
+
### intercept
|
|
18
|
+
|
|
19
|
+
```ts
|
|
20
|
+
intercept: InterceptMethod<MobileSpecification>;
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
Defined in: [src/model/chain/builder.ts:337](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L337)
|
|
24
|
+
|
|
25
|
+
Declare the chain's backend contracts — served by the declared stub
|
|
26
|
+
backend (requires the runner's `backend` option). Multiple calls append.
|
|
27
|
+
|
|
28
|
+
***
|
|
29
|
+
|
|
30
|
+
### open
|
|
31
|
+
|
|
32
|
+
```ts
|
|
33
|
+
open: (deepLink?, scenario?) => Promise<ScreenResult>;
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Defined in: [src/model/chain/builder.ts:344](https://github.com/jterrazz/package-test/blob/main/src/model/chain/builder.ts#L344)
|
|
37
|
+
|
|
38
|
+
Relaunch the app and resolve with the captured screen. With a deep
|
|
39
|
+
link, the app opens on it; with a scenario, the visitor interacts
|
|
40
|
+
first (the When) and the capture reflects the FINAL screen state.
|
|
41
|
+
|
|
42
|
+
#### Parameters
|
|
43
|
+
|
|
44
|
+
| Parameter | Type |
|
|
45
|
+
| ------ | ------ |
|
|
46
|
+
| `deepLink?` | `string` |
|
|
47
|
+
| `scenario?` | [`MobileScenario`](MobileScenario.md) |
|
|
48
|
+
|
|
49
|
+
#### Returns
|
|
50
|
+
|
|
51
|
+
`Promise`\<[`ScreenResult`](../interfaces/ScreenResult.md)\>
|