@unotest/web 0.49.2 → 0.50.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/.claude/skills/write-e2e-test/SKILL.md +6 -7
- package/.claude/skills/write-e2e-test-ground/SKILL.md +6 -7
- package/CHANGELOG.md +242 -3
- package/dist/config/schema.d.ts +11 -11
- package/dist/config/schema.js +1 -1
- package/dist/driver/index.d.ts +4 -2
- package/dist/driver/index.js +1 -1
- package/dist/dsl/index.d.ts +41 -28
- package/dist/dsl/index.js +1 -1
- package/dist/dsl/web-dsl-language-service.d.ts +18 -6
- package/dist/dsl/web-dsl-language-service.js +1 -1
- package/dist/inspection/page-inject.d.ts +1 -1
- package/dist/{interfaces-mlRtu8mL.d.ts → interfaces--zgFOUB6.d.ts} +7 -0
- package/dist/{linter-RrjB1n9R.d.ts → linter-Ci17V2Sr.d.ts} +13 -5
- package/dist/mcp/server.js +1 -1
- package/dist/runner/cli.d.ts +1 -1
- package/dist/runner/cli.js +1 -1
- package/dist/runner/init/chrome-probe.js +1 -1
- package/dist/runner/init.js +1 -1
- package/dist/runner/install-chromium.js +1 -1
- package/dist/runner/prepare-fix.js +1 -1
- package/dist/runner/scaffold-workspace.js +1 -1
- package/dist/runner/serve-fixture.js +1 -1
- package/dist/runner/web-runner-adapter.js +1 -1
- package/guides/dsl-reference.md +337 -260
- package/package.json +8 -8
- package/types/unotest-dsl.d.ts +88 -71
- package/types/unotest-lib.d.ts +1289 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { InjectedDomHelpers } from '@unotest/grounder-client/dom-walker';
|
|
2
2
|
import { PickerMode } from '@unotest/protocol';
|
|
3
|
-
import { E as ElementHint } from '../interfaces
|
|
3
|
+
import { E as ElementHint } from '../interfaces--zgFOUB6.js';
|
|
4
4
|
import '../config/schema.js';
|
|
5
5
|
import 'zod';
|
|
6
6
|
|
|
@@ -329,6 +329,13 @@ interface WebDriver {
|
|
|
329
329
|
* `finally` blocks).
|
|
330
330
|
*/
|
|
331
331
|
close(): Promise<void>;
|
|
332
|
+
/**
|
|
333
|
+
* The error a scenario should see for one its call got from the browser
|
|
334
|
+
* library: that library's own classes (Playwright's timeout) as ours, so
|
|
335
|
+
* whether the run failed or errored is decided by a class we own. Any
|
|
336
|
+
* other error is returned as it is.
|
|
337
|
+
*/
|
|
338
|
+
translateError(e: unknown): unknown;
|
|
332
339
|
/**
|
|
333
340
|
* Collaborative debug (Slice 1). `wsEndpoint()` returns the Playwright
|
|
334
341
|
* `connect()` endpoint when launched in share mode (else undefined);
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import {
|
|
1
|
+
import { ESTree } from '@unotest/dsl';
|
|
2
2
|
|
|
3
3
|
type LintSeverity = 'error' | 'warning' | 'info';
|
|
4
4
|
interface LintDiagnostic {
|
|
@@ -10,11 +10,15 @@ interface LintDiagnostic {
|
|
|
10
10
|
/** This diagnostic must stop a run before anything is driven, not just
|
|
11
11
|
* print. A rule sets it when proceeding would act on the WRONG target
|
|
12
12
|
* — the steps before the offending one would run against the wrong
|
|
13
|
-
* host and leave their side effects there. The CLI
|
|
14
|
-
*
|
|
15
|
-
*
|
|
13
|
+
* host and leave their side effects there. The CLI refuses on it at any
|
|
14
|
+
* severity (its pre-run lint otherwise stops on some errors only:
|
|
15
|
+
* `cliPreRunLint`); run_test already gates on errors and is
|
|
16
|
+
* unaffected. Rules opt in themselves, so no frontend
|
|
16
17
|
* keeps a list of rule ids. */
|
|
17
18
|
blocksRun?: true;
|
|
19
|
+
/** Absolute path of the file the line is in, when that is not the file
|
|
20
|
+
* being linted or run: a helper of `_helpers/` the run loads with it. */
|
|
21
|
+
file?: string;
|
|
18
22
|
}
|
|
19
23
|
/** What the linter may ask about external variables (bare UPPER_SNAKE
|
|
20
24
|
* identifiers). A predicate, not a list, because the two callers hold
|
|
@@ -23,6 +27,9 @@ interface LintDiagnostic {
|
|
|
23
27
|
* the ambient shell) — and the run-time store already answers `has`. */
|
|
24
28
|
interface ExternalVariableLookup {
|
|
25
29
|
has(name: string): boolean;
|
|
30
|
+
/** Why NAME is refused although the environment may hold it — the
|
|
31
|
+
* runner's own credential. Absent on a lookup that cannot tell. */
|
|
32
|
+
denial?(name: string): string | undefined;
|
|
26
33
|
/** Where `has` looked, for the diagnostic (`unotest/.env, unotest/.env.dev (no such file)`). */
|
|
27
34
|
describeSources?(): string;
|
|
28
35
|
/** Host policy of the environment this lookup describes (#199) — it
|
|
@@ -60,6 +67,7 @@ interface LintOptions {
|
|
|
60
67
|
* summary alive — and anchor it on a line the caller then drops. */
|
|
61
68
|
lintOkLines?: ReadonlySet<number>;
|
|
62
69
|
}
|
|
63
|
-
|
|
70
|
+
/** Lint a parsed file (`ParsedScenario.program`) or any node in one. */
|
|
71
|
+
declare function lintAst(ast: ESTree.Node, opts?: LintOptions): LintDiagnostic[];
|
|
64
72
|
|
|
65
73
|
export { type ExternalVariableLookup as E, type LintDiagnostic as L, type LintSeverity as a, type LintOptions as b, lintAst as l };
|