@unotest/web 0.54.0 → 0.56.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.
Files changed (48) hide show
  1. package/.claude/skills/write-e2e-test/SKILL.md +30 -7
  2. package/.claude/skills/write-e2e-test-ground/SKILL.md +6 -5
  3. package/CHANGELOG.md +160 -3
  4. package/README.md +24 -6
  5. package/dist/config/schema.d.ts +25 -19
  6. package/dist/config/schema.js +1 -1
  7. package/dist/driver/index.d.ts +8 -2
  8. package/dist/driver/index.js +1 -1
  9. package/dist/dsl/index.d.ts +29 -82
  10. package/dist/dsl/index.js +1 -1
  11. package/dist/dsl/v8/scenario-worker.js +1 -1
  12. package/dist/dsl/web-dsl-language-service.d.ts +30 -3
  13. package/dist/dsl/web-dsl-language-service.js +1 -1
  14. package/dist/inspection/page-inject.d.ts +31 -7
  15. package/dist/inspection/page-inject.js +80 -19
  16. package/dist/{interfaces-BU-PQbt4.d.ts → interfaces-BiGd3BdD.d.ts} +29 -4
  17. package/dist/{linter-BpaIstU3.d.ts → linter-DIAb0JOB.d.ts} +8 -0
  18. package/dist/mcp/server.js +1 -1
  19. package/dist/runner/cli.d.ts +1 -1
  20. package/dist/runner/cli.js +1 -1
  21. package/dist/runner/init/chrome-probe.js +1 -1
  22. package/dist/runner/init.js +1 -1
  23. package/dist/runner/install-chromium.js +1 -1
  24. package/dist/runner/prepare-fix.js +1 -1
  25. package/dist/runner/scaffold-workspace.js +1 -1
  26. package/dist/runner/serve-fixture.js +1 -1
  27. package/dist/runner/web-runner-adapter.js +1 -1
  28. package/dist/scenario-variables-B-ULUTHt.d.ts +88 -0
  29. package/examples/idioms/README.md +16 -0
  30. package/examples/idioms/animations-list.js +24 -0
  31. package/examples/idioms/api-call-timeout.js +14 -0
  32. package/examples/idioms/background-tab.js +24 -0
  33. package/examples/idioms/clipboard-paste.js +25 -0
  34. package/examples/idioms/computed-style.js +21 -0
  35. package/examples/idioms/image-size.js +20 -0
  36. package/examples/idioms/never-appears.js +20 -0
  37. package/examples/idioms/never-condition.js +24 -0
  38. package/examples/idioms/page-code-function.js +18 -0
  39. package/examples/idioms/select-by-label.js +22 -0
  40. package/examples/idioms/wait-enabled.js +21 -0
  41. package/examples/idioms/wait-for-animations.js +16 -0
  42. package/examples/idioms/wait-until-value.js +32 -0
  43. package/guides/agent-integration.md +43 -5
  44. package/guides/dsl-reference.md +589 -34
  45. package/llms.txt +26 -6
  46. package/package.json +9 -8
  47. package/types/unotest-dsl.d.ts +36 -22
  48. package/types/unotest-lib.d.ts +5 -3
package/llms.txt CHANGED
@@ -57,7 +57,7 @@ Full reference: https://docs.unotest.com/reference/dsl/
57
57
  - `waitForText(text, { exact?, state?, timeoutMs? })` · options `{state?, exact?, timeoutMs?}` (alias: timeout → timeoutMs) — Wait until `text` appears anywhere on the page.
58
58
  - `waitForCount(locator, count, { exact?, timeoutMs? })` · options `{exact?, timeoutMs?}` (alias: timeout → timeoutMs) — Poll until the locator matches AT LEAST `count` elements (`{exact: true}` for exactly).
59
59
  - `waitForAnimations(locator, { timeoutMs? })` · options `{timeoutMs?}` (alias: timeout → timeoutMs) · since 0.47.0 — Wait until the element and its descendants have no animation still running — a dialog done fading in, a card done sliding.
