testdriverai 7.1.4 → 7.2.2

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 (72) hide show
  1. package/.github/workflows/acceptance.yaml +81 -0
  2. package/.github/workflows/publish.yaml +44 -0
  3. package/agent/index.js +18 -19
  4. package/agent/interface.js +4 -0
  5. package/agent/lib/commands.js +321 -121
  6. package/agent/lib/redraw.js +99 -39
  7. package/agent/lib/sandbox.js +98 -6
  8. package/agent/lib/sdk.js +25 -0
  9. package/agent/lib/system.js +2 -1
  10. package/agent/lib/validation.js +6 -6
  11. package/docs/docs.json +211 -101
  12. package/docs/snippets/tests/type-repeated-replay.mdx +1 -1
  13. package/docs/v7/_drafts/caching-selectors.mdx +24 -0
  14. package/docs/v7/api/act.mdx +1 -1
  15. package/docs/v7/api/assert.mdx +1 -1
  16. package/docs/v7/api/assertions.mdx +7 -7
  17. package/docs/v7/api/elements.mdx +78 -0
  18. package/docs/v7/api/find.mdx +38 -0
  19. package/docs/v7/api/focusApplication.mdx +2 -2
  20. package/docs/v7/api/hover.mdx +2 -2
  21. package/docs/v7/features/ai-native.mdx +57 -71
  22. package/docs/v7/features/application-logs.mdx +353 -0
  23. package/docs/v7/features/browser-logs.mdx +414 -0
  24. package/docs/v7/features/cache-management.mdx +402 -0
  25. package/docs/v7/features/continuous-testing.mdx +346 -0
  26. package/docs/v7/features/coverage.mdx +508 -0
  27. package/docs/v7/features/data-driven-testing.mdx +441 -0
  28. package/docs/v7/features/easy-to-write.mdx +2 -73
  29. package/docs/v7/features/enterprise.mdx +155 -39
  30. package/docs/v7/features/fast.mdx +63 -81
  31. package/docs/v7/features/managed-sandboxes.mdx +384 -0
  32. package/docs/v7/features/network-monitoring.mdx +568 -0
  33. package/docs/v7/features/observable.mdx +3 -22
  34. package/docs/v7/features/parallel-execution.mdx +381 -0
  35. package/docs/v7/features/powerful.mdx +1 -1
  36. package/docs/v7/features/reports.mdx +414 -0
  37. package/docs/v7/features/sandbox-customization.mdx +229 -0
  38. package/docs/v7/features/scalable.mdx +217 -2
  39. package/docs/v7/features/stable.mdx +106 -147
  40. package/docs/v7/features/system-performance.mdx +616 -0
  41. package/docs/v7/features/test-analytics.mdx +373 -0
  42. package/docs/v7/features/test-cases.mdx +393 -0
  43. package/docs/v7/features/test-replays.mdx +408 -0
  44. package/docs/v7/features/test-reports.mdx +308 -0
  45. package/docs/v7/getting-started/{running-and-debugging.mdx → debugging-tests.mdx} +12 -142
  46. package/docs/v7/getting-started/quickstart.mdx +22 -305
  47. package/docs/v7/getting-started/running-tests.mdx +173 -0
  48. package/docs/v7/overview/what-is-testdriver.mdx +2 -14
  49. package/docs/v7/presets/chrome-extension.mdx +147 -122
  50. package/interfaces/cli/commands/init.js +3 -3
  51. package/interfaces/cli/lib/base.js +3 -2
  52. package/interfaces/logger.js +0 -2
  53. package/interfaces/shared-test-state.mjs +0 -5
  54. package/interfaces/vitest-plugin.mjs +70 -50
  55. package/lib/core/Dashcam.js +60 -85
  56. package/lib/vitest/hooks.mjs +42 -50
  57. package/package.json +1 -1
  58. package/sdk-log-formatter.js +350 -175
  59. package/sdk.d.ts +36 -3
  60. package/sdk.js +431 -116
  61. package/setup/aws/cloudformation.yaml +2 -2
  62. package/setup/aws/self-hosted.yml +1 -1
  63. package/test/testdriver/chrome-extension.test.mjs +55 -72
  64. package/test/testdriver/element-not-found.test.mjs +2 -1
  65. package/test/testdriver/hover-image.test.mjs +1 -1
  66. package/test/testdriver/scroll-until-text.test.mjs +10 -6
  67. package/test/testdriver/setup/lifecycleHelpers.mjs +19 -24
  68. package/test/testdriver/setup/testHelpers.mjs +18 -23
  69. package/vitest.config.mjs +3 -3
  70. package/.github/workflows/linux-tests.yml +0 -28
  71. package/docs/v7/getting-started/generating-tests.mdx +0 -525
  72. package/test/testdriver/auto-cache-key-demo.test.mjs +0 -56
