@swmansion/argent 0.35.1-next.1 → 0.35.1-next.11
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/bin/argent-android-devtools-0.4.0.apk +0 -0
- package/bin/darwin/argent-macos-helper +0 -0
- package/bin/darwin/ax-service +0 -0
- package/bin/darwin/tvos-ax-service +0 -0
- package/bin/darwin/tvos-hid-daemon +0 -0
- package/bin/network-inspector/network-inspector.jar +0 -0
- package/bin/tcp/ax-service +0 -0
- package/dist/cli-cmds.mjs +97 -24
- package/dist/client.js +14 -1
- package/dist/installer.mjs +362 -162
- package/dist/mcp-server.mjs +51 -9
- package/dist/tool-args.generated.d.ts +30 -0
- package/dist/tool-server.cjs +108534 -107482
- package/dylibs/libArgentAudio.dylib +0 -0
- package/dylibs/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/libKeyboardPatch.dylib +0 -0
- package/dylibs/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/macos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/macos/libNativeDevtoolsMacos.dylib +0 -0
- package/dylibs/tcp/argent-audio-feeder +0 -0
- package/dylibs/tcp/libArgentAudio.dylib +0 -0
- package/dylibs/tcp/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tcp/libKeyboardPatch.dylib +0 -0
- package/dylibs/tcp/libNativeDevtoolsIos.dylib +0 -0
- package/dylibs/tvos/libArgentInjectionBootstrap.dylib +0 -0
- package/dylibs/tvos/libKeyboardPatch.dylib +0 -0
- package/dylibs/tvos/libNativeDevtoolsIos.dylib +0 -0
- package/package.json +2 -2
- package/skills/argent-create-e2e/references/e2e-yaml.md +23 -2
- package/skills/argent-create-e2e/references/live-authoring.md +7 -0
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@swmansion/argent",
|
|
3
|
-
"version": "0.35.1-next.
|
|
3
|
+
"version": "0.35.1-next.11",
|
|
4
4
|
"mcpName": "io.github.software-mansion/argent",
|
|
5
5
|
"description": "MCP server for iOS Simulator, Android Emulator, Chromium app and Mac app control",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -98,5 +98,5 @@
|
|
|
98
98
|
"vitest": "^5.0.5",
|
|
99
99
|
"yaml": "^2.9.1"
|
|
100
100
|
},
|
|
101
|
-
"gitHead": "
|
|
101
|
+
"gitHead": "636886f1e85fd60a9b736a506b00cf0033bd6a83"
|
|
102
102
|
}
|
|
@@ -231,7 +231,15 @@ Use `when:` only for optional setup or an interstitial that reconverges:
|
|
|
231
231
|
- tap: { text: Got it }
|
|
232
232
|
```
|
|
233
233
|
|
|
234
|
-
|
|
234
|
+
Use a UI condition (`exists`, `visible`, `hidden`, or `text`), an [output check](#pass-values-between-steps), or a platform guard (`{ platform: ios|android|chromium|vega|macos }`). A run on a remote simulator matches `ios`. UI guards use the short assert grace and reject `timeout`. There is no `else` or per-step `optional`. Put separate behavioral paths in separate tests. Never place a required acceptance check inside `when:`.
|
|
235
|
+
|
|
236
|
+
## Shutdown
|
|
237
|
+
|
|
238
|
+
Put cleanup in `shutdown:` so it runs after `steps` pass or fail. A cancellation skips any remaining cleanup. A run refused before its first step skips shutdown entirely. Independent shutdown entries continue after a failure. Group dependent steps in one `when:` block so the chain stops at its first failure.
|
|
239
|
+
|
|
240
|
+
If setup can stop before writing an output, guard the cleanup with `when: { output: user.id, exists: true }` or supply a fallback the cleanup handles. A `run:` fragment queues its shutdown for the end of the run, most recently loaded first. If the fragment runs more than once, collect IDs in an output list and use `pop()` in its shutdown script. A separate `tool: e2e-execute` run performs its own cleanup.
|
|
241
|
+
|
|
242
|
+
Inspect `shutdownFailed` and the steps marked `shutdown: true` before rerunning. See [Shutdown](https://docs.swmansion.com/argent/docs/reference/e2e-yaml#shutdown).
|
|
235
243
|
|
|
236
244
|
## Composition and platform limits
|
|
237
245
|
|
|
@@ -249,12 +257,17 @@ A `run:` target is a YAML path resolved against the directory of the test file c
|
|
|
249
257
|
```yaml
|
|
250
258
|
- script: { path: ../../scripts/seed-order.mjs }
|
|
251
259
|
- script: { path: ../../scripts/seed-order.mjs, timeout: 60000 }
|
|
260
|
+
- script: { path: ../../scripts/seed-order.mjs, env: { API_TOKEN: "{{secret:API_TOKEN}}" } }
|
|
252
261
|
```
|
|
253
262
|
|
|
254
263
|
Use the map form shown above. A bare `script: scripts/seed.mjs` is invalid.
|
|
255
264
|
|
|
256
265
|
`path` is relative to the test file that contains the step. Use an `.mjs` or `.js` file, or an `.mts` or `.ts` file for TypeScript, and match the file name's letter case. `timeout` is in milliseconds, as in `e2e-add-script`.
|
|
257
266
|
|
|
267
|
+
Use top-level `env` for script defaults, step `env` for one script, and `--env NAME=value` or `e2e-execute.env` for run overrides. The last layer to set a name wins. A `run:` fragment fills missing defaults. Pass overrides explicitly to a separate `tool: e2e-execute` run.
|
|
268
|
+
|
|
269
|
+
Quote non-string YAML scalars, such as `PORT: "8080"`. Use `{{secret:NAME}}` for credentials and keep credentials out of logs. If a secret is missing, check the secret sources for the run's project root. See [Environment values](https://docs.swmansion.com/argent/docs/reference/e2e-yaml#environment-values) for the value rules and redaction limits.
|
|
270
|
+
|
|
258
271
|
`.mjs` and `.mts` are always ES modules. `.js` and `.ts` take their module type from the project's `package.json` `type` field; with no `type`, Node reads a file with `import`, `export` or top-level `await` as an ES module, and each other file as CommonJS. So prefer `.mjs` or `.mts` for a new script and use `.js` or `.ts` for a script the project already has. `.cjs` and `.cts` are invalid: under `"type": "module"`, use `import` in the script, not `require`.
|
|
259
272
|
|
|
260
273
|
Node runs `.mts` and `.ts` by removing the types, and it does not read `tsconfig.json`. In an `.mts` or `.ts` script:
|
|
@@ -267,9 +280,17 @@ If the reason says that the Node.js of the tool-server cannot run TypeScript, us
|
|
|
267
280
|
|
|
268
281
|
Over a link (`argent link` or `ARGENT_TOOLS_URL`, also to 127.0.0.1), `e2e-add-script` refuses the call, and a replay rejects a test with a `script:` step. Record and replay a test with a script without a link.
|
|
269
282
|
|
|
283
|
+
### Pass values between steps
|
|
284
|
+
|
|
285
|
+
Save JSON data to the global `output`, for example `output.user = { id: "user-7" }`. Record scripts one at a time so each starts with the previous output. Inspect `e2e-add-script.outputJson` before writing a reference. A `run:` fragment shares output. For a separate `tool: e2e-execute` run, pass inputs through `env`.
|
|
286
|
+
|
|
287
|
+
Quote references in YAML, such as `"{{output:user.id}}"`. Use dotted keys and indexes (`items.0.id`). If a script may be skipped, guard the use with an output check or provide a literal fallback, such as `"{{output:user.id ?? guest}}"`. For a required check, use `assert: { output: user.id, exists: true }`.
|
|
288
|
+
|
|
289
|
+
Use references in selectors, typed text, equality or contains checks, tool arguments, and script-step environment values. A whole-value tool argument keeps its JSON type. Return a string when the tool expects text. Keep secret placeholders in the YAML. See [Script output](https://docs.swmansion.com/argent/docs/reference/e2e-yaml#script-output) for supported fields and fallback syntax.
|
|
290
|
+
|
|
270
291
|
## Snapshots and CLI runs
|
|
271
292
|
|
|
272
|
-
`argent e2e run <name> [--device <id>] [--platform ios|android|chromium|vega|macos|ios-remote] [--update-baselines] [--output <dir>] [--json]` runs without an LLM and exits non-zero on failure.
|
|
293
|
+
`argent e2e run <name> [--device <id>] [--platform ios|android|chromium|vega|macos|ios-remote] [--update-baselines] [--env NAME=value] [--output <dir>] [--json]` runs without an LLM and exits non-zero on failure.
|
|
273
294
|
|
|
274
295
|
A screenshot is human evidence. A `snapshot:` is executable visual verification. A missing baseline or excessive mismatch fails. A `cropOn` size change also fails. Use snapshots for color, layout, size, spacing, typography, clipping, overflow, images, icons, or stable component appearance. Use full screen for global changes and `cropOn` for one component.
|
|
275
296
|
|
|
@@ -35,6 +35,13 @@ Obey these lifecycle rules:
|
|
|
35
35
|
3. If a call says the recording is inactive, do not restart under that name. The completed take can still be on disk. Copy it aside or record under a fresh name.
|
|
36
36
|
4. Read `recorded` after each call. The recorder does not always store the tool call you made, and that line is where a rewrite shows up. The recorder still appends `await-ui-element` and `await-network-request` steps that return `success: false`. Check the warning before continuing. To see the whole file mid-recording, read it at `savedTo`. A `null` `savedTo` means only the write on your side failed: the step is still in the recording, the next step rewrites the whole file, and `e2e-finish-recording` returns `e2eTestFile` regardless.
|
|
37
37
|
5. Edit or reorder the YAML only after `e2e-finish-recording`.
|
|
38
|
+
6. Set script defaults with `e2e-start-recording.env` or call `e2e-set-env` directly before recording the script. Use `e2e-add-script.env` for values specific to one step. The tool runs the script immediately. If a secret is missing, check the project’s secret sources before retrying.
|
|
39
|
+
|
|
40
|
+
## Record cleanup after the main steps
|
|
41
|
+
|
|
42
|
+
Pass `shutdown: true` to `e2e-add-step` or `e2e-add-script` for cleanup. Use the same flag on `e2e-add-echo` to label it. Actions and scripts run immediately. Check the `recorded` line for the `shutdown` prefix and read any wait warning before continuing.
|
|
43
|
+
|
|
44
|
+
Read the result of any call recorded as `run:`. If the fragment already ran cleanup and later steps need that state, record its main steps individually and its cleanup with `shutdown: true`. Replace those steps with the fragment call after `e2e-finish-recording`. See [Shutdown](e2e-yaml.md#shutdown) for replay order.
|
|
38
45
|
|
|
39
46
|
## Start in the correct order
|
|
40
47
|
|