testdriverai 7.3.1 → 7.3.3

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 (362) hide show
  1. package/.claude/settings.local.json +7 -0
  2. package/.env.example +4 -0
  3. package/.github/workflows/acceptance-linux-scheduled.yaml +45 -0
  4. package/.github/workflows/acceptance-windows-scheduled.yaml +54 -0
  5. package/.github/workflows/acceptance.yaml +106 -0
  6. package/.github/workflows/publish.yaml +75 -0
  7. package/.github/workflows/test-init.yml +157 -0
  8. package/.github/workflows/testdriver.yml +170 -0
  9. package/.github/workflows/windows-self-hosted.yaml +82 -0
  10. package/.prettierignore +4 -0
  11. package/.prettierrc +1 -0
  12. package/CHANGELOG.md +158 -0
  13. package/SKILLs.md +17 -0
  14. package/agent/index.js +32 -3
  15. package/ai/.claude-plugin/plugin.json +9 -0
  16. package/docs/GITHUB_COMMENTS.md +330 -0
  17. package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +167 -0
  18. package/docs/QUICK-START-GITHUB-COMMENTS.md +84 -0
  19. package/docs/TEST-GITHUB-COMMENTS.md +129 -0
  20. package/docs/_scripts/generate-skills.js +149 -0
  21. package/docs/_scripts/link-replacer.js +164 -0
  22. package/docs/_scripts/upload-docs-to-openai.js +284 -0
  23. package/docs/claude-mcp-plugin.mdx +160 -0
  24. package/docs/docs.json +394 -0
  25. package/docs/github-integration-setup.md +266 -0
  26. package/docs/guide/best-practices-polling.mdx +154 -0
  27. package/docs/images/content/account/newprojectsettings.png +0 -0
  28. package/docs/images/content/account/projectpage.png +0 -0
  29. package/docs/images/content/account/projectreplays.png +0 -0
  30. package/docs/images/content/account/team-manage.png +0 -0
  31. package/docs/images/content/account/teampage.png +0 -0
  32. package/docs/images/content/extension/cursor.svg +1 -0
  33. package/docs/images/content/extension/vscode.svg +57 -0
  34. package/docs/images/content/extension/windsurf.svg +3 -0
  35. package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
  36. package/docs/images/content/side-by-side.png +0 -0
  37. package/docs/images/content/vscode/ide-full.png +0 -0
  38. package/docs/images/content/vscode/running.png +0 -0
  39. package/docs/images/content/vscode/vscode-2-assert.png +0 -0
  40. package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
  41. package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
  42. package/docs/images/content/vscode/vscode-file-creation.png +0 -0
  43. package/docs/images/content/vscode/vscode-install.png +0 -0
  44. package/docs/images/content/vscode/vscode-overview.png +0 -0
  45. package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
  46. package/docs/images/content/vscode/vscode-stopchat.png +0 -0
  47. package/docs/images/content/vscode/vscode-stoptest.png +0 -0
  48. package/docs/images/content/vscode/vscode-tdservice.png +0 -0
  49. package/docs/images/content/vscode/vscode-test-output.png +0 -0
  50. package/docs/images/content/vscode/vscode-testhistory.png +0 -0
  51. package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
  52. package/docs/images/content/vscode/vscode-testpane.png +0 -0
  53. package/docs/images/template/dark.png +0 -0
  54. package/docs/images/template/icon.png +0 -0
  55. package/docs/images/template/light.png +0 -0
  56. package/docs/snippets/calendar-link.mdx +4 -0
  57. package/docs/snippets/gitignore-warning.mdx +7 -0
  58. package/docs/snippets/lifecycle-warning.mdx +6 -0
  59. package/docs/snippets/test-prereqs.mdx +12 -0
  60. package/docs/snippets/tests/assert-replay.mdx +7 -0
  61. package/docs/snippets/tests/assert-yaml.mdx +8 -0
  62. package/docs/snippets/tests/exec-js-replay.mdx +7 -0
  63. package/docs/snippets/tests/exec-js-yaml.mdx +32 -0
  64. package/docs/snippets/tests/exec-shell-replay.mdx +7 -0
  65. package/docs/snippets/tests/exec-shell-yaml.mdx +15 -0
  66. package/docs/snippets/tests/hover-image-replay.mdx +7 -0
  67. package/docs/snippets/tests/hover-image-yaml.mdx +17 -0
  68. package/docs/snippets/tests/hover-text-replay.mdx +7 -0
  69. package/docs/snippets/tests/hover-text-with-description-replay.mdx +7 -0
  70. package/docs/snippets/tests/hover-text-with-description-yaml.mdx +24 -0
  71. package/docs/snippets/tests/hover-text-yaml.mdx +14 -0
  72. package/docs/snippets/tests/match-image-replay.mdx +7 -0
  73. package/docs/snippets/tests/match-image-yaml.mdx +17 -0
  74. package/docs/snippets/tests/press-keys-replay.mdx +7 -0
  75. package/docs/snippets/tests/press-keys-yaml.mdx +36 -0
  76. package/docs/snippets/tests/remember-replay.mdx +7 -0
  77. package/docs/snippets/tests/remember-yaml.mdx +28 -0
  78. package/docs/snippets/tests/scroll-replay.mdx +7 -0
  79. package/docs/snippets/tests/scroll-until-image-replay.mdx +7 -0
  80. package/docs/snippets/tests/scroll-until-image-yaml.mdx +14 -0
  81. package/docs/snippets/tests/scroll-until-text-replay.mdx +7 -0
  82. package/docs/snippets/tests/scroll-until-text-yaml.mdx +17 -0
  83. package/docs/snippets/tests/scroll-yaml.mdx +30 -0
  84. package/docs/snippets/tests/type-repeated-replay.mdx +7 -0
  85. package/docs/snippets/tests/type-repeated-yaml.mdx +22 -0
  86. package/docs/snippets/tests/type-replay.mdx +7 -0
  87. package/docs/snippets/tests/type-yaml.mdx +28 -0
  88. package/docs/snippets/tests/wait-for-image-replay.mdx +7 -0
  89. package/docs/snippets/tests/wait-for-image-yaml.mdx +18 -0
  90. package/docs/snippets/tests/wait-for-text-replay.mdx +7 -0
  91. package/docs/snippets/tests/wait-for-text-yaml.mdx +18 -0
  92. package/docs/snippets/tests/wait-replay.mdx +7 -0
  93. package/docs/snippets/tests/wait-yaml.mdx +13 -0
  94. package/docs/styles.css +65 -0
  95. package/docs/v6/account/dashboard.mdx +16 -0
  96. package/docs/v6/account/enterprise.mdx +110 -0
  97. package/docs/v6/account/pricing.mdx +33 -0
  98. package/docs/v6/account/projects.mdx +33 -0
  99. package/docs/v6/account/team.mdx +35 -0
  100. package/docs/v6/action/ami.mdx +109 -0
  101. package/docs/v6/action/performance.mdx +105 -0
  102. package/docs/v6/action/secrets.mdx +93 -0
  103. package/docs/v6/apps/chrome-extensions.mdx +48 -0
  104. package/docs/v6/apps/desktop-apps.mdx +93 -0
  105. package/docs/v6/apps/mobile-apps.mdx +26 -0
  106. package/docs/v6/apps/static-websites.mdx +54 -0
  107. package/docs/v6/apps/tauri-apps.mdx +361 -0
  108. package/docs/v6/bugs/jira.mdx +232 -0
  109. package/docs/v6/cli/overview.mdx +66 -0
  110. package/docs/v6/commands/assert.mdx +45 -0
  111. package/docs/v6/commands/exec.mdx +282 -0
  112. package/docs/v6/commands/focus-application.mdx +44 -0
  113. package/docs/v6/commands/hover-image.mdx +69 -0
  114. package/docs/v6/commands/hover-text.mdx +47 -0
  115. package/docs/v6/commands/if.mdx +53 -0
  116. package/docs/v6/commands/match-image.mdx +67 -0
  117. package/docs/v6/commands/press-keys.mdx +87 -0
  118. package/docs/v6/commands/remember.mdx +49 -0
  119. package/docs/v6/commands/run.mdx +44 -0
  120. package/docs/v6/commands/scroll-until-image.mdx +66 -0
  121. package/docs/v6/commands/scroll-until-text.mdx +60 -0
  122. package/docs/v6/commands/scroll.mdx +69 -0
  123. package/docs/v6/commands/type.mdx +45 -0
  124. package/docs/v6/commands/wait-for-image.mdx +54 -0
  125. package/docs/v6/commands/wait-for-text.mdx +48 -0
  126. package/docs/v6/commands/wait.mdx +45 -0
  127. package/docs/v6/exporting/junit.mdx +218 -0
  128. package/docs/v6/exporting/playwright.mdx +197 -0
  129. package/docs/v6/features/auto-healing.mdx +144 -0
  130. package/docs/v6/features/generation.mdx +116 -0
  131. package/docs/v6/features/parallel-testing.mdx +151 -0
  132. package/docs/v6/features/reusable-snippets.mdx +131 -0
  133. package/docs/v6/features/selectorless.mdx +80 -0
  134. package/docs/v6/features/visual-assertions.mdx +139 -0
  135. package/docs/v6/getting-started/ci.mdx +146 -0
  136. package/docs/v6/getting-started/cli.mdx +91 -0
  137. package/docs/v6/getting-started/editing.mdx +100 -0
  138. package/docs/v6/getting-started/playwright.mdx +342 -0
  139. package/docs/v6/getting-started/running.mdx +48 -0
  140. package/docs/v6/getting-started/self-hosting.mdx +408 -0
  141. package/docs/v6/getting-started/vscode.mdx +88 -0
  142. package/docs/v6/guide/assertions.mdx +189 -0
  143. package/docs/v6/guide/authentication.mdx +136 -0
  144. package/docs/v6/guide/code.mdx +65 -0
  145. package/docs/v6/guide/dashcam.mdx +118 -0
  146. package/docs/v6/guide/environment-variables.mdx +26 -0
  147. package/docs/v6/guide/lifecycle.mdx +242 -0
  148. package/docs/v6/guide/locating.mdx +141 -0
  149. package/docs/v6/guide/protips.mdx +43 -0
  150. package/docs/v6/guide/variables.mdx +143 -0
  151. package/docs/v6/guide/waiting.mdx +130 -0
  152. package/docs/v6/importing/csv.mdx +196 -0
  153. package/docs/v6/importing/gherkin.mdx +143 -0
  154. package/docs/v6/importing/jira.mdx +164 -0
  155. package/docs/v6/importing/testrail.mdx +162 -0
  156. package/docs/v6/integrations/electron.mdx +146 -0
  157. package/docs/v6/integrations/netlify.mdx +100 -0
  158. package/docs/v6/integrations/vercel.mdx +125 -0
  159. package/docs/v6/interactive/explore.mdx +99 -0
  160. package/docs/v6/interactive/run.mdx +52 -0
  161. package/docs/v6/interactive/save.mdx +63 -0
  162. package/docs/v6/overview/comparison.mdx +101 -0
  163. package/docs/v6/overview/faq.mdx +162 -0
  164. package/docs/v6/overview/performance.mdx +52 -0
  165. package/docs/v6/overview/quickstart.mdx +137 -0
  166. package/docs/v6/overview/what-is-testdriver.mdx +85 -0
  167. package/docs/v6/scenarios/ai-chatbot.mdx +28 -0
  168. package/docs/v6/scenarios/cookie-banner.mdx +32 -0
  169. package/docs/v6/scenarios/file-upload.mdx +33 -0
  170. package/docs/v6/scenarios/form-filling.mdx +32 -0
  171. package/docs/v6/scenarios/log-in.mdx +75 -0
  172. package/docs/v6/scenarios/pdf-generation.mdx +25 -0
  173. package/docs/v6/scenarios/spell-check.mdx +22 -0
  174. package/docs/v6/security/action.mdx +84 -0
  175. package/docs/v6/security/agent.mdx +73 -0
  176. package/docs/v6/security/platform.mdx +77 -0
  177. package/docs/v6/tutorials/advanced-test.mdx +81 -0
  178. package/docs/v6/tutorials/basic-test.mdx +45 -0
  179. package/docs/v7/_drafts/agents.mdx +852 -0
  180. package/docs/v7/_drafts/architecture.mdx +399 -0
  181. package/docs/v7/_drafts/auto-cache-key.mdx +167 -0
  182. package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +100 -0
  183. package/docs/v7/_drafts/best-practices.mdx +486 -0
  184. package/docs/v7/_drafts/caching-ai.mdx +215 -0
  185. package/docs/v7/_drafts/caching-selectors.mdx +424 -0
  186. package/docs/v7/_drafts/caching.mdx +366 -0
  187. package/docs/v7/_drafts/cli-to-sdk-migration.mdx +425 -0
  188. package/docs/v7/_drafts/commands/assert.mdx +45 -0
  189. package/docs/v7/_drafts/commands/exec.mdx +282 -0
  190. package/docs/v7/_drafts/commands/focus-application.mdx +44 -0
  191. package/docs/v7/_drafts/commands/hover-image.mdx +69 -0
  192. package/docs/v7/_drafts/commands/hover-text.mdx +47 -0
  193. package/docs/v7/_drafts/commands/if.mdx +53 -0
  194. package/docs/v7/_drafts/commands/match-image.mdx +67 -0
  195. package/docs/v7/_drafts/commands/press-keys.mdx +87 -0
  196. package/docs/v7/_drafts/commands/remember.mdx +49 -0
  197. package/docs/v7/_drafts/commands/run.mdx +44 -0
  198. package/docs/v7/_drafts/commands/scroll-until-image.mdx +66 -0
  199. package/docs/v7/_drafts/commands/scroll-until-text.mdx +60 -0
  200. package/docs/v7/_drafts/commands/scroll.mdx +69 -0
  201. package/docs/v7/_drafts/commands/type.mdx +45 -0
  202. package/docs/v7/_drafts/commands/wait-for-image.mdx +54 -0
  203. package/docs/v7/_drafts/commands/wait-for-text.mdx +48 -0
  204. package/docs/v7/_drafts/commands/wait.mdx +45 -0
  205. package/docs/v7/_drafts/configuration.mdx +378 -0
  206. package/docs/v7/_drafts/contributing.mdx +174 -0
  207. package/docs/v7/_drafts/core.mdx +458 -0
  208. package/docs/v7/_drafts/dashcam-title-feature.mdx +89 -0
  209. package/docs/v7/_drafts/debugging.mdx +349 -0
  210. package/docs/v7/_drafts/error-handling.mdx +501 -0
  211. package/docs/v7/_drafts/faq.mdx +393 -0
  212. package/docs/v7/_drafts/hooks.mdx +360 -0
  213. package/docs/v7/_drafts/init-command.mdx +95 -0
  214. package/docs/v7/_drafts/installation.mdx +420 -0
  215. package/docs/v7/_drafts/migration.mdx +562 -0
  216. package/docs/v7/_drafts/observable.mdx +604 -0
  217. package/docs/v7/_drafts/playwright.mdx +342 -0
  218. package/docs/v7/_drafts/plugin-migration.mdx +220 -0
  219. package/docs/v7/_drafts/powerful.mdx +419 -0
  220. package/docs/v7/_drafts/presets.mdx +210 -0
  221. package/docs/v7/_drafts/progressive-disclosure.mdx +230 -0
  222. package/docs/v7/_drafts/prompt-cache.mdx +200 -0
  223. package/docs/v7/_drafts/provision.mdx +390 -0
  224. package/docs/v7/_drafts/quick-start-test-recording.mdx +214 -0
  225. package/docs/v7/_drafts/readme.mdx +135 -0
  226. package/docs/v7/_drafts/reports.mdx +414 -0
  227. package/docs/v7/_drafts/scalable.mdx +754 -0
  228. package/docs/v7/_drafts/screenshot.mdx +155 -0
  229. package/docs/v7/_drafts/sdk-awesome-logs.mdx +468 -0
  230. package/docs/v7/_drafts/sdk-browser-rendering.mdx +167 -0
  231. package/docs/v7/_drafts/sdk-migration.mdx +474 -0
  232. package/docs/v7/_drafts/sdk-v7-complete.mdx +345 -0
  233. package/docs/v7/_drafts/self-hosting.mdx +369 -0
  234. package/docs/v7/_drafts/test-recording.mdx +382 -0
  235. package/docs/v7/_drafts/troubleshooting.mdx +526 -0
  236. package/docs/v7/_drafts/vitest-plugin.mdx +477 -0
  237. package/docs/v7/_drafts/vitest.mdx +535 -0
  238. package/docs/v7/_drafts/writing-tests.mdx +25 -0
  239. package/{ai/skills/testdriver:ai/SKILL.md → docs/v7/ai.mdx} +4 -3
  240. package/{ai/skills/testdriver:assert/SKILL.md → docs/v7/assert.mdx} +4 -3
  241. package/{ai/skills/testdriver:aws-setup/SKILL.md → docs/v7/aws-setup.mdx} +4 -3
  242. package/{ai/skills/testdriver:caching/SKILL.md → docs/v7/caching.mdx} +7 -3
  243. package/{ai/skills/testdriver:captcha/SKILL.md → docs/v7/captcha.mdx} +4 -3
  244. package/{ai/skills/testdriver:ci-cd/SKILL.md → docs/v7/ci-cd.mdx} +4 -3
  245. package/{ai/skills/testdriver:click/SKILL.md → docs/v7/click.mdx} +4 -3
  246. package/{ai/skills/testdriver:client/SKILL.md → docs/v7/client.mdx} +8 -3
  247. package/{ai/skills/testdriver:cloud/SKILL.md → docs/v7/cloud.mdx} +4 -3
  248. package/{ai/skills/testdriver:customizing-devices/SKILL.md → docs/v7/customizing-devices.mdx} +3 -3
  249. package/{ai/skills/testdriver:dashcam/SKILL.md → docs/v7/dashcam.mdx} +4 -3
  250. package/docs/v7/debugging-with-screenshots.mdx +402 -0
  251. package/{ai/skills/testdriver:device-config/SKILL.md → docs/v7/device-config.mdx} +3 -3
  252. package/{ai/skills/testdriver:double-click/SKILL.md → docs/v7/double-click.mdx} +3 -3
  253. package/{ai/skills/testdriver:elements/SKILL.md → docs/v7/elements.mdx} +4 -3
  254. package/{ai/skills/testdriver:enterprise/SKILL.md → docs/v7/enterprise.mdx} +5 -3
  255. package/docs/v7/examples.mdx +5 -0
  256. package/{ai/skills/testdriver:exec/SKILL.md → docs/v7/exec.mdx} +4 -3
  257. package/{ai/skills/testdriver:find/SKILL.md → docs/v7/find.mdx} +4 -3
  258. package/{ai/skills/testdriver:focus-application/SKILL.md → docs/v7/focus-application.mdx} +4 -3
  259. package/{ai/skills/testdriver:generating-tests/SKILL.md → docs/v7/generating-tests.mdx} +3 -3
  260. package/{ai/skills/testdriver:hover/SKILL.md → docs/v7/hover.mdx} +4 -3
  261. package/{ai/skills/testdriver:locating-elements/SKILL.md → docs/v7/locating-elements.mdx} +3 -3
  262. package/{ai/skills/testdriver:making-assertions/SKILL.md → docs/v7/making-assertions.mdx} +3 -3
  263. package/{ai/skills/testdriver:mouse-down/SKILL.md → docs/v7/mouse-down.mdx} +3 -3
  264. package/{ai/skills/testdriver:mouse-up/SKILL.md → docs/v7/mouse-up.mdx} +3 -3
  265. package/docs/v7/ocr.mdx +236 -0
  266. package/{ai/skills/testdriver:performing-actions/SKILL.md → docs/v7/performing-actions.mdx} +3 -3
  267. package/{ai/skills/testdriver:press-keys/SKILL.md → docs/v7/press-keys.mdx} +4 -3
  268. package/{ai/skills/testdriver:quickstart/SKILL.md → docs/v7/quickstart.mdx} +6 -20
  269. package/{ai/skills/testdriver:reusable-code/SKILL.md → docs/v7/reusable-code.mdx} +3 -3
  270. package/{ai/skills/testdriver:right-click/SKILL.md → docs/v7/right-click.mdx} +3 -3
  271. package/{ai/skills/testdriver:running-tests/SKILL.md → docs/v7/running-tests.mdx} +7 -3
  272. package/{ai/skills/testdriver:screenshot/SKILL.md → docs/v7/screenshot.mdx} +88 -6
  273. package/{ai/skills/testdriver:scroll/SKILL.md → docs/v7/scroll.mdx} +40 -3
  274. package/{ai/skills/testdriver:secrets/SKILL.md → docs/v7/secrets.mdx} +3 -3
  275. package/{ai/skills/testdriver:self-hosted/SKILL.md → docs/v7/self-hosted.mdx} +4 -3
  276. package/{ai/skills/testdriver:type/SKILL.md → docs/v7/type.mdx} +4 -3
  277. package/{ai/skills/testdriver:variables/SKILL.md → docs/v7/variables.mdx} +3 -3
  278. package/{ai/skills/testdriver:waiting-for-elements/SKILL.md → docs/v7/waiting-for-elements.mdx} +3 -3
  279. package/{ai/skills/testdriver:what-is-testdriver/SKILL.md → docs/v7/what-is-testdriver.mdx} +3 -3
  280. package/eslint.config.js +67 -0
  281. package/examples/ai.test.mjs +30 -0
  282. package/examples/assert.test.mjs +47 -0
  283. package/examples/captcha-api.test.mjs +50 -0
  284. package/examples/chrome-extension.test.mjs +94 -0
  285. package/examples/drag-and-drop.test.mjs +58 -0
  286. package/examples/element-not-found.test.mjs +26 -0
  287. package/examples/exec-output.test.mjs +59 -0
  288. package/examples/exec-pwsh.test.mjs +57 -0
  289. package/examples/focus-window.test.mjs +36 -0
  290. package/examples/formatted-logging.test.mjs +26 -0
  291. package/examples/hover-image.test.mjs +52 -0
  292. package/examples/hover-text-with-description.test.mjs +56 -0
  293. package/examples/hover-text.test.mjs +27 -0
  294. package/examples/installer.test.mjs +49 -0
  295. package/examples/launch-vscode-linux.test.mjs +54 -0
  296. package/examples/match-image.test.mjs +54 -0
  297. package/examples/no-provision.test.mjs +23 -0
  298. package/examples/press-keys.test.mjs +50 -0
  299. package/examples/prompt.test.mjs +33 -0
  300. package/examples/scroll-keyboard.test.mjs +37 -0
  301. package/examples/scroll-until-image.test.mjs +39 -0
  302. package/examples/scroll-until-text.test.mjs +67 -0
  303. package/examples/scroll.test.mjs +41 -0
  304. package/examples/type.test.mjs +45 -0
  305. package/examples/windows-installer.test.mjs +53 -0
  306. package/jsconfig.json +26 -0
  307. package/lib/vitest/hooks.mjs +3 -0
  308. package/manual/test-init-command.js +223 -0
  309. package/mcp-server/README.md +312 -0
  310. package/mcp-server/mcp-app.html +28 -0
  311. package/mcp-server/mcp-config.example.json +19 -0
  312. package/mcp-server/package-lock.json +4018 -0
  313. package/mcp-server/package.json +29 -0
  314. package/mcp-server/src/codegen.ts +189 -0
  315. package/mcp-server/src/mcp-app.css +360 -0
  316. package/mcp-server/src/mcp-app.ts +547 -0
  317. package/mcp-server/src/provision-types.ts +209 -0
  318. package/mcp-server/src/server.ts +2313 -0
  319. package/mcp-server/src/session.ts +194 -0
  320. package/mcp-server/tsconfig.json +16 -0
  321. package/mcp-server/vite.config.ts +23 -0
  322. package/package.json +2 -17
  323. package/scripts/generate-skills.js +94 -0
  324. package/sdk.js +3 -0
  325. package/setup/aws/cloudformation.yaml +470 -0
  326. package/setup/aws/spawn-runner.sh +190 -0
  327. package/test/api-resilience.test.mjs +0 -0
  328. package/test/captcha-solver.test.mjs +152 -0
  329. package/test/chrome-remote-debugging.test.mjs +66 -0
  330. package/test/duckduckgo/experiment.test.mjs +28 -0
  331. package/test/duckduckgo/setup.test.mjs +29 -0
  332. package/test/manual/debug-locate-response.js +82 -0
  333. package/test/manual/reconnect-provision.test.mjs +49 -0
  334. package/test/manual/test-console-logs.test.mjs +42 -0
  335. package/test/manual/test-find-api.js +73 -0
  336. package/test/manual/test-init.sh +54 -0
  337. package/test/manual/test-prompt-cache.js +97 -0
  338. package/test/manual/test-provision-auth.mjs +22 -0
  339. package/test/manual/test-sandbox-render.js +29 -0
  340. package/test/manual/test-sdk-methods.js +15 -0
  341. package/test/manual/test-sdk-refactor.js +53 -0
  342. package/test/manual/test-stack-trace.mjs +57 -0
  343. package/test/manual/verify-element-api.js +89 -0
  344. package/test/manual/verify-types.js +0 -0
  345. package/test/manual-unawaited-promise.test.mjs +31 -0
  346. package/test-ide-preview.mjs +17 -0
  347. package/tests/airbnb-booking.test.mjs +39 -0
  348. package/tests/airbnb-search.test.mjs +43 -0
  349. package/tests/example.test.js +33 -0
  350. package/tests/login.js +28 -0
  351. package/vitest.config.mjs +24 -0
  352. package/vscode-extension/.vscodeignore +12 -0
  353. package/vscode-extension/README.md +94 -0
  354. package/vscode-extension/media/icon.png +0 -0
  355. package/vscode-extension/package-lock.json +4126 -0
  356. package/vscode-extension/package.json +86 -0
  357. package/vscode-extension/src/extension.ts +829 -0
  358. package/vscode-extension/testdriverai-0.1.0.vsix +0 -0
  359. package/vscode-extension/tsconfig.json +16 -0
  360. package/ai/skills/testdriver:examples/SKILL.md +0 -7
  361. package/ai/skills/testdriver:mcp-workflow/SKILL.md +0 -410
  362. package/ai/skills/testdriver:testdriver/SKILL.md +0 -523