60
- - `pause(ms)` — Explicit delay.
60
+ - `pause(ms, reason?)` — Fixed delay.
61
61
  - `waitForDownload(options?) → { path, name }` · options `{timeoutMs?, name?}` · since 0.45.0 — The first file the page downloaded that the scenario has not taken yet, saved with the run: `path` is absolute (read it with waitForFile), `name` is the name the site suggested.
62
62
  - `clockFreeze(iso)` · since 0.44.0 — Stop time on the page at an ISO instant: `Date` reads it and no timer fires until clockTick / clockRun.
63
63
  - `clockTick(ms)` · since 0.44.0 — Move frozen time forward by ms, firing every timer due in it.
@@ -135,7 +135,8 @@ Full reference: https://docs.unotest.com/reference/dsl/
135
135
  - `setLocalStorage(key, value)` — Set a localStorage item.
136
136
  - `getLocalStorage(key) → string` — Read a localStorage item ("" if missing).
137
137
  - `setCookie(name, value, options?)` · options `{domain?, path?, expires?, httpOnly?, secure?, sameSite?}` — Set a cookie (options: path, domain, expires, httpOnly, secure, sameSite).
138
- - `getCookie(name) → string` — Read a cookie value ("" if missing).
138
+ - `getCookie(name, options?) → string` · options `{page?}` — Read a cookie value ("" if missing — hasCookie tells it from an empty one).
139
+ - `hasCookie(name, options?) → boolean` · options `{page?}` · since 0.56.0 — Whether the cookie is there at all — the probe that tells a missing cookie from an empty value.
139
140
 
140
141
  ## Tabs, frames, contexts, extensions
141
142
 
@@ -179,10 +180,11 @@ Full reference: https://docs.unotest.com/reference/dsl/
179
180
  - `upload(path, options?) → UploadRef` · options `{field?, fields?}` — Multipart marker for apiCall's body (options: field, fields).
180
181
  - `mockRoute(glob, response)` · since 0.45.0 — From now on, requests matching `glob` (a Playwright URL glob: `**/api/items*`) get a fixed answer: `{status?, body?, headers?, contentType?}` (an object body goes as JSON), `{abort: true, record?}` or `{continue: true}` (to the network).
181
182
  - `unmockRoute(glob?)` · since 0.45.0 — Take off the mock at `glob`, or every mock when called without one.
182
- - `waitForRequest(glob, { timeoutMs? }) → { url, method, headers, postData, postDataJson }` · options `{timeoutMs?}` · since 0.45.0 — Wait for a request matching `glob` and return it; `postDataJson` is the body read as JSON (null when it is not).
183
+ - `waitForRequest(glob, { timeoutMs?, method? }) → { url, method, headers, postData, postDataJson }` · options `{timeoutMs?, method?}` · since 0.45.0 — Wait for a request matching `glob` and return it; `postDataJson` is the body read as JSON (null when it is not).
184
+ - `waitForResponse(glob, { status?, method?, since?, timeoutMs? }) → { url, method, status, ok, headers, json, text, truncated?, mocked? }` · options `{status?, method?, since?, timeoutMs?}` · since 0.55.0 — Wait for the answer to a request matching `glob` and return it: `headers` of the response (names in lower case), `json` (null when the body is not JSON, was not read or was cut), `text` (text or JSON bodies of `fetch` / `xhr`, at most 64 KB, then `truncated`).
183
185
  - `waitForWebSocket(glob, { timeoutMs? }) → { url }` · options `{timeoutMs?}` · since 0.51.0 — Wait until the active page has opened a WebSocket whose URL matches `glob` (a Playwright URL glob: `**/ws`, `ws://localhost:*/live`) and return its URL.
