e2e 0.15.1 → 0.16.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/README.md +51 -24
- package/dist/.build.json +1 -1
- package/dist/agent/act-validation.d.ts +10 -1
- package/dist/agent/act-validation.js +48 -1
- package/dist/agent/act.d.ts +1 -2
- package/dist/agent/act.js +25 -8
- package/dist/agent/action-dispatcher.d.ts +0 -1
- package/dist/agent/action-dispatcher.js +0 -1
- package/dist/agent/action-names.d.ts +0 -1
- package/dist/agent/action-names.js +0 -1
- package/dist/agent/actions.d.ts +0 -1
- package/dist/agent/actions.js +0 -1
- package/dist/agent/agent-brand.d.ts +0 -1
- package/dist/agent/agent-brand.js +0 -1
- package/dist/agent/ai-sdk.d.ts +7 -1
- package/dist/agent/ai-sdk.js +11 -1
- package/dist/agent/call-options.d.ts +0 -1
- package/dist/agent/call-options.js +0 -1
- package/dist/agent/default-agent.d.ts +0 -1
- package/dist/agent/default-agent.js +0 -1
- package/dist/agent/derived.d.ts +0 -1
- package/dist/agent/derived.js +0 -1
- package/dist/agent/error.d.ts +16 -4
- package/dist/agent/error.js +25 -7
- package/dist/agent/executor.d.ts +0 -1
- package/dist/agent/executor.js +0 -1
- package/dist/agent/index.d.ts +0 -1
- package/dist/agent/index.js +0 -1
- package/dist/agent/interactive-step.d.ts +0 -1
- package/dist/agent/interactive-step.js +0 -1
- package/dist/agent/invocation.d.ts +0 -1
- package/dist/agent/invocation.js +10 -5
- package/dist/agent/ledger.d.ts +0 -1
- package/dist/agent/ledger.js +0 -1
- package/dist/agent/loop-guards.d.ts +0 -1
- package/dist/agent/loop-guards.js +0 -1
- package/dist/agent/model/adapter.d.ts +0 -1
- package/dist/agent/model/adapter.js +0 -1
- package/dist/agent/model/overflow.d.ts +0 -1
- package/dist/agent/model/overflow.js +0 -1
- package/dist/agent/model/provider-hints.d.ts +0 -1
- package/dist/agent/model/provider-hints.js +0 -1
- package/dist/agent/model/schema.d.ts +0 -1
- package/dist/agent/model/schema.js +0 -1
- package/dist/agent/model/sdk.d.ts +0 -1
- package/dist/agent/model/sdk.js +0 -1
- package/dist/agent/model/stall.d.ts +0 -1
- package/dist/agent/model/stall.js +0 -1
- package/dist/agent/model/tool-choice.d.ts +24 -2
- package/dist/agent/model/tool-choice.js +27 -2
- package/dist/agent/observation-budget.d.ts +0 -1
- package/dist/agent/observation-budget.js +0 -1
- package/dist/agent/observation-feed.d.ts +0 -1
- package/dist/agent/observation-feed.js +0 -1
- package/dist/agent/observation.d.ts +0 -1
- package/dist/agent/observation.js +0 -1
- package/dist/agent/operation-queue.d.ts +0 -1
- package/dist/agent/operation-queue.js +0 -1
- package/dist/agent/phases.d.ts +0 -1
- package/dist/agent/phases.js +0 -1
- package/dist/agent/pixels.d.ts +0 -1
- package/dist/agent/pixels.js +0 -1
- package/dist/agent/point-tap.d.ts +0 -1
- package/dist/agent/point-tap.js +0 -1
- package/dist/agent/primitives.d.ts +6 -1
- package/dist/agent/primitives.js +4 -2
- package/dist/agent/prompts.d.ts +0 -1
- package/dist/agent/prompts.js +0 -1
- package/dist/agent/protocol.d.ts +0 -1
- package/dist/agent/protocol.js +0 -1
- package/dist/agent/public.d.ts +0 -1
- package/dist/agent/public.js +0 -1
- package/dist/agent/reading.d.ts +0 -1
- package/dist/agent/reading.js +0 -1
- package/dist/agent/replay.d.ts +0 -1
- package/dist/agent/replay.js +0 -1
- package/dist/agent/screen-update.d.ts +0 -1
- package/dist/agent/screen-update.js +0 -1
- package/dist/agent/scroll-target.d.ts +0 -1
- package/dist/agent/scroll-target.js +0 -1
- package/dist/agent/secrets.d.ts +0 -1
- package/dist/agent/secrets.js +0 -1
- package/dist/agent/settle-policy.d.ts +0 -1
- package/dist/agent/settle-policy.js +0 -1
- package/dist/agent/step-accounting.d.ts +0 -1
- package/dist/agent/step-accounting.js +0 -1
- package/dist/agent/step-cache.d.ts +14 -4
- package/dist/agent/step-cache.js +13 -4
- package/dist/agent/tool-loop.d.ts +0 -1
- package/dist/agent/tool-loop.js +62 -10
- package/dist/agent/tool-output.d.ts +0 -1
- package/dist/agent/tool-output.js +0 -1
- package/dist/agent/tool.d.ts +0 -1
- package/dist/agent/tool.js +0 -1
- package/dist/agent/transcript-compaction.d.ts +0 -1
- package/dist/agent/transcript-compaction.js +0 -1
- package/dist/agent/upload-paths.d.ts +0 -1
- package/dist/agent/upload-paths.js +0 -1
- package/dist/agent/usage.d.ts +0 -1
- package/dist/agent/usage.js +0 -1
- package/dist/cache/anchors.d.ts +0 -1
- package/dist/cache/anchors.js +0 -1
- package/dist/cache/context.d.ts +19 -7
- package/dist/cache/context.js +15 -22
- package/dist/cache/decide.d.ts +0 -1
- package/dist/cache/decide.js +0 -1
- package/dist/cache/identity.d.ts +0 -1
- package/dist/cache/identity.js +0 -1
- package/dist/cache/recorder.d.ts +0 -1
- package/dist/cache/recorder.js +0 -1
- package/dist/cache/relocate.d.ts +0 -1
- package/dist/cache/relocate.js +0 -1
- package/dist/cache/route.d.ts +0 -1
- package/dist/cache/route.js +0 -1
- package/dist/cache/store.d.ts +0 -1
- package/dist/cache/store.js +0 -1
- package/dist/cache/template.d.ts +0 -1
- package/dist/cache/template.js +0 -1
- package/dist/cache/trace.d.ts +0 -1
- package/dist/cache/trace.js +0 -1
- package/dist/cli/bin.d.ts +0 -1
- package/dist/cli/bin.js +0 -1
- package/dist/cli/cache.d.ts +0 -1
- package/dist/cli/cache.js +0 -1
- package/dist/cli/docs-url.d.ts +0 -1
- package/dist/cli/docs-url.js +0 -1
- package/dist/cli/feedback.d.ts +0 -1
- package/dist/cli/feedback.js +0 -1
- package/dist/cli/guide.d.ts +0 -1
- package/dist/cli/guide.js +0 -1
- package/dist/cli/index.d.ts +0 -1
- package/dist/cli/index.js +2 -3
- package/dist/cli/init/agent-skill.d.ts +0 -1
- package/dist/cli/init/agent-skill.js +0 -1
- package/dist/cli/init/engines.d.ts +0 -1
- package/dist/cli/init/engines.js +0 -1
- package/dist/cli/init/gateways.d.ts +0 -1
- package/dist/cli/init/gateways.js +0 -1
- package/dist/cli/init/mcp-config.d.ts +0 -1
- package/dist/cli/init/mcp-config.js +0 -1
- package/dist/cli/init/package.d.ts +0 -1
- package/dist/cli/init/package.js +0 -1
- package/dist/cli/init/scaffold.d.ts +1 -1
- package/dist/cli/init/scaffold.js +2 -2
- package/dist/cli/init/sibling-versions.json +1 -1
- package/dist/cli/init/versions.d.ts +0 -1
- package/dist/cli/init/versions.js +0 -1
- package/dist/cli/init.d.ts +0 -1
- package/dist/cli/init.js +0 -1
- package/dist/cli/mcp.d.ts +9 -2
- package/dist/cli/mcp.js +14 -2
- package/dist/cli/signals.d.ts +0 -1
- package/dist/cli/signals.js +0 -1
- package/dist/cli/skill.d.ts +0 -1
- package/dist/cli/skill.js +0 -1
- package/dist/cli/telemetry.d.ts +0 -1
- package/dist/cli/telemetry.js +1 -2
- package/dist/cli/wordmark.d.ts +0 -1
- package/dist/cli/wordmark.js +0 -1
- package/dist/collect/collect.d.ts +0 -1
- package/dist/collect/collect.js +3 -2
- package/dist/collect/registry.d.ts +6 -3
- package/dist/collect/registry.js +31 -14
- package/dist/collect/select.d.ts +0 -1
- package/dist/collect/select.js +0 -1
- package/dist/config/agent.d.ts +0 -1
- package/dist/config/agent.js +0 -1
- package/dist/config/app.d.ts +0 -1
- package/dist/config/app.js +0 -1
- package/dist/config/command.d.ts +0 -1
- package/dist/config/command.js +0 -1
- package/dist/config/diagnose.d.ts +0 -1
- package/dist/config/diagnose.js +0 -1
- package/dist/config/esm-hooks.d.ts +0 -1
- package/dist/config/esm-hooks.js +0 -1
- package/dist/config/load.d.ts +0 -1
- package/dist/config/load.js +0 -1
- package/dist/config/resolve.d.ts +0 -1
- package/dist/config/resolve.js +0 -1
- package/dist/config/secrets.d.ts +0 -1
- package/dist/config/secrets.js +0 -1
- package/dist/config/targets.d.ts +0 -1
- package/dist/config/targets.js +0 -1
- package/dist/config/validate.d.ts +0 -1
- package/dist/config/validate.js +0 -1
- package/dist/engine/contract.d.ts +0 -1
- package/dist/engine/contract.js +0 -1
- package/dist/engine/index.d.ts +1 -2
- package/dist/engine/index.js +4 -4
- package/dist/engine/manifest.d.ts +0 -1
- package/dist/engine/manifest.js +0 -1
- package/dist/engine/recording.d.ts +0 -1
- package/dist/engine/recording.js +0 -1
- package/dist/engine/resolve.d.ts +0 -1
- package/dist/engine/resolve.js +0 -1
- package/dist/engine/session.d.ts +0 -1
- package/dist/engine/session.js +0 -1
- package/dist/engine/surface.d.ts +0 -1
- package/dist/engine/surface.js +0 -1
- package/dist/engine/timing.d.ts +0 -1
- package/dist/engine/timing.js +0 -1
- package/dist/expect/async.d.ts +0 -1
- package/dist/expect/async.js +99 -58
- package/dist/expect/attempt.d.ts +0 -1
- package/dist/expect/attempt.js +0 -1
- package/dist/expect/index.d.ts +0 -1
- package/dist/expect/index.js +0 -1
- package/dist/expect/poll.d.ts +0 -1
- package/dist/expect/poll.js +0 -1
- package/dist/expect/soft.d.ts +0 -1
- package/dist/expect/soft.js +0 -1
- package/dist/expect/values.d.ts +0 -1
- package/dist/expect/values.js +1 -2
- package/dist/explore/body.d.ts +0 -1
- package/dist/explore/body.js +0 -1
- package/dist/explore/executor.d.ts +0 -1
- package/dist/explore/executor.js +0 -1
- package/dist/explore/index.d.ts +0 -1
- package/dist/explore/index.js +16 -2
- package/dist/explore/plan.d.ts +0 -1
- package/dist/explore/plan.js +0 -1
- package/dist/explore/progress.d.ts +0 -1
- package/dist/explore/progress.js +0 -1
- package/dist/explore/state.d.ts +0 -1
- package/dist/explore/state.js +0 -1
- package/dist/index.d.ts +0 -1
- package/dist/index.js +0 -1
- package/dist/internal/ai-trace.d.ts +0 -1
- package/dist/internal/ai-trace.js +0 -1
- package/dist/internal/atomic-write.d.ts +0 -1
- package/dist/internal/atomic-write.js +0 -1
- package/dist/internal/brands.d.ts +0 -1
- package/dist/internal/brands.js +0 -1
- package/dist/internal/debug.d.ts +0 -1
- package/dist/internal/debug.js +0 -1
- package/dist/internal/env.d.ts +0 -1
- package/dist/internal/env.js +0 -1
- package/dist/internal/errors.d.ts +0 -1
- package/dist/internal/errors.js +0 -1
- package/dist/internal/geometry.d.ts +0 -1
- package/dist/internal/geometry.js +0 -1
- package/dist/internal/git.d.ts +0 -1
- package/dist/internal/git.js +0 -1
- package/dist/internal/globs.d.ts +0 -1
- package/dist/internal/globs.js +0 -1
- package/dist/internal/ids.d.ts +0 -1
- package/dist/internal/ids.js +0 -1
- package/dist/internal/json-value.d.ts +0 -1
- package/dist/internal/json-value.js +0 -1
- package/dist/internal/keys.d.ts +0 -1
- package/dist/internal/keys.js +0 -1
- package/dist/internal/node-version.d.ts +0 -1
- package/dist/internal/node-version.js +0 -1
- package/dist/internal/objects.d.ts +0 -1
- package/dist/internal/objects.js +0 -1
- package/dist/internal/options.d.ts +0 -1
- package/dist/internal/options.js +0 -1
- package/dist/internal/package-manager.d.ts +0 -1
- package/dist/internal/package-manager.js +0 -1
- package/dist/internal/package-version.d.ts +0 -1
- package/dist/internal/package-version.js +0 -1
- package/dist/internal/paths.d.ts +0 -1
- package/dist/internal/paths.js +0 -1
- package/dist/internal/realm-slot.d.ts +0 -1
- package/dist/internal/realm-slot.js +0 -1
- package/dist/internal/recording-modes.d.ts +0 -1
- package/dist/internal/recording-modes.js +0 -1
- package/dist/internal/redact.d.ts +0 -1
- package/dist/internal/redact.js +0 -1
- package/dist/internal/regexp.d.ts +0 -1
- package/dist/internal/regexp.js +0 -1
- package/dist/internal/roles.d.ts +0 -1
- package/dist/internal/roles.js +0 -1
- package/dist/internal/skip.d.ts +0 -1
- package/dist/internal/skip.js +0 -1
- package/dist/internal/source.d.ts +0 -1
- package/dist/internal/source.js +0 -1
- package/dist/internal/standard-schema.d.ts +0 -1
- package/dist/internal/standard-schema.js +0 -1
- package/dist/internal/suggest.d.ts +0 -1
- package/dist/internal/suggest.js +0 -1
- package/dist/internal/text.d.ts +8 -1
- package/dist/internal/text.js +13 -2
- package/dist/internal/time.d.ts +0 -1
- package/dist/internal/time.js +0 -1
- package/dist/internal/urls.d.ts +0 -1
- package/dist/internal/urls.js +0 -1
- package/dist/internal/vcs.d.ts +0 -1
- package/dist/internal/vcs.js +0 -1
- package/dist/internal/zip.d.ts +0 -1
- package/dist/internal/zip.js +0 -1
- package/dist/locator/engine.d.ts +0 -1
- package/dist/locator/engine.js +0 -1
- package/dist/locator/expression.d.ts +0 -1
- package/dist/locator/expression.js +0 -1
- package/dist/locator/screen.d.ts +0 -1
- package/dist/locator/screen.js +0 -1
- package/dist/mcp/catalog.d.ts +4 -1
- package/dist/mcp/catalog.js +2 -3
- package/dist/mcp/config.d.ts +0 -1
- package/dist/mcp/config.js +0 -1
- package/dist/mcp/recording.d.ts +0 -1
- package/dist/mcp/recording.js +0 -1
- package/dist/mcp/server.d.ts +8 -1
- package/dist/mcp/server.js +8 -5
- package/dist/mcp/session.d.ts +4 -2
- package/dist/mcp/session.js +43 -21
- package/dist/mcp/sessions.d.ts +2 -1
- package/dist/mcp/sessions.js +5 -2
- package/dist/mcp/tools.d.ts +7 -6
- package/dist/mcp/tools.js +36 -11
- package/dist/mcp/usage.d.ts +61 -0
- package/dist/mcp/usage.js +73 -0
- package/dist/oauth/callback-server.d.ts +0 -1
- package/dist/oauth/callback-server.js +0 -1
- package/dist/oauth/chatgpt.d.ts +0 -1
- package/dist/oauth/chatgpt.js +0 -1
- package/dist/oauth/cli.d.ts +0 -1
- package/dist/oauth/cli.js +0 -1
- package/dist/oauth/copilot.d.ts +0 -1
- package/dist/oauth/copilot.js +0 -1
- package/dist/oauth/device-code.d.ts +0 -1
- package/dist/oauth/device-code.js +0 -1
- package/dist/oauth/errors.d.ts +0 -1
- package/dist/oauth/errors.js +0 -1
- package/dist/oauth/fetch.d.ts +0 -1
- package/dist/oauth/fetch.js +0 -1
- package/dist/oauth/grok.d.ts +0 -1
- package/dist/oauth/grok.js +0 -1
- package/dist/oauth/jwt.d.ts +0 -1
- package/dist/oauth/jwt.js +0 -1
- package/dist/oauth/login.d.ts +0 -1
- package/dist/oauth/login.js +0 -1
- package/dist/oauth/models.d.ts +0 -1
- package/dist/oauth/models.js +0 -1
- package/dist/oauth/pkce.d.ts +0 -1
- package/dist/oauth/pkce.js +0 -1
- package/dist/oauth/providers/github-copilot.d.ts +0 -1
- package/dist/oauth/providers/github-copilot.js +10 -3
- package/dist/oauth/providers/openai.d.ts +0 -1
- package/dist/oauth/providers/openai.js +1 -2
- package/dist/oauth/providers/xai.d.ts +0 -1
- package/dist/oauth/providers/xai.js +0 -1
- package/dist/oauth/providers.d.ts +0 -1
- package/dist/oauth/providers.js +0 -1
- package/dist/oauth/sse.d.ts +0 -1
- package/dist/oauth/sse.js +0 -1
- package/dist/oauth/store.d.ts +0 -1
- package/dist/oauth/store.js +0 -1
- package/dist/oauth/token-endpoint.d.ts +0 -1
- package/dist/oauth/token-endpoint.js +0 -1
- package/dist/oauth/types.d.ts +0 -1
- package/dist/oauth/types.js +0 -1
- package/dist/params.d.ts +0 -1
- package/dist/params.js +0 -1
- package/dist/report/build.d.ts +0 -1
- package/dist/report/build.js +0 -1
- package/dist/report/builtin.d.ts +0 -1
- package/dist/report/builtin.js +0 -1
- package/dist/report/code-frame.d.ts +0 -1
- package/dist/report/code-frame.js +0 -1
- package/dist/report/debug-steps.d.ts +0 -1
- package/dist/report/debug-steps.js +0 -1
- package/dist/report/explore-text.d.ts +0 -1
- package/dist/report/explore-text.js +0 -1
- package/dist/report/failure-text.d.ts +0 -1
- package/dist/report/failure-text.js +0 -1
- package/dist/report/format.d.ts +0 -1
- package/dist/report/format.js +0 -1
- package/dist/report/json.d.ts +0 -1
- package/dist/report/json.js +0 -1
- package/dist/report/junit.d.ts +0 -1
- package/dist/report/junit.js +0 -1
- package/dist/report/list-explore.d.ts +0 -1
- package/dist/report/list-explore.js +0 -1
- package/dist/report/list-model.d.ts +0 -1
- package/dist/report/list-model.js +0 -1
- package/dist/report/list-steps.d.ts +0 -1
- package/dist/report/list-steps.js +0 -1
- package/dist/report/list.d.ts +0 -1
- package/dist/report/list.js +0 -1
- package/dist/report/live-window.d.ts +0 -1
- package/dist/report/live-window.js +0 -1
- package/dist/report/markdown-text.d.ts +0 -1
- package/dist/report/markdown-text.js +0 -1
- package/dist/report/markdown.d.ts +0 -1
- package/dist/report/markdown.js +0 -1
- package/dist/report/outcome.d.ts +0 -1
- package/dist/report/outcome.js +0 -1
- package/dist/report/repeats.d.ts +0 -1
- package/dist/report/repeats.js +0 -1
- package/dist/report/running-tree.d.ts +0 -1
- package/dist/report/running-tree.js +0 -1
- package/dist/report/write.d.ts +0 -1
- package/dist/report/write.js +0 -1
- package/dist/run/app-ports.d.ts +0 -1
- package/dist/run/app-ports.js +0 -1
- package/dist/run/artifacts.d.ts +0 -1
- package/dist/run/artifacts.js +0 -1
- package/dist/run/budget.d.ts +0 -1
- package/dist/run/budget.js +0 -1
- package/dist/run/declared-processes.d.ts +0 -1
- package/dist/run/declared-processes.js +0 -1
- package/dist/run/events.d.ts +0 -1
- package/dist/run/events.js +0 -1
- package/dist/run/execute.d.ts +0 -1
- package/dist/run/execute.js +27 -13
- package/dist/run/extended-fixtures.d.ts +0 -1
- package/dist/run/extended-fixtures.js +0 -1
- package/dist/run/failure-evidence.d.ts +0 -1
- package/dist/run/failure-evidence.js +0 -1
- package/dist/run/fixture-recording.d.ts +0 -1
- package/dist/run/fixture-recording.js +0 -1
- package/dist/run/fixtures.d.ts +0 -1
- package/dist/run/fixtures.js +0 -1
- package/dist/run/in-process.d.ts +0 -1
- package/dist/run/in-process.js +0 -1
- package/dist/run/last-run.d.ts +0 -1
- package/dist/run/last-run.js +0 -1
- package/dist/run/managed-process.d.ts +0 -1
- package/dist/run/managed-process.js +0 -1
- package/dist/run/output.d.ts +0 -1
- package/dist/run/output.js +0 -1
- package/dist/run/process-pool.d.ts +0 -1
- package/dist/run/process-pool.js +0 -1
- package/dist/run/provision.d.ts +0 -1
- package/dist/run/provision.js +0 -1
- package/dist/run/realm.d.ts +2 -1
- package/dist/run/realm.js +1 -2
- package/dist/run/records.d.ts +0 -1
- package/dist/run/records.js +0 -1
- package/dist/run/retry.d.ts +0 -1
- package/dist/run/retry.js +0 -1
- package/dist/run/runner.d.ts +2 -1
- package/dist/run/runner.js +1 -2
- package/dist/run/scheduler.d.ts +0 -1
- package/dist/run/scheduler.js +0 -1
- package/dist/run/secrecy.d.ts +15 -1
- package/dist/run/secrecy.js +27 -2
- package/dist/run/serial.d.ts +0 -1
- package/dist/run/serial.js +0 -1
- package/dist/run/sessions.d.ts +0 -1
- package/dist/run/sessions.js +0 -1
- package/dist/run/standalone.d.ts +0 -1
- package/dist/run/standalone.js +3 -3
- package/dist/run/steps.d.ts +2 -3
- package/dist/run/steps.js +4 -2
- package/dist/run/trace-redaction.d.ts +0 -1
- package/dist/run/trace-redaction.js +0 -1
- package/dist/run/unit-runner.d.ts +0 -1
- package/dist/run/unit-runner.js +0 -1
- package/dist/run/units.d.ts +0 -1
- package/dist/run/units.js +0 -1
- package/dist/run/worker/entry.d.ts +0 -1
- package/dist/run/worker/entry.js +2 -3
- package/dist/run/worker/handle.d.ts +0 -1
- package/dist/run/worker/handle.js +0 -1
- package/dist/run/worker/protocol.d.ts +0 -1
- package/dist/run/worker/protocol.js +0 -1
- package/dist/run/worker/session.d.ts +0 -1
- package/dist/run/worker/session.js +0 -1
- package/dist/run/worker-models.d.ts +0 -1
- package/dist/run/worker-models.js +0 -1
- package/dist/secrets.d.ts +0 -1
- package/dist/secrets.js +0 -1
- package/dist/telemetry/checkout.d.ts +0 -1
- package/dist/telemetry/checkout.js +0 -1
- package/dist/telemetry/environment.d.ts +0 -1
- package/dist/telemetry/environment.js +0 -1
- package/dist/telemetry/events.d.ts +26 -10
- package/dist/telemetry/events.js +107 -13
- package/dist/telemetry/failure-kind.d.ts +0 -1
- package/dist/telemetry/failure-kind.js +0 -1
- package/dist/telemetry/posthog.d.ts +0 -1
- package/dist/telemetry/posthog.js +0 -1
- package/dist/telemetry/project.d.ts +0 -1
- package/dist/telemetry/project.js +0 -1
- package/dist/telemetry/store.d.ts +0 -1
- package/dist/telemetry/store.js +0 -1
- package/dist/telemetry/telemetry.d.ts +19 -8
- package/dist/telemetry/telemetry.js +26 -9
- package/dist/telemetry/token.d.ts +0 -1
- package/dist/telemetry/token.js +0 -1
- package/dist/types.d.ts +26 -24
- package/dist/types.js +0 -1
- package/docs/agent-steps.mdx +126 -0
- package/docs/agents.mdx +217 -0
- package/docs/api-testing.mdx +65 -0
- package/docs/authentication.mdx +345 -0
- package/docs/browser.mdx +440 -0
- package/docs/bug-bash.mdx +90 -0
- package/docs/cache.mdx +306 -0
- package/docs/ci.mdx +210 -0
- package/docs/coding-agents.mdx +183 -0
- package/docs/debugging.mdx +291 -0
- package/docs/executors.mdx +243 -0
- package/docs/explore.mdx +174 -0
- package/docs/github.mdx +184 -0
- package/docs/index.mdx +82 -0
- package/docs/integrations/eas.mdx +216 -0
- package/docs/integrations/index.mdx +24 -0
- package/docs/integrations/kernel.mdx +163 -0
- package/docs/migrate/cypress.mdx +124 -0
- package/docs/migrate/detox.mdx +140 -0
- package/docs/migrate/maestro.mdx +229 -0
- package/docs/migrate/playwright.mdx +430 -0
- package/docs/migrate/selenium.mdx +110 -0
- package/docs/mobile-ci.mdx +567 -0
- package/docs/mobile.mdx +595 -0
- package/docs/models.mdx +241 -0
- package/docs/quickstart.mdx +260 -0
- package/docs/reference/agent.mdx +524 -0
- package/docs/reference/app.mdx +72 -0
- package/docs/reference/cli.mdx +819 -0
- package/docs/reference/config.mdx +986 -0
- package/docs/reference/engine.mdx +1363 -0
- package/docs/reference/environment.mdx +113 -0
- package/docs/reference/errors.mdx +143 -0
- package/docs/reference/expect.mdx +546 -0
- package/docs/reference/mcp.mdx +205 -0
- package/docs/reference/mobile.mdx +522 -0
- package/docs/reference/reporters.mdx +216 -0
- package/docs/reference/screen.mdx +688 -0
- package/docs/reference/test.mdx +449 -0
- package/docs/reference/web.mdx +615 -0
- package/docs/security.mdx +308 -0
- package/docs/starting-your-app.mdx +231 -0
- package/docs/subscriptions.mdx +166 -0
- package/docs/telemetry.mdx +227 -0
- package/docs/tools.mdx +150 -0
- package/docs/viewports.mdx +146 -0
- package/docs/writing-an-engine.mdx +316 -0
- package/docs/writing-tests.mdx +256 -0
- package/package.json +5 -3
- package/skills/e2e/SKILL.md +4 -1
- package/skills/e2e/references/agent.md +3 -1
- package/skills/e2e/references/mcp.md +3 -0
- package/skills/e2e/references/setup.md +19 -4
- package/skills/e2e/references/writing-tests.md +11 -0
- package/dist/agent/act-validation.d.ts.map +0 -1
- package/dist/agent/act-validation.js.map +0 -1
- package/dist/agent/act.d.ts.map +0 -1
- package/dist/agent/act.js.map +0 -1
- package/dist/agent/action-dispatcher.d.ts.map +0 -1
- package/dist/agent/action-dispatcher.js.map +0 -1
- package/dist/agent/action-names.d.ts.map +0 -1
- package/dist/agent/action-names.js.map +0 -1
- package/dist/agent/actions.d.ts.map +0 -1
- package/dist/agent/actions.js.map +0 -1
- package/dist/agent/agent-brand.d.ts.map +0 -1
- package/dist/agent/agent-brand.js.map +0 -1
- package/dist/agent/ai-sdk.d.ts.map +0 -1
- package/dist/agent/ai-sdk.js.map +0 -1
- package/dist/agent/call-options.d.ts.map +0 -1
- package/dist/agent/call-options.js.map +0 -1
- package/dist/agent/default-agent.d.ts.map +0 -1
- package/dist/agent/default-agent.js.map +0 -1
- package/dist/agent/derived.d.ts.map +0 -1
- package/dist/agent/derived.js.map +0 -1
- package/dist/agent/error.d.ts.map +0 -1
- package/dist/agent/error.js.map +0 -1
- package/dist/agent/executor.d.ts.map +0 -1
- package/dist/agent/executor.js.map +0 -1
- package/dist/agent/index.d.ts.map +0 -1
- package/dist/agent/index.js.map +0 -1
- package/dist/agent/interactive-step.d.ts.map +0 -1
- package/dist/agent/interactive-step.js.map +0 -1
- package/dist/agent/invocation.d.ts.map +0 -1
- package/dist/agent/invocation.js.map +0 -1
- package/dist/agent/ledger.d.ts.map +0 -1
- package/dist/agent/ledger.js.map +0 -1
- package/dist/agent/loop-guards.d.ts.map +0 -1
- package/dist/agent/loop-guards.js.map +0 -1
- package/dist/agent/model/adapter.d.ts.map +0 -1
- package/dist/agent/model/adapter.js.map +0 -1
- package/dist/agent/model/overflow.d.ts.map +0 -1
- package/dist/agent/model/overflow.js.map +0 -1
- package/dist/agent/model/provider-hints.d.ts.map +0 -1
- package/dist/agent/model/provider-hints.js.map +0 -1
- package/dist/agent/model/schema.d.ts.map +0 -1
- package/dist/agent/model/schema.js.map +0 -1
- package/dist/agent/model/sdk.d.ts.map +0 -1
- package/dist/agent/model/sdk.js.map +0 -1
- package/dist/agent/model/stall.d.ts.map +0 -1
- package/dist/agent/model/stall.js.map +0 -1
- package/dist/agent/model/tool-choice.d.ts.map +0 -1
- package/dist/agent/model/tool-choice.js.map +0 -1
- package/dist/agent/observation-budget.d.ts.map +0 -1
- package/dist/agent/observation-budget.js.map +0 -1
- package/dist/agent/observation-feed.d.ts.map +0 -1
- package/dist/agent/observation-feed.js.map +0 -1
- package/dist/agent/observation.d.ts.map +0 -1
- package/dist/agent/observation.js.map +0 -1
- package/dist/agent/operation-queue.d.ts.map +0 -1
- package/dist/agent/operation-queue.js.map +0 -1
- package/dist/agent/phases.d.ts.map +0 -1
- package/dist/agent/phases.js.map +0 -1
- package/dist/agent/pixels.d.ts.map +0 -1
- package/dist/agent/pixels.js.map +0 -1
- package/dist/agent/point-tap.d.ts.map +0 -1
- package/dist/agent/point-tap.js.map +0 -1
- package/dist/agent/primitives.d.ts.map +0 -1
- package/dist/agent/primitives.js.map +0 -1
- package/dist/agent/prompts.d.ts.map +0 -1
- package/dist/agent/prompts.js.map +0 -1
- package/dist/agent/protocol.d.ts.map +0 -1
- package/dist/agent/protocol.js.map +0 -1
- package/dist/agent/public.d.ts.map +0 -1
- package/dist/agent/public.js.map +0 -1
- package/dist/agent/reading.d.ts.map +0 -1
- package/dist/agent/reading.js.map +0 -1
- package/dist/agent/replay.d.ts.map +0 -1
- package/dist/agent/replay.js.map +0 -1
- package/dist/agent/screen-update.d.ts.map +0 -1
- package/dist/agent/screen-update.js.map +0 -1
- package/dist/agent/scroll-target.d.ts.map +0 -1
- package/dist/agent/scroll-target.js.map +0 -1
- package/dist/agent/secrets.d.ts.map +0 -1
- package/dist/agent/secrets.js.map +0 -1
- package/dist/agent/settle-policy.d.ts.map +0 -1
- package/dist/agent/settle-policy.js.map +0 -1
- package/dist/agent/step-accounting.d.ts.map +0 -1
- package/dist/agent/step-accounting.js.map +0 -1
- package/dist/agent/step-cache.d.ts.map +0 -1
- package/dist/agent/step-cache.js.map +0 -1
- package/dist/agent/tool-loop.d.ts.map +0 -1
- package/dist/agent/tool-loop.js.map +0 -1
- package/dist/agent/tool-output.d.ts.map +0 -1
- package/dist/agent/tool-output.js.map +0 -1
- package/dist/agent/tool.d.ts.map +0 -1
- package/dist/agent/tool.js.map +0 -1
- package/dist/agent/transcript-compaction.d.ts.map +0 -1
- package/dist/agent/transcript-compaction.js.map +0 -1
- package/dist/agent/upload-paths.d.ts.map +0 -1
- package/dist/agent/upload-paths.js.map +0 -1
- package/dist/agent/usage.d.ts.map +0 -1
- package/dist/agent/usage.js.map +0 -1
- package/dist/cache/anchors.d.ts.map +0 -1
- package/dist/cache/anchors.js.map +0 -1
- package/dist/cache/context.d.ts.map +0 -1
- package/dist/cache/context.js.map +0 -1
- package/dist/cache/decide.d.ts.map +0 -1
- package/dist/cache/decide.js.map +0 -1
- package/dist/cache/identity.d.ts.map +0 -1
- package/dist/cache/identity.js.map +0 -1
- package/dist/cache/recorder.d.ts.map +0 -1
- package/dist/cache/recorder.js.map +0 -1
- package/dist/cache/relocate.d.ts.map +0 -1
- package/dist/cache/relocate.js.map +0 -1
- package/dist/cache/route.d.ts.map +0 -1
- package/dist/cache/route.js.map +0 -1
- package/dist/cache/store.d.ts.map +0 -1
- package/dist/cache/store.js.map +0 -1
- package/dist/cache/template.d.ts.map +0 -1
- package/dist/cache/template.js.map +0 -1
- package/dist/cache/trace.d.ts.map +0 -1
- package/dist/cache/trace.js.map +0 -1
- package/dist/cli/bin.d.ts.map +0 -1
- package/dist/cli/bin.js.map +0 -1
- package/dist/cli/cache.d.ts.map +0 -1
- package/dist/cli/cache.js.map +0 -1
- package/dist/cli/docs-url.d.ts.map +0 -1
- package/dist/cli/docs-url.js.map +0 -1
- package/dist/cli/feedback.d.ts.map +0 -1
- package/dist/cli/feedback.js.map +0 -1
- package/dist/cli/guide.d.ts.map +0 -1
- package/dist/cli/guide.js.map +0 -1
- package/dist/cli/index.d.ts.map +0 -1
- package/dist/cli/index.js.map +0 -1
- package/dist/cli/init/agent-skill.d.ts.map +0 -1
- package/dist/cli/init/agent-skill.js.map +0 -1
- package/dist/cli/init/engines.d.ts.map +0 -1
- package/dist/cli/init/engines.js.map +0 -1
- package/dist/cli/init/gateways.d.ts.map +0 -1
- package/dist/cli/init/gateways.js.map +0 -1
- package/dist/cli/init/mcp-config.d.ts.map +0 -1
- package/dist/cli/init/mcp-config.js.map +0 -1
- package/dist/cli/init/package.d.ts.map +0 -1
- package/dist/cli/init/package.js.map +0 -1
- package/dist/cli/init/scaffold.d.ts.map +0 -1
- package/dist/cli/init/scaffold.js.map +0 -1
- package/dist/cli/init/versions.d.ts.map +0 -1
- package/dist/cli/init/versions.js.map +0 -1
- package/dist/cli/init.d.ts.map +0 -1
- package/dist/cli/init.js.map +0 -1
- package/dist/cli/mcp.d.ts.map +0 -1
- package/dist/cli/mcp.js.map +0 -1
- package/dist/cli/signals.d.ts.map +0 -1
- package/dist/cli/signals.js.map +0 -1
- package/dist/cli/skill.d.ts.map +0 -1
- package/dist/cli/skill.js.map +0 -1
- package/dist/cli/telemetry.d.ts.map +0 -1
- package/dist/cli/telemetry.js.map +0 -1
- package/dist/cli/wordmark.d.ts.map +0 -1
- package/dist/cli/wordmark.js.map +0 -1
- package/dist/collect/collect.d.ts.map +0 -1
- package/dist/collect/collect.js.map +0 -1
- package/dist/collect/registry.d.ts.map +0 -1
- package/dist/collect/registry.js.map +0 -1
- package/dist/collect/select.d.ts.map +0 -1
- package/dist/collect/select.js.map +0 -1
- package/dist/config/agent.d.ts.map +0 -1
- package/dist/config/agent.js.map +0 -1
- package/dist/config/app.d.ts.map +0 -1
- package/dist/config/app.js.map +0 -1
- package/dist/config/command.d.ts.map +0 -1
- package/dist/config/command.js.map +0 -1
- package/dist/config/diagnose.d.ts.map +0 -1
- package/dist/config/diagnose.js.map +0 -1
- package/dist/config/esm-hooks.d.ts.map +0 -1
- package/dist/config/esm-hooks.js.map +0 -1
- package/dist/config/load.d.ts.map +0 -1
- package/dist/config/load.js.map +0 -1
- package/dist/config/resolve.d.ts.map +0 -1
- package/dist/config/resolve.js.map +0 -1
- package/dist/config/secrets.d.ts.map +0 -1
- package/dist/config/secrets.js.map +0 -1
- package/dist/config/targets.d.ts.map +0 -1
- package/dist/config/targets.js.map +0 -1
- package/dist/config/validate.d.ts.map +0 -1
- package/dist/config/validate.js.map +0 -1
- package/dist/engine/contract.d.ts.map +0 -1
- package/dist/engine/contract.js.map +0 -1
- package/dist/engine/index.d.ts.map +0 -1
- package/dist/engine/index.js.map +0 -1
- package/dist/engine/manifest.d.ts.map +0 -1
- package/dist/engine/manifest.js.map +0 -1
- package/dist/engine/recording.d.ts.map +0 -1
- package/dist/engine/recording.js.map +0 -1
- package/dist/engine/resolve.d.ts.map +0 -1
- package/dist/engine/resolve.js.map +0 -1
- package/dist/engine/session.d.ts.map +0 -1
- package/dist/engine/session.js.map +0 -1
- package/dist/engine/surface.d.ts.map +0 -1
- package/dist/engine/surface.js.map +0 -1
- package/dist/engine/timing.d.ts.map +0 -1
- package/dist/engine/timing.js.map +0 -1
- package/dist/expect/async.d.ts.map +0 -1
- package/dist/expect/async.js.map +0 -1
- package/dist/expect/attempt.d.ts.map +0 -1
- package/dist/expect/attempt.js.map +0 -1
- package/dist/expect/index.d.ts.map +0 -1
- package/dist/expect/index.js.map +0 -1
- package/dist/expect/poll.d.ts.map +0 -1
- package/dist/expect/poll.js.map +0 -1
- package/dist/expect/soft.d.ts.map +0 -1
- package/dist/expect/soft.js.map +0 -1
- package/dist/expect/values.d.ts.map +0 -1
- package/dist/expect/values.js.map +0 -1
- package/dist/explore/body.d.ts.map +0 -1
- package/dist/explore/body.js.map +0 -1
- package/dist/explore/executor.d.ts.map +0 -1
- package/dist/explore/executor.js.map +0 -1
- package/dist/explore/index.d.ts.map +0 -1
- package/dist/explore/index.js.map +0 -1
- package/dist/explore/plan.d.ts.map +0 -1
- package/dist/explore/plan.js.map +0 -1
- package/dist/explore/progress.d.ts.map +0 -1
- package/dist/explore/progress.js.map +0 -1
- package/dist/explore/state.d.ts.map +0 -1
- package/dist/explore/state.js.map +0 -1
- package/dist/index.d.ts.map +0 -1
- package/dist/index.js.map +0 -1
- package/dist/internal/ai-trace.d.ts.map +0 -1
- package/dist/internal/ai-trace.js.map +0 -1
- package/dist/internal/atomic-write.d.ts.map +0 -1
- package/dist/internal/atomic-write.js.map +0 -1
- package/dist/internal/brands.d.ts.map +0 -1
- package/dist/internal/brands.js.map +0 -1
- package/dist/internal/debug.d.ts.map +0 -1
- package/dist/internal/debug.js.map +0 -1
- package/dist/internal/env.d.ts.map +0 -1
- package/dist/internal/env.js.map +0 -1
- package/dist/internal/errors.d.ts.map +0 -1
- package/dist/internal/errors.js.map +0 -1
- package/dist/internal/geometry.d.ts.map +0 -1
- package/dist/internal/geometry.js.map +0 -1
- package/dist/internal/git.d.ts.map +0 -1
- package/dist/internal/git.js.map +0 -1
- package/dist/internal/globs.d.ts.map +0 -1
- package/dist/internal/globs.js.map +0 -1
- package/dist/internal/ids.d.ts.map +0 -1
- package/dist/internal/ids.js.map +0 -1
- package/dist/internal/json-value.d.ts.map +0 -1
- package/dist/internal/json-value.js.map +0 -1
- package/dist/internal/keys.d.ts.map +0 -1
- package/dist/internal/keys.js.map +0 -1
- package/dist/internal/node-version.d.ts.map +0 -1
- package/dist/internal/node-version.js.map +0 -1
- package/dist/internal/objects.d.ts.map +0 -1
- package/dist/internal/objects.js.map +0 -1
- package/dist/internal/options.d.ts.map +0 -1
- package/dist/internal/options.js.map +0 -1
- package/dist/internal/package-manager.d.ts.map +0 -1
- package/dist/internal/package-manager.js.map +0 -1
- package/dist/internal/package-version.d.ts.map +0 -1
- package/dist/internal/package-version.js.map +0 -1
- package/dist/internal/paths.d.ts.map +0 -1
- package/dist/internal/paths.js.map +0 -1
- package/dist/internal/realm-slot.d.ts.map +0 -1
- package/dist/internal/realm-slot.js.map +0 -1
- package/dist/internal/recording-modes.d.ts.map +0 -1
- package/dist/internal/recording-modes.js.map +0 -1
- package/dist/internal/redact.d.ts.map +0 -1
- package/dist/internal/redact.js.map +0 -1
- package/dist/internal/regexp.d.ts.map +0 -1
- package/dist/internal/regexp.js.map +0 -1
- package/dist/internal/roles.d.ts.map +0 -1
- package/dist/internal/roles.js.map +0 -1
- package/dist/internal/skip.d.ts.map +0 -1
- package/dist/internal/skip.js.map +0 -1
- package/dist/internal/source.d.ts.map +0 -1
- package/dist/internal/source.js.map +0 -1
- package/dist/internal/standard-schema.d.ts.map +0 -1
- package/dist/internal/standard-schema.js.map +0 -1
- package/dist/internal/suggest.d.ts.map +0 -1
- package/dist/internal/suggest.js.map +0 -1
- package/dist/internal/text.d.ts.map +0 -1
- package/dist/internal/text.js.map +0 -1
- package/dist/internal/time.d.ts.map +0 -1
- package/dist/internal/time.js.map +0 -1
- package/dist/internal/urls.d.ts.map +0 -1
- package/dist/internal/urls.js.map +0 -1
- package/dist/internal/vcs.d.ts.map +0 -1
- package/dist/internal/vcs.js.map +0 -1
- package/dist/internal/zip.d.ts.map +0 -1
- package/dist/internal/zip.js.map +0 -1
- package/dist/locator/engine.d.ts.map +0 -1
- package/dist/locator/engine.js.map +0 -1
- package/dist/locator/expression.d.ts.map +0 -1
- package/dist/locator/expression.js.map +0 -1
- package/dist/locator/screen.d.ts.map +0 -1
- package/dist/locator/screen.js.map +0 -1
- package/dist/mcp/catalog.d.ts.map +0 -1
- package/dist/mcp/catalog.js.map +0 -1
- package/dist/mcp/config.d.ts.map +0 -1
- package/dist/mcp/config.js.map +0 -1
- package/dist/mcp/recording.d.ts.map +0 -1
- package/dist/mcp/recording.js.map +0 -1
- package/dist/mcp/server.d.ts.map +0 -1
- package/dist/mcp/server.js.map +0 -1
- package/dist/mcp/session.d.ts.map +0 -1
- package/dist/mcp/session.js.map +0 -1
- package/dist/mcp/sessions.d.ts.map +0 -1
- package/dist/mcp/sessions.js.map +0 -1
- package/dist/mcp/tools.d.ts.map +0 -1
- package/dist/mcp/tools.js.map +0 -1
- package/dist/oauth/callback-server.d.ts.map +0 -1
- package/dist/oauth/callback-server.js.map +0 -1
- package/dist/oauth/chatgpt.d.ts.map +0 -1
- package/dist/oauth/chatgpt.js.map +0 -1
- package/dist/oauth/cli.d.ts.map +0 -1
- package/dist/oauth/cli.js.map +0 -1
- package/dist/oauth/copilot.d.ts.map +0 -1
- package/dist/oauth/copilot.js.map +0 -1
- package/dist/oauth/device-code.d.ts.map +0 -1
- package/dist/oauth/device-code.js.map +0 -1
- package/dist/oauth/errors.d.ts.map +0 -1
- package/dist/oauth/errors.js.map +0 -1
- package/dist/oauth/fetch.d.ts.map +0 -1
- package/dist/oauth/fetch.js.map +0 -1
- package/dist/oauth/grok.d.ts.map +0 -1
- package/dist/oauth/grok.js.map +0 -1
- package/dist/oauth/jwt.d.ts.map +0 -1
- package/dist/oauth/jwt.js.map +0 -1
- package/dist/oauth/login.d.ts.map +0 -1
- package/dist/oauth/login.js.map +0 -1
- package/dist/oauth/models.d.ts.map +0 -1
- package/dist/oauth/models.js.map +0 -1
- package/dist/oauth/pkce.d.ts.map +0 -1
- package/dist/oauth/pkce.js.map +0 -1
- package/dist/oauth/providers/github-copilot.d.ts.map +0 -1
- package/dist/oauth/providers/github-copilot.js.map +0 -1
- package/dist/oauth/providers/openai.d.ts.map +0 -1
- package/dist/oauth/providers/openai.js.map +0 -1
- package/dist/oauth/providers/xai.d.ts.map +0 -1
- package/dist/oauth/providers/xai.js.map +0 -1
- package/dist/oauth/providers.d.ts.map +0 -1
- package/dist/oauth/providers.js.map +0 -1
- package/dist/oauth/sse.d.ts.map +0 -1
- package/dist/oauth/sse.js.map +0 -1
- package/dist/oauth/store.d.ts.map +0 -1
- package/dist/oauth/store.js.map +0 -1
- package/dist/oauth/token-endpoint.d.ts.map +0 -1
- package/dist/oauth/token-endpoint.js.map +0 -1
- package/dist/oauth/types.d.ts.map +0 -1
- package/dist/oauth/types.js.map +0 -1
- package/dist/params.d.ts.map +0 -1
- package/dist/params.js.map +0 -1
- package/dist/report/build.d.ts.map +0 -1
- package/dist/report/build.js.map +0 -1
- package/dist/report/builtin.d.ts.map +0 -1
- package/dist/report/builtin.js.map +0 -1
- package/dist/report/code-frame.d.ts.map +0 -1
- package/dist/report/code-frame.js.map +0 -1
- package/dist/report/debug-steps.d.ts.map +0 -1
- package/dist/report/debug-steps.js.map +0 -1
- package/dist/report/explore-text.d.ts.map +0 -1
- package/dist/report/explore-text.js.map +0 -1
- package/dist/report/failure-text.d.ts.map +0 -1
- package/dist/report/failure-text.js.map +0 -1
- package/dist/report/format.d.ts.map +0 -1
- package/dist/report/format.js.map +0 -1
- package/dist/report/json.d.ts.map +0 -1
- package/dist/report/json.js.map +0 -1
- package/dist/report/junit.d.ts.map +0 -1
- package/dist/report/junit.js.map +0 -1
- package/dist/report/list-explore.d.ts.map +0 -1
- package/dist/report/list-explore.js.map +0 -1
- package/dist/report/list-model.d.ts.map +0 -1
- package/dist/report/list-model.js.map +0 -1
- package/dist/report/list-steps.d.ts.map +0 -1
- package/dist/report/list-steps.js.map +0 -1
- package/dist/report/list.d.ts.map +0 -1
- package/dist/report/list.js.map +0 -1
- package/dist/report/live-window.d.ts.map +0 -1
- package/dist/report/live-window.js.map +0 -1
- package/dist/report/markdown-text.d.ts.map +0 -1
- package/dist/report/markdown-text.js.map +0 -1
- package/dist/report/markdown.d.ts.map +0 -1
- package/dist/report/markdown.js.map +0 -1
- package/dist/report/outcome.d.ts.map +0 -1
- package/dist/report/outcome.js.map +0 -1
- package/dist/report/repeats.d.ts.map +0 -1
- package/dist/report/repeats.js.map +0 -1
- package/dist/report/running-tree.d.ts.map +0 -1
- package/dist/report/running-tree.js.map +0 -1
- package/dist/report/write.d.ts.map +0 -1
- package/dist/report/write.js.map +0 -1
- package/dist/run/app-ports.d.ts.map +0 -1
- package/dist/run/app-ports.js.map +0 -1
- package/dist/run/artifacts.d.ts.map +0 -1
- package/dist/run/artifacts.js.map +0 -1
- package/dist/run/budget.d.ts.map +0 -1
- package/dist/run/budget.js.map +0 -1
- package/dist/run/declared-processes.d.ts.map +0 -1
- package/dist/run/declared-processes.js.map +0 -1
- package/dist/run/events.d.ts.map +0 -1
- package/dist/run/events.js.map +0 -1
- package/dist/run/execute.d.ts.map +0 -1
- package/dist/run/execute.js.map +0 -1
- package/dist/run/extended-fixtures.d.ts.map +0 -1
- package/dist/run/extended-fixtures.js.map +0 -1
- package/dist/run/failure-evidence.d.ts.map +0 -1
- package/dist/run/failure-evidence.js.map +0 -1
- package/dist/run/fixture-recording.d.ts.map +0 -1
- package/dist/run/fixture-recording.js.map +0 -1
- package/dist/run/fixtures.d.ts.map +0 -1
- package/dist/run/fixtures.js.map +0 -1
- package/dist/run/in-process.d.ts.map +0 -1
- package/dist/run/in-process.js.map +0 -1
- package/dist/run/last-run.d.ts.map +0 -1
- package/dist/run/last-run.js.map +0 -1
- package/dist/run/managed-process.d.ts.map +0 -1
- package/dist/run/managed-process.js.map +0 -1
- package/dist/run/output.d.ts.map +0 -1
- package/dist/run/output.js.map +0 -1
- package/dist/run/process-pool.d.ts.map +0 -1
- package/dist/run/process-pool.js.map +0 -1
- package/dist/run/provision.d.ts.map +0 -1
- package/dist/run/provision.js.map +0 -1
- package/dist/run/realm.d.ts.map +0 -1
- package/dist/run/realm.js.map +0 -1
- package/dist/run/records.d.ts.map +0 -1
- package/dist/run/records.js.map +0 -1
- package/dist/run/retry.d.ts.map +0 -1
- package/dist/run/retry.js.map +0 -1
- package/dist/run/runner.d.ts.map +0 -1
- package/dist/run/runner.js.map +0 -1
- package/dist/run/scheduler.d.ts.map +0 -1
- package/dist/run/scheduler.js.map +0 -1
- package/dist/run/secrecy.d.ts.map +0 -1
- package/dist/run/secrecy.js.map +0 -1
- package/dist/run/serial.d.ts.map +0 -1
- package/dist/run/serial.js.map +0 -1
- package/dist/run/sessions.d.ts.map +0 -1
- package/dist/run/sessions.js.map +0 -1
- package/dist/run/standalone.d.ts.map +0 -1
- package/dist/run/standalone.js.map +0 -1
- package/dist/run/steps.d.ts.map +0 -1
- package/dist/run/steps.js.map +0 -1
- package/dist/run/trace-redaction.d.ts.map +0 -1
- package/dist/run/trace-redaction.js.map +0 -1
- package/dist/run/unit-runner.d.ts.map +0 -1
- package/dist/run/unit-runner.js.map +0 -1
- package/dist/run/units.d.ts.map +0 -1
- package/dist/run/units.js.map +0 -1
- package/dist/run/worker/entry.d.ts.map +0 -1
- package/dist/run/worker/entry.js.map +0 -1
- package/dist/run/worker/handle.d.ts.map +0 -1
- package/dist/run/worker/handle.js.map +0 -1
- package/dist/run/worker/protocol.d.ts.map +0 -1
- package/dist/run/worker/protocol.js.map +0 -1
- package/dist/run/worker/session.d.ts.map +0 -1
- package/dist/run/worker/session.js.map +0 -1
- package/dist/run/worker-models.d.ts.map +0 -1
- package/dist/run/worker-models.js.map +0 -1
- package/dist/secrets.d.ts.map +0 -1
- package/dist/secrets.js.map +0 -1
- package/dist/telemetry/checkout.d.ts.map +0 -1
- package/dist/telemetry/checkout.js.map +0 -1
- package/dist/telemetry/environment.d.ts.map +0 -1
- package/dist/telemetry/environment.js.map +0 -1
- package/dist/telemetry/events.d.ts.map +0 -1
- package/dist/telemetry/events.js.map +0 -1
- package/dist/telemetry/failure-kind.d.ts.map +0 -1
- package/dist/telemetry/failure-kind.js.map +0 -1
- package/dist/telemetry/posthog.d.ts.map +0 -1
- package/dist/telemetry/posthog.js.map +0 -1
- package/dist/telemetry/project.d.ts.map +0 -1
- package/dist/telemetry/project.js.map +0 -1
- package/dist/telemetry/store.d.ts.map +0 -1
- package/dist/telemetry/store.js.map +0 -1
- package/dist/telemetry/telemetry.d.ts.map +0 -1
- package/dist/telemetry/telemetry.js.map +0 -1
- package/dist/telemetry/token.d.ts.map +0 -1
- package/dist/telemetry/token.js.map +0 -1
- package/dist/types.d.ts.map +0 -1
- package/dist/types.js.map +0 -1
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
---
|
|
2
|
+
title: test
|
|
3
|
+
description: Tests, setup tests, groups, hooks, options, and fixtures.
|
|
4
|
+
---
|
|
5
|
+
|
|
6
|
+
Declare tests, groups, and hooks synchronously while the test file is
|
|
7
|
+
imported. Use `test.extend` to add fixtures and `test.skip` to skip a test at
|
|
8
|
+
registration or during its body.
|
|
9
|
+
|
|
10
|
+
```ts
|
|
11
|
+
export interface TestAPI<Fixtures = TestFixtures> {
|
|
12
|
+
/** Registers one test synchronously during module evaluation. */
|
|
13
|
+
(title: string, fn: TestFn<Fixtures>): TestCase;
|
|
14
|
+
/** Registers one configured test synchronously during module evaluation. */
|
|
15
|
+
(title: string, options: TestOptions, fn: TestFn<Fixtures>): TestCase;
|
|
16
|
+
/** Registers one skipped test. */
|
|
17
|
+
skip(title: string, fn: TestFn<Fixtures>): TestCase;
|
|
18
|
+
/**
|
|
19
|
+
* Inside a running test: skips it when `condition` is true (or always,
|
|
20
|
+
* with no condition), ending the body there. The attempt is reported
|
|
21
|
+
* `skipped` with `reason`; steps that already ran stay in the report, and
|
|
22
|
+
* teardown still runs. A setup test cannot skip: its sessions are owed.
|
|
23
|
+
* Outside a test body this form is `COLLECTION_ERROR`; use the `skip`
|
|
24
|
+
* option to skip at collection.
|
|
25
|
+
*/
|
|
26
|
+
skip(condition: boolean, reason?: string): void;
|
|
27
|
+
skip(reason?: string): void;
|
|
28
|
+
/** Registers one focused local test. CI rejects focused tests. */
|
|
29
|
+
only(title: string, fn: TestFn<Fixtures>): TestCase;
|
|
30
|
+
/** Registers one setup test with statically declared session outputs. */
|
|
31
|
+
setup(title: string, options: SetupOptions, fn: SetupFn<Fixtures>): TestCase;
|
|
32
|
+
/**
|
|
33
|
+
* Returns the same runtime `test`, typed with an engine's contributed
|
|
34
|
+
* fixtures. A pure type refinement, the fixtures still resolve from the
|
|
35
|
+
* target's engine at runtime, so a project types its device/desktop/web
|
|
36
|
+
* surface without a global `declare module` augmentation:
|
|
37
|
+
*
|
|
38
|
+
* export const test = base.extend<{ device: Device }>();
|
|
39
|
+
*/
|
|
40
|
+
extend<Extra>(): TestAPI<Fixtures & Extra>;
|
|
41
|
+
/**
|
|
42
|
+
* Returns a new `test` whose registrations carry these fixture
|
|
43
|
+
* definitions on top of the ones it already had. Each attempt sets them up
|
|
44
|
+
* in declaration order after the engine's fixtures, runs the hooks and the
|
|
45
|
+
* body with them, and tears them down in reverse order after `afterEach`:
|
|
46
|
+
*
|
|
47
|
+
* export const test = base.extend<{ workspace: Workspace }>({
|
|
48
|
+
* workspace: async ({ browser }, use) => {
|
|
49
|
+
* const workspace = await createWorkspace();
|
|
50
|
+
* await use(workspace);
|
|
51
|
+
* await workspace.cleanup();
|
|
52
|
+
* },
|
|
53
|
+
* });
|
|
54
|
+
*/
|
|
55
|
+
extend<Extra>(fixtures: FixtureDefinitions<Fixtures, Extra>): TestAPI<Fixtures & Extra>;
|
|
56
|
+
/** Declares a group synchronously. */
|
|
57
|
+
describe<Result>(title: string, body: SynchronousBody<Result>): void;
|
|
58
|
+
/** Declares a configured group synchronously. */
|
|
59
|
+
describe<Result>(
|
|
60
|
+
title: string,
|
|
61
|
+
options: DescribeOptions,
|
|
62
|
+
body: SynchronousBody<Result>,
|
|
63
|
+
): void;
|
|
64
|
+
/** Registers a test-attempt setup hook. */
|
|
65
|
+
beforeEach(fn: TestHookFn<Fixtures>): void;
|
|
66
|
+
/** Registers a test-attempt teardown hook. */
|
|
67
|
+
afterEach(fn: TestHookFn<Fixtures>): void;
|
|
68
|
+
/** Registers a suite-instance setup hook. */
|
|
69
|
+
beforeAll(fn: SuiteHookFn): void;
|
|
70
|
+
/** Registers a suite-instance teardown hook. */
|
|
71
|
+
afterAll(fn: SuiteHookFn): void;
|
|
72
|
+
}
|
|
73
|
+
|
|
74
|
+
export const test: TestAPI;
|
|
75
|
+
export const describe: TestAPI['describe'];
|
|
76
|
+
export const beforeEach: TestAPI['beforeEach'];
|
|
77
|
+
export const afterEach: TestAPI['afterEach'];
|
|
78
|
+
export const beforeAll: TestAPI['beforeAll'];
|
|
79
|
+
export const afterAll: TestAPI['afterAll'];
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
`describe` and the four hooks are also top-level exports, the same functions
|
|
83
|
+
as `test.describe` and `test.beforeEach` and the rest:
|
|
84
|
+
`import { describe, beforeEach, test } from 'e2e'`. A per-test hook imported
|
|
85
|
+
from `e2e` is typed with the core fixtures. `@e2e-dev/web` and
|
|
86
|
+
`@e2e-dev/mobile` export `test`, `describe`, and all four hooks typed with
|
|
87
|
+
their `browser` or `device` fixture, so a test file registers from one
|
|
88
|
+
import, and a `test` you extended with your own fixtures registers hooks
|
|
89
|
+
that see them through `test.beforeEach`.
|
|
90
|
+
|
|
91
|
+
Registering a test, group, or hook outside module evaluation throws
|
|
92
|
+
`COLLECTION_ERROR`.
|
|
93
|
+
|
|
94
|
+
A test or group title is 1 through 512 UTF-8 bytes after NFC normalization,
|
|
95
|
+
with no NUL character. Two tests in one file with the same title path, the
|
|
96
|
+
group titles and then the test's own, are a `COLLECTION_ERROR`.
|
|
97
|
+
|
|
98
|
+
## Members
|
|
99
|
+
|
|
100
|
+
A skipped test never affects the exit code. With `test.only`, other tests
|
|
101
|
+
are reported as `filtered`, and a CI run fails with `ONLY_IN_CI`.
|
|
102
|
+
|
|
103
|
+
Call `test.skip(condition, reason)` inside a test for conditions you learn at
|
|
104
|
+
runtime, such as a disabled feature flag. When the condition is true, the call
|
|
105
|
+
throws: the body stops at that line, as Playwright's does, and the test is
|
|
106
|
+
reported `skipped` with `reason`, with no retry. Nothing after the call runs.
|
|
107
|
+
Steps before it stay in the report as they ran, but they do not decide the
|
|
108
|
+
status: a failed `expect.soft` before the call is dropped. Hooks and fixtures still run their teardown. When the condition is
|
|
109
|
+
a precondition, call it first, before any step.
|
|
110
|
+
|
|
111
|
+
A setup test cannot skip because other tests depend on its sessions; the
|
|
112
|
+
call fails with `INVALID_ARGUMENT`. Outside a test body, the conditional
|
|
113
|
+
form is `COLLECTION_ERROR`. Use the `skip` option when declaring the test.
|
|
114
|
+
|
|
115
|
+
```ts
|
|
116
|
+
test('switches organizations', { session: 'admin' }, async ({ app, agent }) => {
|
|
117
|
+
const organizations = await listOrganizations();
|
|
118
|
+
test.skip(organizations.length < 2, 'the demo tenant has a single organization');
|
|
119
|
+
await app.open('/backend');
|
|
120
|
+
await agent.act(`switch to the organization "${organizations[1].name}"`);
|
|
121
|
+
});
|
|
122
|
+
```
|
|
123
|
+
`test.setup` must be top-level, not inside `describe`. An `async`
|
|
124
|
+
`describe` body is a type error and a `COLLECTION_ERROR`.
|
|
125
|
+
|
|
126
|
+
```ts
|
|
127
|
+
import { describe, test } from '@e2e-dev/web';
|
|
128
|
+
import { expect } from 'e2e';
|
|
129
|
+
|
|
130
|
+
test('app opens', async ({ app, browser }) => {
|
|
131
|
+
await app.open();
|
|
132
|
+
await expect(browser).toHaveURL('/');
|
|
133
|
+
});
|
|
134
|
+
|
|
135
|
+
test('checks out', { tags: ['billing'], retries: 2, timeout: 60_000 }, async ({ app }) => {
|
|
136
|
+
await app.open('/checkout');
|
|
137
|
+
});
|
|
138
|
+
|
|
139
|
+
describe('checkout', { tags: ['smoke'], serial: true }, () => {
|
|
140
|
+
test('adds an item', async ({ screen }) => {});
|
|
141
|
+
test('pays', async ({ screen }) => {});
|
|
142
|
+
});
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
`test.setup` declares the sessions it saves, and must save each exactly once:
|
|
146
|
+
|
|
147
|
+
```ts
|
|
148
|
+
import { credentials } from 'e2e';
|
|
149
|
+
|
|
150
|
+
test.setup('authenticate', { sessions: ['member'] }, async ({ app, screen, session }) => {
|
|
151
|
+
await app.open('/login');
|
|
152
|
+
await screen.getByLabel('Email').fill(credentials.user('member').username);
|
|
153
|
+
await screen.getByLabel('Password').fill(credentials.user('member').password);
|
|
154
|
+
await screen.getByRole('button', 'Sign in').tap();
|
|
155
|
+
await session.save('member');
|
|
156
|
+
});
|
|
157
|
+
```
|
|
158
|
+
|
|
159
|
+
Session names must match `/^[A-Za-z0-9_.-]{1,128}$/` and be unique.
|
|
160
|
+
Not saving a declared session, or saving one twice, throws `SESSION_CONTRACT`
|
|
161
|
+
at runtime.
|
|
162
|
+
|
|
163
|
+
```ts
|
|
164
|
+
export interface SetupSession {
|
|
165
|
+
/** Saves state under a setup-declared name. */
|
|
166
|
+
save(name: string): Promise<void>;
|
|
167
|
+
}
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
## Hooks
|
|
171
|
+
|
|
172
|
+
`beforeEach` hooks run outermost group first, then in declaration order
|
|
173
|
+
within a group. `afterEach` hooks run innermost first, in reverse declaration
|
|
174
|
+
order, after a failure or timeout too. `beforeAll` runs once per suite
|
|
175
|
+
instance on first entry into the scope; `afterAll` when the scope's last test
|
|
176
|
+
in the realm finishes. Hook order follows scope nesting, not position in the
|
|
177
|
+
file, so a hook declared after a test still applies to it.
|
|
178
|
+
|
|
179
|
+
The module is re-imported for every retry, serial group, and setup test, so
|
|
180
|
+
`beforeAll` runs again in each. A scope's `afterAll` runs as soon as its last
|
|
181
|
+
test in that realm is done. A realm that a failure discards runs `afterAll`
|
|
182
|
+
for every scope whose `beforeAll` started.
|
|
183
|
+
|
|
184
|
+
`beforeEach` and the body share the test timeout. Each `afterEach` hook gets
|
|
185
|
+
its own `cleanupTimeout` budget with working fixtures, so teardown can still
|
|
186
|
+
drive the app after the body timed out.
|
|
187
|
+
|
|
188
|
+
A throw inside `beforeAll` or `afterAll` is `HOOK_FAILED` and skips the
|
|
189
|
+
suite's tests with cause `hook-failed`. Inside a serial group it skips every
|
|
190
|
+
remaining member and fails the group without a retry.
|
|
191
|
+
|
|
192
|
+
## Options
|
|
193
|
+
|
|
194
|
+
```ts
|
|
195
|
+
export interface TestOptions {
|
|
196
|
+
/** Attempt deadline in milliseconds; defaults to `config.timeout`. Innermost wins. */
|
|
197
|
+
timeout?: number;
|
|
198
|
+
/** Retries, 0 through 10; defaults to `config.retries`. Inside a serial group the group's value applies. */
|
|
199
|
+
retries?: number;
|
|
200
|
+
/** Tags for `--tag`: distinct names, none blank, with no comma and no leading or trailing whitespace; every layer's tags are unioned. */
|
|
201
|
+
tags?: readonly string[];
|
|
202
|
+
/** Skips the test; a string is the reason. Any truthy layer skips. */
|
|
203
|
+
skip?: boolean | string;
|
|
204
|
+
/** Focuses the test locally. CI rejects it with `ONLY_IN_CI`. */
|
|
205
|
+
only?: boolean;
|
|
206
|
+
/** Platforms the test runs on; other targets skip it. Innermost wins. */
|
|
207
|
+
platforms?: readonly string[];
|
|
208
|
+
/** Capabilities the target must have; otherwise the test is skipped at selection. Innermost wins. */
|
|
209
|
+
requires?: readonly Capability[];
|
|
210
|
+
/** Session a setup test saved, restored before the body runs. */
|
|
211
|
+
session?: string;
|
|
212
|
+
/** Extra context for agent steps; layers are concatenated outermost first. */
|
|
213
|
+
agentContext?: string;
|
|
214
|
+
/**
|
|
215
|
+
* The configured agent (`agents.<name>`) this test or group runs with, in
|
|
216
|
+
* place of the run's agents. A list runs the test once per agent named, as
|
|
217
|
+
* one result each. Innermost wins; a call's own `agent` option wins over
|
|
218
|
+
* it. `--agent` narrows a list to the names both name and never overrides
|
|
219
|
+
* a pin the flag does not name.
|
|
220
|
+
*/
|
|
221
|
+
agent?: string | readonly string[];
|
|
222
|
+
/**
|
|
223
|
+
* Which of the test's attempts record a trace, in place of the run's: the
|
|
224
|
+
* same modes as the config's `trace`. Innermost wins, over `--trace` too;
|
|
225
|
+
* inside a serial group the group's value applies, since the group
|
|
226
|
+
* records as one unit. A mode set here is required of the target's engine.
|
|
227
|
+
*/
|
|
228
|
+
trace?: RecordingMode;
|
|
229
|
+
/**
|
|
230
|
+
* Which of the test's attempts record a video, in place of the run's:
|
|
231
|
+
* the same modes as the config's `video`. Innermost wins, over `--video`
|
|
232
|
+
* too; inside a serial group the group's value applies, since the group
|
|
233
|
+
* records as one unit. A mode set here is required of the target's engine.
|
|
234
|
+
*/
|
|
235
|
+
video?: RecordingMode;
|
|
236
|
+
}
|
|
237
|
+
|
|
238
|
+
export interface DescribeOptions extends Omit<TestOptions, 'only'> {
|
|
239
|
+
/** Runs the group as one ordered retry unit with shared app state. Nesting one serial group in another is a `COLLECTION_ERROR`. */
|
|
240
|
+
serial?: boolean;
|
|
241
|
+
}
|
|
242
|
+
|
|
243
|
+
export interface SetupOptions extends Omit<TestOptions, 'session' | 'only' | 'skip' | 'agent'> {
|
|
244
|
+
/** Session names this setup test MUST save. */
|
|
245
|
+
sessions: readonly string[];
|
|
246
|
+
/** A setup test runs once per target, so it pins at most one agent. */
|
|
247
|
+
agent?: string;
|
|
248
|
+
}
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
`timeout` must be a positive safe integer; `retries` must be an integer from
|
|
252
|
+
0 through 10. Groups do not accept `only`. An option key the call does not
|
|
253
|
+
take (`{ timout: 1000 }`) is `COLLECTION_ERROR`, naming the nearest known key
|
|
254
|
+
when it is a likely typo and every key the call takes otherwise. `test.setup` requires `sessions`
|
|
255
|
+
to be a static, non-empty array of unique names.
|
|
256
|
+
|
|
257
|
+
Resolution order: test, nearest group, outer groups, config, built-in default.
|
|
258
|
+
|
|
259
|
+
`requires` names capabilities of the target's engine, the harness ones
|
|
260
|
+
(`observation`, `actions`, `location`, `pointer`, `keyboard`, `state`,
|
|
261
|
+
`artifacts`) and one per contributed fixture (`browser`, `device`; see
|
|
262
|
+
[the engine contract](/reference/engine#engine)), or the kind of app the
|
|
263
|
+
target declares: `browser` for an `app.url`, `native-app` for an
|
|
264
|
+
`app.bundleId` or `app.appPath`. A target that lacks one skips the test at
|
|
265
|
+
selection:
|
|
266
|
+
|
|
267
|
+
```ts
|
|
268
|
+
test('onboarding asks for the camera', { requires: ['native-app'] }, async ({ app, agent }) => {
|
|
269
|
+
await app.open();
|
|
270
|
+
await agent.assert('The app asks for camera access');
|
|
271
|
+
});
|
|
272
|
+
```
|
|
273
|
+
|
|
274
|
+
An `agent` name that `agents` does not define is a `COLLECTION_ERROR` at
|
|
275
|
+
selection, before any test runs.
|
|
276
|
+
|
|
277
|
+
`trace` and `video` take a [recording mode](/reference/config#recording):
|
|
278
|
+
`off`, `on`, `retain-on-failure`, `on-first-retry`, or `on-all-retries`. A
|
|
279
|
+
test's or group's own value wins over `--trace` / `--video`, the target's,
|
|
280
|
+
and the config's, so one test can record on a run that records nothing, or
|
|
281
|
+
opt out of one that records everything. A mode set here is required: when it
|
|
282
|
+
records on some attempt and the target's engine cannot record that kind, the
|
|
283
|
+
run fails with `UNSUPPORTED_ARTIFACT` before any test starts, naming the
|
|
284
|
+
test:
|
|
285
|
+
|
|
286
|
+
```ts
|
|
287
|
+
test('checkout', { video: 'on' }, async ({ agent }) => {
|
|
288
|
+
await agent.act('Buy the first product in the catalog');
|
|
289
|
+
});
|
|
290
|
+
```
|
|
291
|
+
|
|
292
|
+
`serial: true` makes the group one ordered retry unit with shared app state
|
|
293
|
+
and shared secret state: a secret fill withholds pixels for the rest of the
|
|
294
|
+
group's attempt. A retry starts fresh. Inside it, `retries`, `trace`,
|
|
295
|
+
`video`, `session`, `platforms`, `requires`, `skip`, `only`, and a nested
|
|
296
|
+
`serial` on a member are collection errors. Set them on the group. The group
|
|
297
|
+
records one trace and one video per group attempt, from the `trace` and
|
|
298
|
+
`video` on the serial `describe` or a group around it.
|
|
299
|
+
|
|
300
|
+
## Fixtures
|
|
301
|
+
|
|
302
|
+
```ts
|
|
303
|
+
export interface TestFixtures {
|
|
304
|
+
/** Agent steps. Acquiring the built-in agent without a configured model is `MODEL_UNAVAILABLE`. */
|
|
305
|
+
readonly agent: Agent;
|
|
306
|
+
/** App lifecycle: open, restart, clear state, back, screenshot. */
|
|
307
|
+
readonly app: App;
|
|
308
|
+
/** Semantic queries and the actions on their matches. */
|
|
309
|
+
readonly screen: Screen;
|
|
310
|
+
/** The target's platform label: `web`, `ios`, `android`, or an engine's own string. */
|
|
311
|
+
readonly platform: string;
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
export interface SetupFixtures extends TestFixtures {
|
|
315
|
+
/** Saves the sessions the setup test declared. */
|
|
316
|
+
readonly session: SetupSession;
|
|
317
|
+
}
|
|
318
|
+
|
|
319
|
+
export interface SuiteFixtures {
|
|
320
|
+
/** The target's platform label: `web`, `ios`, `android`, or an engine's own string. */
|
|
321
|
+
readonly platform: string;
|
|
322
|
+
}
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
Everything else is a fixture the target's engine contributes, or one of
|
|
326
|
+
[your own](#your-own-fixtures). `@e2e-dev/web` contributes
|
|
327
|
+
[`browser`](/reference/web) and exports a `test` typed with it; a device
|
|
328
|
+
engine contributes `device`. Reaching for a fixture the engine does not
|
|
329
|
+
contribute fails with `UNSUPPORTED_CAPABILITY`; declare `requires: ['browser']`
|
|
330
|
+
to skip such tests at selection instead.
|
|
331
|
+
|
|
332
|
+
The fixtures above are lazy. Destructuring in the parameter list acquires
|
|
333
|
+
them before the body's first statement. Your own fixtures are not: every
|
|
334
|
+
fixture in the `extend` chain a test was registered through sets up for that
|
|
335
|
+
test, even when its parameters omit it.
|
|
336
|
+
|
|
337
|
+
### Your own fixtures
|
|
338
|
+
|
|
339
|
+
`test.extend(fixtures)` defines resources set up before each test and cleaned
|
|
340
|
+
up afterward, including after a failure. In each fixture function, code before
|
|
341
|
+
`await use(value)` sets up the resource. The test receives `value`, and code
|
|
342
|
+
after `use` tears it down.
|
|
343
|
+
|
|
344
|
+
```ts
|
|
345
|
+
import { test as base } from '@e2e-dev/web';
|
|
346
|
+
|
|
347
|
+
export const test = base.extend<{ workspace: Workspace }>({
|
|
348
|
+
workspace: async ({ browser }, use) => {
|
|
349
|
+
const workspace = await createWorkspace();
|
|
350
|
+
await signIn(browser, workspace);
|
|
351
|
+
await use(workspace); // the hooks and the body run here
|
|
352
|
+
await workspace.cleanup(); // teardown, after the body even when it failed
|
|
353
|
+
},
|
|
354
|
+
});
|
|
355
|
+
|
|
356
|
+
test('renames the workspace', async ({ workspace, screen }) => {
|
|
357
|
+
await screen.getByLabel('Name').fill(`${workspace.name} (renamed)`);
|
|
358
|
+
});
|
|
359
|
+
```
|
|
360
|
+
|
|
361
|
+
```ts
|
|
362
|
+
/**
|
|
363
|
+
* Defines one fixture: everything before `await use(value)` is its setup,
|
|
364
|
+
* everything after is its teardown. The body, its hooks, and later fixtures
|
|
365
|
+
* run while `use` is pending; it resolves once they are done, whether or not
|
|
366
|
+
* the body failed.
|
|
367
|
+
*/
|
|
368
|
+
export type FixtureFn<Fixtures, Value> = (
|
|
369
|
+
fixtures: Fixtures,
|
|
370
|
+
use: (value: Value) => Promise<void>,
|
|
371
|
+
) => Promise<void>;
|
|
372
|
+
|
|
373
|
+
/**
|
|
374
|
+
* One definition per fixture `test.extend()` adds. A definition sees the
|
|
375
|
+
* fixtures of the `test` it extends, not its siblings: a fixture that needs
|
|
376
|
+
* another one goes in a chained `extend()`. A name the base already has is a
|
|
377
|
+
* type error (and a `COLLECTION_ERROR` at runtime).
|
|
378
|
+
*/
|
|
379
|
+
export type FixtureDefinitions<Base, Extra> = {
|
|
380
|
+
readonly [K in keyof Extra]: K extends keyof Base ? never : FixtureFn<Base, Extra[K]>;
|
|
381
|
+
};
|
|
382
|
+
```
|
|
383
|
+
|
|
384
|
+
`extend` returns a new `test`; the one it was called on is unchanged. A
|
|
385
|
+
definition is typed against the fixtures of the `test` it extends, not its
|
|
386
|
+
siblings in the same call. A fixture that needs another goes in a chained
|
|
387
|
+
second `extend`: `base.extend({ a }).extend({ b })` gives `b` a fixture
|
|
388
|
+
object that already has `a`.
|
|
389
|
+
|
|
390
|
+
Per attempt:
|
|
391
|
+
|
|
392
|
+
1. Each definition runs in declaration order until it calls `use`, whether
|
|
393
|
+
or not the test names it: a fixture that opens a page or changes app
|
|
394
|
+
state does so for every test of that `test`, so a file whose tests need
|
|
395
|
+
different setups registers them through different `extend` chains. Setup
|
|
396
|
+
counts against the test `timeout`; a failure is reported in phase
|
|
397
|
+
`beforeEach`, before any `beforeEach` hook has run.
|
|
398
|
+
2. `beforeEach` hooks, the body, then `afterEach` hooks run with the same
|
|
399
|
+
fixture object. The fixture set is the test's own chain: a hook that reads
|
|
400
|
+
`workspace` around a test registered through `base` fails with
|
|
401
|
+
`UNSUPPORTED_CAPABILITY`.
|
|
402
|
+
3. Teardowns run in reverse order after the last `afterEach`, whether or not
|
|
403
|
+
the body passed, each with its own `cleanupTimeout` budget. An error there
|
|
404
|
+
fails a passing attempt in phase `afterEach` and joins `secondaryErrors`
|
|
405
|
+
after a body failure.
|
|
406
|
+
|
|
407
|
+
What fails, and where:
|
|
408
|
+
|
|
409
|
+
| Mistake | Fails |
|
|
410
|
+
| --- | --- |
|
|
411
|
+
| A value that is not a plain object of functions, an empty name, a core name (`agent`, `app`, `screen`, `platform`, `session`), or a name an earlier `extend` in the chain defined | At import, `COLLECTION_ERROR` naming the fixture |
|
|
412
|
+
| A name the target's engine contributes (`browser` on a Playwright target) | The attempt, in `beforeEach`, `TEST_SETUP_FAILED` |
|
|
413
|
+
| A definition that returns without calling `use` | The attempt, in `beforeEach`, `TEST_SETUP_FAILED` |
|
|
414
|
+
| A definition that calls `use` twice | The attempt, at teardown, `TEST_SETUP_FAILED` |
|
|
415
|
+
| A definition that throws before `use` | The attempt, in `beforeEach`, with that error |
|
|
416
|
+
| A definition that throws after `use` | The attempt, in `afterEach`, with that error |
|
|
417
|
+
|
|
418
|
+
A body or hook that hits the test `timeout` is abandoned, not cancelled, so
|
|
419
|
+
teardown starts while it may still be running. A setup abandoned this way
|
|
420
|
+
that reaches `use` later gets an immediate resolve, and its teardown runs
|
|
421
|
+
detached from the run, so what it allocated is still released.
|
|
422
|
+
|
|
423
|
+
## Function types
|
|
424
|
+
|
|
425
|
+
```ts
|
|
426
|
+
/** A test body. */
|
|
427
|
+
export type TestFn<Fixtures = TestFixtures> = (fixtures: Fixtures) => void | Promise<void>;
|
|
428
|
+
|
|
429
|
+
/** A setup test body; `session.save` is the extra fixture. */
|
|
430
|
+
export type SetupFn<Fixtures = TestFixtures> = (
|
|
431
|
+
fixtures: Fixtures & SetupFixtures,
|
|
432
|
+
) => void | Promise<void>;
|
|
433
|
+
|
|
434
|
+
/** A `beforeEach` or `afterEach` body. */
|
|
435
|
+
export type TestHookFn<Fixtures = TestFixtures> = (fixtures: Fixtures) => void | Promise<void>;
|
|
436
|
+
|
|
437
|
+
/** A `beforeAll` or `afterAll` body. */
|
|
438
|
+
export type SuiteHookFn = (fixtures: SuiteFixtures) => void | Promise<void>;
|
|
439
|
+
|
|
440
|
+
/** A `describe` body. An async body is a type error. */
|
|
441
|
+
export type SynchronousBody<Result> = Extract<Result, PromiseLike<unknown>> extends never
|
|
442
|
+
? () => Result
|
|
443
|
+
: never;
|
|
444
|
+
|
|
445
|
+
/** Opaque handle of a registered test. */
|
|
446
|
+
export interface TestCase {
|
|
447
|
+
readonly [testCaseBrand]: true;
|
|
448
|
+
}
|
|
449
|
+
```
|