@@ -0,0 +1,27 @@
1
+ /**
2
+ * TestDriver SDK - Hover Text Test (Vitest)
3
+ * Converted from: testdriver/acceptance/hover-text.yaml
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ describe("Hover Text Test", () => {
10
+ it("should click Sign In and verify error message", async (context) => {
11
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
12
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
+
14
+ // Click on Sign In button using new find() API
15
+
16
+ const signInButton = await testdriver.find(
17
+ "Sign In, black button below the password field",
18
+ );
19
+ await signInButton.click();
20
+
21
+ // Assert that an error shows that fields are required
22
+ const result = await testdriver.assert(
23
+ "an error shows that fields are required",
24
+ );
25
+ expect(result).toBeTruthy();
26
+ });
27
+ });
@@ -0,0 +1,49 @@
1
+ /**
2
+ * TestDriver SDK - Installer Test (Vitest)
3
+ * Tests the provision.installer() method for downloading and installing apps
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ const isLinux = (process.env.TD_OS || "linux") === "linux";
10
+
11
+ describe("Provision Installer", () => {
12
+ it.skipIf(!isLinux)(
13
+ "should download and install a .deb package on Linux",
14
+ async (context) => {
15
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
16
+
17
+ // Install bat (a cat clone with syntax highlighting) using provision.installer
18
+ const filePath = await testdriver.provision.installer({
19
+ url: 'https://github.com/sharkdp/bat/releases/download/v0.24.0/bat_0.24.0_amd64.deb',
20
+ });
21
+
22
+ // Verify the file was downloaded
23
+ expect(filePath).toContain('bat');
24
+
25
+ // Verify bat was installed by running it
26
+ await testdriver.exec('sh', 'bat --version', 10000);
27
+ },
28
+ );
29
+
30
+ it.skipIf(!isLinux)(
31
+ "should download a shell script and verify it exists",
32
+ async (context) => {
33
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
34
+
35
+ // Download a shell script (nvm installer)
36
+ const filePath = await testdriver.provision.installer({
37
+ url: 'https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh',
38
+ launch: false, // Don't auto-run the script
39
+ });
40
+
41
+ // Verify the file was downloaded
42
+ expect(filePath).toContain('install.sh');
43
+
44
+ // Verify the file is executable
45
+ const result = await testdriver.exec('sh', `ls -la "${filePath}"`, 10000);
46
+ expect(result).toBeTruthy();
47
+ },
48
+ );
49
+ });
@@ -0,0 +1,54 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
3
+
4
+ const isLinux = (process.env.TD_OS || "linux") === "linux";
5
+
6
+ describe("Launch VS Code on Linux", () => {
7
+ it.skipIf(!isLinux)(
8
+ "should launch VS Code on Debian/Ubuntu",
9
+ async (context) => {
10
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
11
+
12
+ // provision.vscode() automatically calls ready() and starts dashcam
13
+ await testdriver.provision.vscode();
14
+
15
+ // Wait for VS Code to launch (polls every 5s until found or timeout)
16
+ const vsCodeWindow = await testdriver.find(
17
+ "Visual Studio Code window",
18
+ { timeout: 60000 }
19
+ );
20
+ expect(vsCodeWindow.found()).toBeTruthy();
21
+ },
22
+ );
23
+
24
+ it.skipIf(!isLinux)(
25
+ "should install and use a VS Code extension",
26
+ async (context) => {
27
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP });
28
+
29
+ // Launch VS Code with the Prettier extension installed
30
+ await testdriver.provision.vscode({
31
+ extensions: ["esbenp.prettier-vscode"],
32
+ });
33
+
34
+ const vsCodeWindow = await testdriver.find(
35
+ "Visual Studio Code window",
36
+ { timeout: 60000 }
37
+ );
38
+
39
+ expect(vsCodeWindow.found()).toBeTruthy();
40
+
41
+ // Open the extensions panel to verify Prettier is installed
42
+ await testdriver.pressKeys(["ctrl", "shift", "x"]);
43
+
44
+ // Wait for extensions panel to open
45
+ await new Promise((resolve) => setTimeout(resolve, 2000));
46
+
47
+ // Assert that Prettier extension is visible in the installed extensions
48
+ const prettierVisible = await testdriver.assert(
49
+ "Prettier extension is visible in the extensions panel or sidebar",
50
+ );
51
+ expect(prettierVisible).toBeTruthy();
52
+ },
53
+ );
54
+ });
@@ -0,0 +1,54 @@
1
+ /**
2
+ * TestDriver SDK - Match Image Test (Vitest)
3
+ * Converted from: testdriver/acceptance/match-image.yaml
4
+ */
5
+
6
+ import path, { dirname } from "path";
7
+ import { fileURLToPath } from "url";
8
+ import { describe, expect, it } from "vitest";
9
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
10
+
11
+ /**
12
+ * Perform login flow for SauceLabs demo app
13
+ * @param {TestDriver} client - TestDriver client
14
+ * @param {string} username - Username (default: 'standard_user')
15
+ */
16
+ async function performLogin(client, username = "standard_user") {
17
+ await client.focusApplication("Google Chrome");
18
+ const password = await client.extract("the password");
19
+ const usernameField = await client.find(
20
+ "username input",
21
+ );
22
+ await usernameField.click();
23
+ await client.type(username);
24
+ await client.pressKeys(["tab"]);
25
+ await client.type(password, { secret: true });
26
+ await client.pressKeys(["tab"]);
27
+ await client.pressKeys(["enter"]);
28
+ }
29
+
30
+ // Get the directory of the current module
31
+ const __filename = fileURLToPath(import.meta.url);
32
+ const __dirname = dirname(__filename);
33
+
34
+ describe("Match Image Test", () => {
35
+ it.skip("should match shopping cart image and verify empty cart", async (context) => {
36
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
37
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
38
+
39
+ //
40
+ // Perform login first
41
+ await performLogin(testdriver);
42
+
43
+ // Match and click the shopping cart icon
44
+ const cartImagePath = path.resolve(
45
+ __dirname,
46
+ "../../_testdriver/acceptance/screenshots/cart.png",
47
+ );
48
+ await testdriver.matchImage(cartImagePath, "click");
49
+
50
+ // Assert that you see an empty shopping cart
51
+ const result = await testdriver.assert("Your cart is empty");
52
+ expect(result).toBeTruthy();
53
+ });
54
+ });
@@ -0,0 +1,23 @@
1
+ /**
2
+ * TestDriver SDK - Assert Test (Vitest)
3
+ * Converted from: testdriver/acceptance/assert.yaml
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ describe("Assert Test", () => {
10
+ it("should assert the testdriver login page shows", async (context) => {
11
+ const testdriver = TestDriver(context, {
12
+ ip: context.ip || process.env.TD_IP,
13
+ });
14
+
15
+ // Assert the TestDriver.ai Sandbox login page is displayed
16
+ const result = await testdriver.assert(
17
+ "A desktop is visible",
18
+ );
19
+
20
+ expect(result).toBeTruthy();
21
+ });
22
+ });
23
+
@@ -0,0 +1,50 @@
1
+ /**
2
+ * TestDriver SDK - Press Keys Test (Vitest)
3
+ * Converted from: testdriver/acceptance/press-keys.yaml
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ describe("Press Keys Test", () => {
10
+ it("should create tabs and navigate using keyboard shortcuts", async (context) => {
11
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
+
14
+ const signInButton = await testdriver.find(
15
+ "Sign In, black button below the password field",
16
+ );
17
+ await signInButton.click();
18
+
19
+ // Open new tab
20
+ await testdriver.pressKeys(["ctrl", "t"]);
21
+
22
+ // Poll for "Learn more" to appear
23
+ let learnMore = await testdriver.find("Learn more");
24
+ for (let i = 0; i < 10; i++) {
25
+ learnMore = await learnMore.find();
26
+ if (learnMore.found()) break;
27
+ await new Promise((resolve) => setTimeout(resolve, 500));
28
+ }
29
+
30
+ // Open DevTools
31
+ await testdriver.pressKeys(["ctrl", "shift", "i"]);
32
+
33
+ // Poll for "Elements" to appear
34
+ let elements = await testdriver.find("Elements");
35
+ for (let i = 0; i < 10; i++) {
36
+ elements = await elements.find();
37
+ if (elements.found()) break;
38
+ await new Promise((resolve) => setTimeout(resolve, 500));
39
+ }
40
+
41
+ // Open another tab and navigate
42
+ await testdriver.pressKeys(["ctrl", "t"]);
43
+ await testdriver.type("google.com");
44
+ await testdriver.pressKeys(["enter"]);
45
+
46
+ // Assert Google appears
47
+ const result = await testdriver.assert("google appears");
48
+ expect(result).toBeTruthy();
49
+ });
50
+ });
@@ -0,0 +1,33 @@
1
+ /**
2
+ * TestDriver SDK - Prompt Test (Vitest)
3
+ * Converted from: testdriver/acceptance/prompt.yaml
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ describe.skip("Prompt Test", () => {
10
+ it("should execute AI-driven prompts", async (context) => {
11
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
+
14
+ //
15
+ // Note: The SDK doesn't have a direct equivalent to YAML prompts without commands.
16
+ // This would typically be handled by the AI agent interpreting natural language.
17
+ // For SDK usage, you need to use explicit commands.
18
+
19
+ // Original prompts were:
20
+ // 1. "log in"
21
+ // 2. "add an item to the cart"
22
+ // 3. "click on the cart icon"
23
+ // 4. "complete checkout"
24
+
25
+ // This test is skipped as it requires explicit SDK implementation
26
+ // You would need to implement these as explicit SDK calls
27
+
28
+ await testdriver.act("log in");
29
+
30
+ const result = await testdriver.assert("the testdriver sandbox is visible");
31
+ expect(result).toBeTruthy();
32
+ });
33
+ });
@@ -0,0 +1,37 @@
1
+ /**
2
+ * TestDriver SDK - Scroll Keyboard Test (Vitest)
3
+ * Converted from: testdriver/acceptance/scroll-keyboard.yaml
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ describe("Scroll Keyboard Test", () => {
10
+ it("should navigate to webhamster.com and scroll with keyboard", async (context) => {
11
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
+
14
+ //
15
+ // Navigate to https://www.webhamster.com/
16
+ await testdriver.focusApplication("Google Chrome");
17
+ const urlBar = await testdriver.find(
18
+ "testdriver-sandbox.vercel.app/login, the URL in the omnibox showing the current page",
19
+ );
20
+ await urlBar.click();
21
+ await testdriver.pressKeys(["ctrl", "a"]);
22
+ await testdriver.type("https://www.webhamster.com/");
23
+ await testdriver.pressKeys(["enter"]);
24
+
25
+ // Scroll down with keyboard 1000 pixels
26
+ const heading = await testdriver.find(
27
+ "The Hamster Dance, large heading at top of page",
28
+ );
29
+ await heading.click();
30
+ await testdriver.scroll("down", { amount: 1000 });
31
+
32
+ // Assert the page is scrolled down
33
+ const result = await testdriver.assert("The text 'The Hamster Dance' is not visible on the webpage content. It's ok if it's visible in the tab title.");
34
+
35
+ expect(result).toBeTruthy();
36
+ });
37
+ });
@@ -0,0 +1,39 @@
1
+ /**
2
+ * TestDriver SDK - Scroll Until Image Test (Vitest)
3
+ * Converted from: testdriver/acceptance/scroll-until-image.yaml
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ describe("Scroll Until Image Test", () => {
10
+ it.skip("should scroll until brown colored house image appears", async (context) => {
11
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
12
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
13
+
14
+ //
15
+ // Navigate to Wikipedia page
16
+ await testdriver.pressKeys(["ctrl", "l"]);
17
+ await testdriver.type("https://en.wikipedia.org/wiki/Leonardo_da_Vinci");
18
+ await testdriver.pressKeys(["enter"]);
19
+
20
+ // sleep for 5 seconds
21
+ await new Promise((r) => setTimeout(r, 5000));
22
+
23
+ // Click on heading
24
+ const heading = await testdriver.find(
25
+ "Leonardo Da Vinci, the page heading",
26
+ 0,
27
+ );
28
+ await heading.click();
29
+
30
+ // Scroll until image appears
31
+ await testdriver.scrollUntilImage("a brown colored house", "down", 10000);
32
+
33
+ // Assert image of brown colored house appears on screen
34
+ const result = await testdriver.assert(
35
+ "image of brown colored house appears on screen",
36
+ );
37
+ expect(result).toBeTruthy();
38
+ });
39
+ });
@@ -0,0 +1,67 @@
1
+ /**
2
+ * TestDriver SDK - Scroll Until Text Test (Vitest)
3
+ * Converted from: testdriver/acceptance/scroll-until-text.yaml
4
+ */
5
+
6
+ import { describe, expect, it } from "vitest";
7
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
8
+
9
+ /**
10
+ * Perform login flow for SauceLabs demo app
11
+ * @param {TestDriver} client - TestDriver client
12
+ * @param {string} username - Username (default: 'standard_user')
13
+ */
14
+ async function performLogin(client, username = "standard_user") {
15
+ await client.focusApplication("Google Chrome");
16
+ const password = await client.extract("the password");
17
+ const usernameField = await client.find(
18
+ "username input",
19
+ );
20
+ await usernameField.click();
21
+ await client.type(username);
22
+ await client.pressKeys(["tab"]);
23
+ await client.type(password, { secret: true });
24
+ await client.pressKeys(["tab"]);
25
+ await client.pressKeys(["enter"]);
26
+ }
27
+
28
+ describe("Scroll Until Text Test", () => {
29
+ it('should scroll until "testdriver socks" appears', async (context) => {
30
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
31
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
32
+
33
+ //
34
+ // Perform login first
35
+ await performLogin(testdriver);
36
+
37
+ // Scroll until text appears
38
+ await testdriver.focusApplication("Google Chrome");
39
+
40
+ await testdriver.find('TestDriver.ai Sandbox heading').click();
41
+
42
+ // Scroll until text appears
43
+ let found = false;
44
+ let scrollCount = 0;
45
+ const maxScrolls = 10;
46
+
47
+ while (!found && scrollCount < maxScrolls) {
48
+ const findResult = await testdriver.find("testdriver socks product text is fully visible");
49
+
50
+ if (findResult.found()) {
51
+ found = true;
52
+ } else {
53
+ await testdriver.scroll();
54
+ scrollCount++;
55
+ }
56
+ }
57
+
58
+ if (!found) {
59
+ throw new Error(`Failed to find "testdriver socks" after ${maxScrolls} scrolls`);
60
+ }
61
+
62
+ // Assert testdriver socks appears on screen
63
+ await testdriver.focusApplication("Google Chrome");
64
+ const result = await testdriver.assert("TestDriver Socks appears on screen");
65
+ expect(result).toBeTruthy();
66
+ });
67
+ });
@@ -0,0 +1,41 @@
1
+ /**
2
+ * TestDriver SDK - Scroll Test (Vitest)
3
+ * Converted from: testdriver/acceptance/scroll.yaml
4
+ *
5
+ * UPDATED: Now using chrome preset for automatic setup
6
+ */
7
+
8
+ import { describe, expect, it } from "vitest";
9
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
10
+
11
+ describe("Scroll Test", () => {
12
+ it("should navigate and scroll down the page", async (context) => {
13
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
14
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
15
+
16
+ // Give Chrome a moment to fully render the UI
17
+ await new Promise(resolve => setTimeout(resolve, 2000));
18
+
19
+ // Navigate to webhamster.com - just look for the domain, not the full path
20
+ const urlBar = await testdriver.find(
21
+ "testdriver-sandbox.vercel.app, the URL in the address bar",
22
+ );
23
+ await urlBar.click();
24
+ await testdriver.pressKeys(["ctrl", "a"]);
25
+ await testdriver.type("https://www.webhamster.com/");
26
+ await testdriver.pressKeys(["enter"]);
27
+
28
+ // Wait for page to load and click heading
29
+ const heading = await testdriver.find(
30
+ "The Hamster Dance, large heading at top of page",
31
+ );
32
+ await heading.click();
33
+
34
+ // Scroll down
35
+ await testdriver.scroll("down", { amount: 1000 });
36
+
37
+ // Assert page is scrolled
38
+ const result = await testdriver.assert("The text 'The Hamster Dance' is not visible on the webpage content. It's ok if it's visible in the tab title.");
39
+ expect(result).toBeTruthy();
40
+ });
41
+ });
@@ -0,0 +1,45 @@
1
+ import { describe, expect, it } from "vitest";
2
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
3
+
4
+ describe("Type Test", () => {
5
+ it("should enter standard_user in username field", async (context) => {
6
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
7
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
8
+
9
+ //
10
+ const usernameField = await testdriver.find(
11
+ "Username, input field for username",
12
+ );
13
+ await usernameField.click();
14
+ await testdriver.type("standard_user");
15
+
16
+ const result = await testdriver.assert(
17
+ 'the username field contains "standard_user"',
18
+ );
19
+ expect(result).toBeTruthy();
20
+ });
21
+
22
+ it("should show validation message when clicking Sign In without password", async (context) => {
23
+ const testdriver = TestDriver(context, { ip: context.ip || process.env.TD_IP, headless: true });
24
+ await testdriver.provision.chrome({ url: 'http://testdriver-sandbox.vercel.app/login' });
25
+
26
+ // First fill in username
27
+ const usernameField = await testdriver.find(
28
+ "Username, input field for username",
29
+ );
30
+ await usernameField.click();
31
+ await testdriver.type("standard_user");
32
+
33
+ //
34
+ const signInButton = await testdriver.find(
35
+ "Sign in, black button below the password field",
36
+ );
37
+ await signInButton.click();
38
+
39
+ await testdriver.focusApplication("Google Chrome");
40
+ const result = await testdriver.assert(
41
+ "Please fill out this field is visible near the password field",
42
+ );
43
+ expect(result).toBeTruthy();
44
+ });
45
+ });
@@ -0,0 +1,53 @@
1
+ /**
2
+ * TestDriver SDK - Windows Installer Example (Vitest)
3
+ *
4
+ * This example demonstrates how to download and install a Windows application
5
+ * using PowerShell commands, then launch and interact with it.
6
+ *
7
+ * Based on the v6 GitButler provisioning workflow.
8
+ *
9
+ * Run: TD_OS=windows vitest run examples/windows-installer.test.mjs
10
+ */
11
+
12
+ import { describe, it } from "vitest";
13
+ import { TestDriver } from "../lib/vitest/hooks.mjs";
14
+
15
+ const isLinux = (process.env.TD_OS || "linux") === "linux";
16
+
17
+ describe("Windows App Installation", () => {
18
+
19
+ it.skipIf(isLinux)("should download, install, and launch GitButler on Windows", async (context) => {
20
+ // Alternative approach using provision.installer helper
21
+ const testdriver = TestDriver(context, {
22
+ ip: context.ip || process.env.TD_IP,
23
+ os: 'windows'
24
+ });
25
+
26
+ // Download the MSI installer
27
+ const installerPath = await testdriver.provision.installer({
28
+ url: 'https://app.gitbutler.com/downloads/release/windows/x86_64/msi',
29
+ launch: false, // Don't auto-launch, we'll install manually
30
+ });
31
+
32
+ console.log('Installer downloaded to:', installerPath);
33
+
34
+ // Install the MSI silently (the file might not have an extension, so we try MSI first)
35
+ await testdriver.exec('pwsh',
36
+ `Start-Process msiexec.exe -ArgumentList "/i \`"${installerPath}\`" /qn /norestart" -Wait`,
37
+ 120000
38
+ );
39
+
40
+ // Verify installation by checking if executable exists
41
+ const verifyScript = `
42
+ $exePath = "C:\\Program Files\\GitButler\\gitbutler-tauri.exe"
43
+ if (Test-Path $exePath) {
44
+ Write-Host "GitButler installed successfully at $exePath"
45
+ } else {
46
+ Write-Error "GitButler not found"
47
+ exit 1
48
+ }
49
+ `;
50
+
51
+ await testdriver.exec('pwsh', verifyScript, 5000);
52
+ });
53
+ });
package/jsconfig.json ADDED
@@ -0,0 +1,26 @@
1
+ {
2
+ "compilerOptions": {
3
+ "module": "ESNext",
4
+ "moduleResolution": "bundler",
5
+ "target": "ES2022",
6
+ "checkJs": true,
7
+ "strict": false,
8
+ "allowSyntheticDefaultImports": true,
9
+ "esModuleInterop": true,
10
+ "baseUrl": ".",
11
+ "typeRoots": ["."]
12
+ },
13
+ "include": [
14
+ "**/*.js",
15
+ "**/*.mjs",
16
+ "**/*.d.ts",
17
+ "sdk.d.ts",
18
+ "lib/**/*.d.ts",
19
+ "interfaces/**/*.d.ts"
20
+ ],
21
+ "exclude": [
22
+ "node_modules",
23
+ "dist",
24
+ "build"
25
+ ]
26
+ }
@@ -191,6 +191,7 @@ const lifecycleHandlers = new WeakMap();
191
191
  * });
192
192
  */
193
193
  export function TestDriver(context, options = {}) {
194
+ console.log("[DEBUG hooks entry] options:", JSON.stringify(options));
194
195
  if (!context || !context.task) {
195
196
  throw new Error(
196
197
  'TestDriver() requires Vitest context. Pass the context parameter from your test function: test("name", async (context) => { ... })',
@@ -246,6 +247,8 @@ export function TestDriver(context, options = {}) {
246
247
  config.apiRoot = process.env.TD_API_ROOT;
247
248
  }
248
249
 
250
+ console.log("[DEBUG hooks] options.preview:", options.preview, "config.preview:", config.preview);
251
+
249
252
  const testdriver = new TestDriverSDK(apiKey, config);
250
253
  testdriver.__vitestContext = context.task;
251
254
  testdriver._debugOnFailure = mergedOptions.debugOnFailure || false;