184
- - `networkEntries({ since?, glob? }) → [{ url, method, status, ok, failureText?, mocked?, requestJson, responseJson, responseText, truncated?, at }]` · options `{since?, glob?}` · since 0.53.0 — What the active page requested and was answered, oldest first: the status and, for `fetch` / `xhr` with a text or JSON content type, the bodies (`requestJson` as `postDataJson` of `waitForRequest`; `responseJson` is null when the body is not JSON; at most 64 KB each, then `truncated`).
185
- - `assertNoRequest(glob, { since? })` · options `{since?}` · since 0.45.0 — FAIL if the recording abort at `glob` — mockRoute(glob, {abort: true, record: true}) — stopped any request; with `since` (epoch ms, from nowMs()) only from then on.
186
+ - `networkEntries({ since?, glob? }) → [{ url, method, status, ok, headers, failureText?, mocked?, requestJson, responseJson, responseText, truncated?, at }]` · options `{since?, glob?}` · since 0.53.0 — What the active page requested and was answered, oldest first: the status and, for `fetch` / `xhr` with a text or JSON content type, the bodies (`requestJson` as `postDataJson` of `waitForRequest`; `responseJson` is null when the body is not JSON; at most 64 KB each, then `truncated`).
187
+ - `assertNoRequest(glob, { since?, method? })` · options `{since?, method?}` · since 0.45.0 — FAIL if the recording abort at `glob` — mockRoute(glob, {abort: true, record: true}) — stopped any request; with `since` (epoch ms, from nowMs()) only from then on, with `method` (`'POST'`, any case) only requests of that method.
186
188
  - `openTerminal(app?, { host?, leaveOpen?, env?, cwd?, shell?, cols?, rows?, term?, locale?, cleanProfile? }) → number` · options `{host?, leaveOpen?, env?, cwd?, shell?, cols?, rows?, term?, locale?, cleanProfile?}` · since 0.51.0 — Open a terminal and make it the one the terminal steps act on; returns its index for setTerminal.
187
189
  - `setTerminal(index)` · since 0.51.0 — Make the terminal `index` (from openTerminal) the one the terminal steps act on.
188
190
  - `closeTerminal()` · since 0.51.0 — Close the active terminal and stop what runs in it: HUP to the processes on its tty and their children, KILL for those that ignore it; a note lists them.
@@ -209,7 +211,7 @@ Full reference: https://docs.unotest.com/reference/dsl/
209
211
 
210
212
  ## Diagnostics
211
213
 
212
- - `screenshot(name?, { fullPage? }) → string` · options `{fullPage?}` — Capture the active page into the run's artifact dir; returns the project-relative path.
214
+ - `screenshot(name?, { fullPage?, timeoutMs? }) → string` · options `{fullPage?, timeoutMs?}` — Capture the active page into the run's artifact dir; returns the project-relative path.
213
215
  - `note(label, value)` · since 0.31.0 — Attach a labelled value to the current step: shown in the viewer under the step (also after the run) and kept in the run journal.
214
216
  - `consoleEntries({ level?, since? }) → [{ level, text, url }]` · options `{level?, since?}` · since 0.46.0 — What the active page wrote to its console, oldest first: `level` is log, info, warn, error or debug.
215
217
  - `pageErrors({ since? }) → [{ message, stack }]` · options `{since?}` · since 0.46.0 — Errors the active page threw and nothing caught (an uncaught exception, a rejected promise), oldest first; `stack` is empty when the browser gave none.
@@ -226,3 +228,21 @@ Full reference: https://docs.unotest.com/reference/dsl/
226
228
 
227
229
  - `evaluate(js, arg?) → any` — Run raw JS in the page context.
228
230
  - `evaluateOnLocator(locator, js, ...args) → any` · since 0.45.0 — Like evaluate, on the matched element: the body is called with the element, then the extra arguments by the same rule (`(el, x) => …`, two or more → `(el, [a, b]) => …`).