package/sdk.d.ts CHANGED
@@ -215,6 +215,8 @@ export interface TestDriverOptions {
215
215
  apiRoot?: string;
216
216
  /** Sandbox resolution (default: '1366x768') */
217
217
  resolution?: string;
218
+ /** Operating system for the sandbox (default: 'linux') */
219
+ os?: 'windows' | 'linux';
218
220
  /** Enable analytics tracking (default: true) */
219
221
  analytics?: boolean;
220
222
  /** Enable console logging output (default: true) */
@@ -228,6 +230,31 @@ export interface TestDriverOptions {
228
230
  /** Threshold for findAll operations (default: 0.05 = 5% difference, 95% similarity) */
229
231
  findAll?: number;
230
232
  };
233
+ /** Force creation of a new sandbox (default: true) */
234
+ newSandbox?: boolean;
235
+ /** Run in headless mode (default: false) */
236
+ headless?: boolean;
237
+ /** Direct IP address to connect to a running sandbox instance */
238
+ ip?: string;
239
+ /** Custom AMI ID for sandbox instance (e.g., 'ami-1234') */
240
+ sandboxAmi?: string;
241
+ /** EC2 instance type for sandbox (e.g., 'i3.metal') */
242
+ sandboxInstance?: string;
243
+ /** Cache key for element finding operations. If provided, enables caching tied to this key */
244
+ cacheKey?: string;
245
+ /** Redraw configuration for screen change detection */
246
+ redraw?: boolean | {
247
+ /** Enable redraw detection (default: true) */
248
+ enabled?: boolean;
249
+ /** Pixel difference threshold for redraw detection */
250
+ diffThreshold?: number;
251
+ /** Enable screen redraw detection */
252
+ screenRedraw?: boolean;
253
+ /** Enable network activity monitoring */
254
+ networkMonitor?: boolean;
255
+ };
256
+ /** @deprecated Use redraw.diffThreshold instead */
257
+ redrawThreshold?: number | object;
231
258
  /** Additional environment variables */
232
259
  environment?: Record<string, any>;
233
260
  }
@@ -237,12 +264,18 @@ export interface ConnectOptions {
237
264
  sandboxId?: string;
238
265
  /** Force creation of a new sandbox */
239
266
  newSandbox?: boolean;
240
- /** Direct IP address to connect to */
267
+ /** Direct IP address to connect to a running sandbox instance */
241
268
  ip?: string;
242
- /** Custom AMI for sandbox */
269
+ /** Custom AMI ID for sandbox instance (e.g., 'ami-1234') */
243
270
  sandboxAmi?: string;
244
- /** Instance type for sandbox */
271
+ /** EC2 instance type for sandbox (e.g., 'i3.metal') */
245
272
  sandboxInstance?: string;
273
+ /** Operating system for the sandbox (default: 'linux') */
274
+ os?: 'windows' | 'linux';
275
+ /** Run in headless mode (default: false) */
276
+ headless?: boolean;
277
+ /** Reuse recent connection if available (default: true) */
278
+ reuseConnection?: boolean;
246
279
  }
247
280
 
248
281
  export interface SandboxInstance {