231
+
232
+ ## Idioms
233
+
234
+ One scenario per habit and the typed step that replaces it; `npx @unotest/web init` writes them to `unotest/e2e/examples/idioms/`.
235
+
236
+ - animations-list — what is moving on this element? → `unotest/e2e/examples/idioms/animations-list.js`
237
+ - api-call-timeout — give one HTTP call a time limit. → `unotest/e2e/examples/idioms/api-call-timeout.js`
238
+ - background-tab — work in one tab while another is in front. → `unotest/e2e/examples/idioms/background-tab.js`
239
+ - clipboard-paste — paste into a field. → `unotest/e2e/examples/idioms/clipboard-paste.js`
240
+ - computed-style — read a CSS value. → `unotest/e2e/examples/idioms/computed-style.js`
241
+ - image-size — is the image loaded, and how big is it? → `unotest/e2e/examples/idioms/image-size.js`
242
+ - never-appears — something must NOT appear. → `unotest/e2e/examples/idioms/never-appears.js`
243
+ - never-condition — a condition must never hold. → `unotest/e2e/examples/idioms/never-condition.js`
244
+ - page-code-function — run code in the page with a value from the test. → `unotest/e2e/examples/idioms/page-code-function.js`
245
+ - select-by-label — pick an option by the text the user sees. → `unotest/e2e/examples/idioms/select-by-label.js`
246
+ - wait-enabled — wait until a button can be pressed. → `unotest/e2e/examples/idioms/wait-enabled.js`
247
+ - wait-for-animations — wait for an animation to end. → `unotest/e2e/examples/idioms/wait-for-animations.js`
248
+ - wait-until-value — poll until a value is good enough, and keep it. → `unotest/e2e/examples/idioms/wait-until-value.js`
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@unotest/web",
3
- "version": "0.54.0",
3
+ "version": "0.56.0",
4
4
  "description": "AI-native E2E testing for web applications. MCP server (run_test / step / resume / inspect_runtime / agent_fix) + CLI runner + JavaScript DSL scenarios on a sandboxed AST engine + semantic DOM snapshots.",
5
5
  "license": "MIT",
6
6
  "publishConfig": {
@@ -66,6 +66,7 @@
66
66
  "examples/fixtures/break-fix-app/index.html",
67
67
  "examples/fixtures/break-fix-app/README.md",
68
68
  "examples/fixtures/break-fix-app/serve.mjs",
69
+ "examples/idioms",
69
70
  "src/mcp/prompts",
70
71
  "types",
71
72
  ".claude/skills",
@@ -88,11 +89,11 @@
88
89
  "tsx": "^4.19.2",
89
90
  "yaml": "^2.6.0",
90
91
  "zod": "^3.23.8",
91
- "@unotest/core": "^0.54.0",
92
- "@unotest/dsl": "^0.54.0",
93
- "@unotest/protocol": "^0.54.0",
94
- "@unotest/viewer": "^0.54.0",
95
- "@unotest/grounder-client": "^0.54.0"
92
+ "@unotest/core": "^0.56.0",
93
+ "@unotest/dsl": "^0.56.0",
94
+ "@unotest/viewer": "^0.56.0",
95
+ "@unotest/grounder-client": "^0.56.0",
96
+ "@unotest/protocol": "^0.56.0"
96
97
  },
97
98
  "optionalDependencies": {
98
99
  "node-pty": "1.2.0-beta.15"
@@ -102,8 +103,8 @@
102
103
  "javascript-obfuscator": "^4.1.1",
103
104
  "tsup": "^8.5.1",
104
105
  "typescript": "^5.7.2",
105
- "@unotest/judge": "^0.54.0",
106
- "@unotest/grounder": "^0.54.0"
106
+ "@unotest/grounder": "^0.56.0",
107
+ "@unotest/judge": "^0.56.0"
107
108
  },
108
109
  "peerDependencies": {
109
110
  "typescript": ">=5.0.0 <7"
@@ -250,7 +250,7 @@ declare function assertJudge(locator: Locator, rubric: string): void;
250
250
  *
251
251
  * The page (or an element) against the PNG baseline unotest/e2e/<scenario>.screenshots/<name>.png. A pixel differs when any channel differs by more than threshold (default 32); fails when the share of differing pixels is MORE than maxDiffRatio (default 0). mask: locators, ignore: rectangles in baseline pixels — both left out of the comparison. No baseline: fails and saves the snapshot as a candidate; accept with e2e --update-screenshots. On failure the run keeps expected / actual / diff.
252
252
  */
253
- declare function assertScreenshot(nameOrLocator: any, nameOrOptions?: any, options?: { maxDiffRatio?: number; threshold?: number; mask?: unknown[]; ignore?: unknown[]; fullPage?: boolean }): void;
253
+ declare function assertScreenshot(nameOrLocator: any, nameOrOptions?: string | { maxDiffRatio?: number; threshold?: number; mask?: unknown[]; ignore?: unknown[]; fullPage?: boolean }, options?: { maxDiffRatio?: number; threshold?: number; mask?: unknown[]; ignore?: unknown[]; fullPage?: boolean }): void;
254
254
 
255
255
  /**
256
256
  * assertEqual(actual, expected)
@@ -337,11 +337,11 @@ declare function nth(receiver: Locator, index: number): Locator;
337
337
  declare function randomNth(receiver: Locator): Locator;
338
338
 
339
339
  /**
340
- * screenshot(name?, { fullPage? }) → string
340
+ * screenshot(name?, { fullPage?, timeoutMs? }) → string
341
341
  *
342
- * Capture the active page into the run's artifact dir; returns the project-relative path. For a PNG after EVERY step without calling it, set UNOTEST_STEP_SCREENSHOTS=1 in the run's environment.
342
+ * Capture the active page into the run's artifact dir; returns the project-relative path. Evidence, not a check: a capture that runs out of time (`timeoutMs`, default the context's `defaultTimeoutMs`) returns null, warns on the step and files the reason as `<NNN>-<name>-screenshot-error.txt`; the test goes on. For a PNG after EVERY step without calling it, set UNOTEST_STEP_SCREENSHOTS=1 in the run's environment.
343
343
  */
344
- declare function screenshot(name?: string, options?: { fullPage?: boolean }): string;
344
+ declare function screenshot(name?: string, options?: { fullPage?: boolean; timeoutMs?: number }): string;
345
345
 
346
346
  /**
347
347
  * note(label, value)
@@ -780,7 +780,7 @@ declare function env(name: string, fallback?: any): any;
780
780
  /**
781
781
  * shell(cmd, ...args, options?) → { stdout, stderr, code }
782
782
  *
783
- * Run a binary (execFile, no shell interpretation). cwd from config `shellCwd`. Non-zero exit FAILS the step unless {allowNonZero: true}; wall-clock budget {timeoutMs} (default 120s).
783
+ * Run a binary (execFile, no shell interpretation). cwd from config `shellCwd`. Non-zero exit FAILS the step unless {allowNonZero: true}; wall-clock budget {timeoutMs} (default 120s); one longer than what is left of the test's budget warns before the command starts, with the setTestTimeout() that fits.
784
784
  */
785
785
  declare function shell(cmd: string, ...args: unknown[]): any;
786
786
 
@@ -789,14 +789,14 @@ declare function shell(cmd: string, ...args: unknown[]): any;
789
789
  *
790
790
  * Poll a file (relative to config `shellCwd`) until it exists / contains a substring or regex, then return its content. options: {timeoutMs} (default 20s). The waitForText of background processes.
791
791
  */
792
- declare function waitForFile(path: string, pattern?: any, options?: { timeoutMs?: number }): string;
792
+ declare function waitForFile(path: string, pattern?: string | RegExp | { timeoutMs?: number }, options?: { timeoutMs?: number }): string;
793
793
 
794
794
  /**
795
795
  * assertNoFile(path, pattern?, { withinMs })
796
796
  *
797
797
  * Mirror of waitForFile with inverted polarity: FAIL the moment the file exists (and matches pattern); pass when the window elapsed clean. withinMs required.
798
798
  */
799
- declare function assertNoFile(path: string, pattern?: any, options?: { withinMs?: number }): void;
799
+ declare function assertNoFile(path: string, pattern?: string | RegExp | { withinMs?: number }, options?: { withinMs?: number }): void;
800
800
 
801
801
  /**
802
802
  * waitForJsonLine(path, filter, options?) → object
@@ -1011,16 +1011,23 @@ declare function getLocalStorage(key: string): string;
1011
1011
  /**
1012
1012
  * setCookie(name, value, options?)
1013
1013
  *
1014
- * Set a cookie (options: path, domain, expires, httpOnly, secure, sameSite).
1014
+ * Set a cookie (options: path, domain, expires, httpOnly, secure, sameSite). A cookie the browser does not keep fails the step — sameSite: 'None' needs secure: true; one set with expires in the past is a deletion and passes.
1015
1015
  */
1016
1016
  declare function setCookie(name: string, value: string, options?: { domain?: string; path?: string; expires?: number; httpOnly?: boolean; secure?: boolean; sameSite?: string }): void;
1017
1017
 
1018
1018
  /**
1019
- * getCookie(name) → string
1019
+ * getCookie(name, options?) → string
1020
1020
  *
1021
- * Read a cookie value ("" if missing).
1021
+ * Read a cookie value ("" if missing — hasCookie tells it from an empty one). Default: the browser context's jar, every domain and path, httpOnly too. {page: true}: what the page's script is given (document.cookie of the page or the entered frame) — no httpOnly cookies, none for another path or domain.
1022
1022
  */
1023
- declare function getCookie(name: string): string;
1023
+ declare function getCookie(name: string, options?: { page?: any }): string;
1024
+
1025
+ /**
1026
+ * hasCookie(name, options?) → boolean
1027
+ *
1028
+ * Whether the cookie is there at all — the probe that tells a missing cookie from an empty value. Same {page: true} as getCookie.
1029
+ */
1030
+ declare function hasCookie(name: string, options?: { page?: any }): boolean;
1024
1031
 
1025
1032
  /**
1026
1033
  * waitFor(locator, { state?, timeoutMs? })
@@ -1051,11 +1058,11 @@ declare function waitForCount(locator: Locator, count: number, options?: { timeo
1051
1058
  declare function waitForAnimations(locator: Locator, options?: { timeout?: number; timeoutMs?: number }): void;
1052
1059
 
1053
1060
  /**
1054
- * pause(ms)
1061
+ * pause(ms, reason?)
1055
1062
  *
1056
- * Explicit delay. Discouraged — the linter wants a `// reason:` comment. Prefer a `waitFor*`.
1063
+ * Fixed delay. `pause(ms, 'reason')` is a wait the test means (a task that waits 20 minutes by its rules): the reason is printed on the step and the linter leaves it be. A bare `pause(ms)` is reported by lint:pause-explicit — prefer a `waitFor*`. Raise the test's budget with setTestTimeout() for a long one.
1057
1064
  */
1058
- declare function pause(ms: number): void;
1065
+ declare function pause(ms: number, reason?: string): void;
1059
1066
 
1060
1067
  /**
1061
1068
  * waitForDownload(options?) → { path, name }
@@ -1100,11 +1107,18 @@ declare function mockRoute(glob: string, response: any): void;
1100
1107
  declare function unmockRoute(glob?: string): void;
1101
1108
 
1102
1109
  /**
1103
- * waitForRequest(glob, { timeoutMs? }) → { url, method, headers, postData, postDataJson }
1110
+ * waitForRequest(glob, { timeoutMs?, method? }) → { url, method, headers, postData, postDataJson }
1111
+ *
1112
+ * Wait for a request matching `glob` and return it; `postDataJson` is the body read as JSON (null when it is not). On a mocked mask it also finds a request sent before the call, each one returned once; on any other mask only requests from the call on. `{method}` (`'POST'`, any case) takes only a request of that method; one of another method stays for the next wait. Default timeout 20 s.
1113
+ */
1114
+ declare function waitForRequest(glob: string, options?: { timeoutMs?: number; method?: string }): any;
1115
+
1116
+ /**
1117
+ * waitForResponse(glob, { status?, method?, since?, timeoutMs? }) → { url, method, status, ok, headers, json, text, truncated?, mocked? }
1104
1118
  *
1105
- * Wait for a request matching `glob` and return it; `postDataJson` is the body read as JSON (null when it is not). On a mocked mask it also finds a request sent before the call, each one returned once; on any other mask only requests from the call on. Default timeout 20 s.
1119
+ * Wait for the answer to a request matching `glob` and return it: `headers` of the response (names in lower case), `json` (null when the body is not JSON, was not read or was cut), `text` (text or JSON bodies of `fetch` / `xhr`, at most 64 KB, then `truncated`). It looks at requests sent from the start of the last call that acted on the page (a click, fill, press, goto, evaluate…); a log, a note or an assertion in between moves nothing, and an answer that came before the call is found. Of those, the one sent first that no earlier waitForResponse returned. `{status}` skips other statuses, `{method}` other methods; a request that failed is no answer. `{since}` (epoch ms from nowMs()) sets the start instead — needed when another action came between the one that sent the request and the wait. A timeout fails the test and names the answers it passed over. The answer is in, not drawn: for "never appears" follow with assertNeverAppears. Default timeout 20 s.
1106
1120
  */
1107
- declare function waitForRequest(glob: string, options?: { timeoutMs?: number }): any;
1121
+ declare function waitForResponse(glob: string, options?: { status?: number; method?: string; since?: number; timeoutMs?: number }): any;
1108
1122
 
1109
1123
  /**
1110
1124
  * waitForWebSocket(glob, { timeoutMs? }) → { url }
@@ -1114,18 +1128,18 @@ declare function waitForRequest(glob: string, options?: { timeoutMs?: number }):
1114
1128
  declare function waitForWebSocket(glob: string, options?: { timeoutMs?: number }): any;
1115
1129
 
1116
1130
  /**
1117
- * networkEntries({ since?, glob? }) → [{ url, method, status, ok, failureText?, mocked?, requestJson, responseJson, responseText, truncated?, at }]
1131
+ * networkEntries({ since?, glob? }) → [{ url, method, status, ok, headers, failureText?, mocked?, requestJson, responseJson, responseText, truncated?, at }]
1118
1132
  *
1119
- * What the active page requested and was answered, oldest first: the status and, for `fetch` / `xhr` with a text or JSON content type, the bodies (`requestJson` as `postDataJson` of `waitForRequest`; `responseJson` is null when the body is not JSON; at most 64 KB each, then `truncated`). Other resources have a status only; a request that failed has status 0 and `failureText`. Recorded from the moment the page opened, but a response is entered when it finishes, so wait for it. options: {since} (epoch ms of sending, from nowMs()), {glob} (a mask; one starting with `/` is read on the site's origin).
1133
+ * What the active page requested and was answered, oldest first: the status and, for `fetch` / `xhr` with a text or JSON content type, the bodies (`requestJson` as `postDataJson` of `waitForRequest`; `responseJson` is null when the body is not JSON; at most 64 KB each, then `truncated`). Other resources have a status only; `headers` are the response's (names in lower case, empty for a request that failed); a request that failed has status 0 and `failureText`. Recorded from the moment the page opened, but a response is entered when it finishes, so wait for it. options: {since} (epoch ms of sending, from nowMs()), {glob} (a mask; one starting with `/` is read on the site's origin).
1120
1134
  */
1121
1135
  declare function networkEntries(options?: { since?: number; glob?: any }): any;
1122
1136
 
1123
1137
  /**
1124
- * assertNoRequest(glob, { since? })
1138
+ * assertNoRequest(glob, { since?, method? })
1125
1139
  *
1126
- * FAIL if the recording abort at `glob` — mockRoute(glob, {abort: true, record: true}) — stopped any request; with `since` (epoch ms, from nowMs()) only from then on. A mask without a recording abort is an error, not a pass.
1140
+ * FAIL if the recording abort at `glob` — mockRoute(glob, {abort: true, record: true}) — stopped any request; with `since` (epoch ms, from nowMs()) only from then on, with `method` (`'POST'`, any case) only requests of that method. A mask without a recording abort is an error, not a pass.
1127
1141
  */
1128
- declare function assertNoRequest(glob: string, options?: { since?: number }): void;
1142
+ declare function assertNoRequest(glob: string, options?: { since?: number; method?: string }): void;
1129
1143
 
1130
1144
  /**
1131
1145
  * openTerminal(app?, { host?, leaveOpen?, env?, cwd?, shell?, cols?, rows?, term?, locale?, cleanProfile? }) → number
@@ -1,6 +1,8 @@
1
- // GENERATED by scripts/build-dsl-types.ts from TypeScript's es2022 lib,
2
- // cut down to the scenario library (libraryCatalog) — do not edit.
3
- // The jsconfig sets noLib: these are the editor's only globals.
1
+ // DEPRECATED — run `npx @unotest/web types`.
2
+ // The editor typings now use JavaScript's own library: a scenario runs as
3
+ // plain JavaScript. This file is no longer generated or updated; it stays
4
+ // for one release so a jsconfig that still names it keeps its globals
5
+ // until `types` rewrites it.
4
6
 
5
7
  interface Boolean {}
6
8
  interface Function {}