testdriverai 7.3.2 → 7.3.4

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 (359) 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 +162 -0
  13. package/SKILLs.md +17 -0
  14. package/ai/.claude-plugin/plugin.json +9 -0
  15. package/docs/GITHUB_COMMENTS.md +330 -0
  16. package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +167 -0
  17. package/docs/QUICK-START-GITHUB-COMMENTS.md +84 -0
  18. package/docs/TEST-GITHUB-COMMENTS.md +129 -0
  19. package/docs/_scripts/generate-skills.js +149 -0
  20. package/docs/_scripts/link-replacer.js +164 -0
  21. package/docs/_scripts/upload-docs-to-openai.js +284 -0
  22. package/docs/claude-mcp-plugin.mdx +160 -0
  23. package/docs/docs.json +394 -0
  24. package/docs/github-integration-setup.md +266 -0
  25. package/docs/guide/best-practices-polling.mdx +154 -0
  26. package/docs/images/content/account/newprojectsettings.png +0 -0
  27. package/docs/images/content/account/projectpage.png +0 -0
  28. package/docs/images/content/account/projectreplays.png +0 -0
  29. package/docs/images/content/account/team-manage.png +0 -0
  30. package/docs/images/content/account/teampage.png +0 -0
  31. package/docs/images/content/extension/cursor.svg +1 -0
  32. package/docs/images/content/extension/vscode.svg +57 -0
  33. package/docs/images/content/extension/windsurf.svg +3 -0
  34. package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
  35. package/docs/images/content/side-by-side.png +0 -0
  36. package/docs/images/content/vscode/ide-full.png +0 -0
  37. package/docs/images/content/vscode/running.png +0 -0
  38. package/docs/images/content/vscode/vscode-2-assert.png +0 -0
  39. package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
  40. package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
  41. package/docs/images/content/vscode/vscode-file-creation.png +0 -0
  42. package/docs/images/content/vscode/vscode-install.png +0 -0
  43. package/docs/images/content/vscode/vscode-overview.png +0 -0
  44. package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
  45. package/docs/images/content/vscode/vscode-stopchat.png +0 -0
  46. package/docs/images/content/vscode/vscode-stoptest.png +0 -0
  47. package/docs/images/content/vscode/vscode-tdservice.png +0 -0
  48. package/docs/images/content/vscode/vscode-test-output.png +0 -0
  49. package/docs/images/content/vscode/vscode-testhistory.png +0 -0
  50. package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
  51. package/docs/images/content/vscode/vscode-testpane.png +0 -0
  52. package/docs/images/template/dark.png +0 -0
  53. package/docs/images/template/icon.png +0 -0
  54. package/docs/images/template/light.png +0 -0
  55. package/docs/snippets/calendar-link.mdx +4 -0
  56. package/docs/snippets/gitignore-warning.mdx +7 -0
  57. package/docs/snippets/lifecycle-warning.mdx +6 -0
  58. package/docs/snippets/test-prereqs.mdx +12 -0
  59. package/docs/snippets/tests/assert-replay.mdx +7 -0
  60. package/docs/snippets/tests/assert-yaml.mdx +8 -0
  61. package/docs/snippets/tests/exec-js-replay.mdx +7 -0
  62. package/docs/snippets/tests/exec-js-yaml.mdx +32 -0
  63. package/docs/snippets/tests/exec-shell-replay.mdx +7 -0
  64. package/docs/snippets/tests/exec-shell-yaml.mdx +15 -0
  65. package/docs/snippets/tests/hover-image-replay.mdx +7 -0
  66. package/docs/snippets/tests/hover-image-yaml.mdx +17 -0
  67. package/docs/snippets/tests/hover-text-replay.mdx +7 -0
  68. package/docs/snippets/tests/hover-text-with-description-replay.mdx +7 -0
  69. package/docs/snippets/tests/hover-text-with-description-yaml.mdx +24 -0
  70. package/docs/snippets/tests/hover-text-yaml.mdx +14 -0
  71. package/docs/snippets/tests/match-image-replay.mdx +7 -0
  72. package/docs/snippets/tests/match-image-yaml.mdx +17 -0
  73. package/docs/snippets/tests/press-keys-replay.mdx +7 -0
  74. package/docs/snippets/tests/press-keys-yaml.mdx +36 -0
  75. package/docs/snippets/tests/remember-replay.mdx +7 -0
  76. package/docs/snippets/tests/remember-yaml.mdx +28 -0
  77. package/docs/snippets/tests/scroll-replay.mdx +7 -0
  78. package/docs/snippets/tests/scroll-until-image-replay.mdx +7 -0
  79. package/docs/snippets/tests/scroll-until-image-yaml.mdx +14 -0
  80. package/docs/snippets/tests/scroll-until-text-replay.mdx +7 -0
  81. package/docs/snippets/tests/scroll-until-text-yaml.mdx +17 -0
  82. package/docs/snippets/tests/scroll-yaml.mdx +30 -0
  83. package/docs/snippets/tests/type-repeated-replay.mdx +7 -0
  84. package/docs/snippets/tests/type-repeated-yaml.mdx +22 -0
  85. package/docs/snippets/tests/type-replay.mdx +7 -0
  86. package/docs/snippets/tests/type-yaml.mdx +28 -0
  87. package/docs/snippets/tests/wait-for-image-replay.mdx +7 -0
  88. package/docs/snippets/tests/wait-for-image-yaml.mdx +18 -0
  89. package/docs/snippets/tests/wait-for-text-replay.mdx +7 -0
  90. package/docs/snippets/tests/wait-for-text-yaml.mdx +18 -0
  91. package/docs/snippets/tests/wait-replay.mdx +7 -0
  92. package/docs/snippets/tests/wait-yaml.mdx +13 -0
  93. package/docs/styles.css +65 -0
  94. package/docs/v6/account/dashboard.mdx +16 -0
  95. package/docs/v6/account/enterprise.mdx +110 -0
  96. package/docs/v6/account/pricing.mdx +33 -0
  97. package/docs/v6/account/projects.mdx +33 -0
  98. package/docs/v6/account/team.mdx +35 -0
  99. package/docs/v6/action/ami.mdx +109 -0
  100. package/docs/v6/action/performance.mdx +105 -0
  101. package/docs/v6/action/secrets.mdx +93 -0
  102. package/docs/v6/apps/chrome-extensions.mdx +48 -0
  103. package/docs/v6/apps/desktop-apps.mdx +93 -0
  104. package/docs/v6/apps/mobile-apps.mdx +26 -0
  105. package/docs/v6/apps/static-websites.mdx +54 -0
  106. package/docs/v6/apps/tauri-apps.mdx +361 -0
  107. package/docs/v6/bugs/jira.mdx +232 -0
  108. package/docs/v6/cli/overview.mdx +66 -0
  109. package/docs/v6/commands/assert.mdx +45 -0
  110. package/docs/v6/commands/exec.mdx +282 -0
  111. package/docs/v6/commands/focus-application.mdx +44 -0
  112. package/docs/v6/commands/hover-image.mdx +69 -0
  113. package/docs/v6/commands/hover-text.mdx +47 -0
  114. package/docs/v6/commands/if.mdx +53 -0
  115. package/docs/v6/commands/match-image.mdx +67 -0
  116. package/docs/v6/commands/press-keys.mdx +87 -0
  117. package/docs/v6/commands/remember.mdx +49 -0
  118. package/docs/v6/commands/run.mdx +44 -0
  119. package/docs/v6/commands/scroll-until-image.mdx +66 -0
  120. package/docs/v6/commands/scroll-until-text.mdx +60 -0
  121. package/docs/v6/commands/scroll.mdx +69 -0
  122. package/docs/v6/commands/type.mdx +45 -0
  123. package/docs/v6/commands/wait-for-image.mdx +54 -0
  124. package/docs/v6/commands/wait-for-text.mdx +48 -0
  125. package/docs/v6/commands/wait.mdx +45 -0
  126. package/docs/v6/exporting/junit.mdx +218 -0
  127. package/docs/v6/exporting/playwright.mdx +197 -0
  128. package/docs/v6/features/auto-healing.mdx +144 -0
  129. package/docs/v6/features/generation.mdx +116 -0
  130. package/docs/v6/features/parallel-testing.mdx +151 -0
  131. package/docs/v6/features/reusable-snippets.mdx +131 -0
  132. package/docs/v6/features/selectorless.mdx +80 -0
  133. package/docs/v6/features/visual-assertions.mdx +139 -0
  134. package/docs/v6/getting-started/ci.mdx +146 -0
  135. package/docs/v6/getting-started/cli.mdx +91 -0
  136. package/docs/v6/getting-started/editing.mdx +100 -0
  137. package/docs/v6/getting-started/playwright.mdx +342 -0
  138. package/docs/v6/getting-started/running.mdx +48 -0
  139. package/docs/v6/getting-started/self-hosting.mdx +408 -0
  140. package/docs/v6/getting-started/vscode.mdx +88 -0
  141. package/docs/v6/guide/assertions.mdx +189 -0
  142. package/docs/v6/guide/authentication.mdx +136 -0
  143. package/docs/v6/guide/code.mdx +65 -0
  144. package/docs/v6/guide/dashcam.mdx +118 -0
  145. package/docs/v6/guide/environment-variables.mdx +26 -0
  146. package/docs/v6/guide/lifecycle.mdx +242 -0
  147. package/docs/v6/guide/locating.mdx +141 -0
  148. package/docs/v6/guide/protips.mdx +43 -0
  149. package/docs/v6/guide/variables.mdx +143 -0
  150. package/docs/v6/guide/waiting.mdx +130 -0
  151. package/docs/v6/importing/csv.mdx +196 -0
  152. package/docs/v6/importing/gherkin.mdx +143 -0
  153. package/docs/v6/importing/jira.mdx +164 -0
  154. package/docs/v6/importing/testrail.mdx +162 -0
  155. package/docs/v6/integrations/electron.mdx +146 -0
  156. package/docs/v6/integrations/netlify.mdx +100 -0
  157. package/docs/v6/integrations/vercel.mdx +125 -0
  158. package/docs/v6/interactive/explore.mdx +99 -0
  159. package/docs/v6/interactive/run.mdx +52 -0
  160. package/docs/v6/interactive/save.mdx +63 -0
  161. package/docs/v6/overview/comparison.mdx +101 -0
  162. package/docs/v6/overview/faq.mdx +162 -0
  163. package/docs/v6/overview/performance.mdx +52 -0
  164. package/docs/v6/overview/quickstart.mdx +137 -0
  165. package/docs/v6/overview/what-is-testdriver.mdx +85 -0
  166. package/docs/v6/scenarios/ai-chatbot.mdx +28 -0
  167. package/docs/v6/scenarios/cookie-banner.mdx +32 -0
  168. package/docs/v6/scenarios/file-upload.mdx +33 -0
  169. package/docs/v6/scenarios/form-filling.mdx +32 -0
  170. package/docs/v6/scenarios/log-in.mdx +75 -0
  171. package/docs/v6/scenarios/pdf-generation.mdx +25 -0
  172. package/docs/v6/scenarios/spell-check.mdx +22 -0
  173. package/docs/v6/security/action.mdx +84 -0
  174. package/docs/v6/security/agent.mdx +73 -0
  175. package/docs/v6/security/platform.mdx +77 -0
  176. package/docs/v6/tutorials/advanced-test.mdx +81 -0
  177. package/docs/v6/tutorials/basic-test.mdx +45 -0
  178. package/docs/v7/_drafts/agents.mdx +852 -0
  179. package/docs/v7/_drafts/architecture.mdx +399 -0
  180. package/docs/v7/_drafts/auto-cache-key.mdx +167 -0
  181. package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +100 -0
  182. package/docs/v7/_drafts/best-practices.mdx +486 -0
  183. package/docs/v7/_drafts/caching-ai.mdx +215 -0
  184. package/docs/v7/_drafts/caching-selectors.mdx +424 -0
  185. package/docs/v7/_drafts/caching.mdx +366 -0
  186. package/docs/v7/_drafts/cli-to-sdk-migration.mdx +425 -0
  187. package/docs/v7/_drafts/commands/assert.mdx +45 -0
  188. package/docs/v7/_drafts/commands/exec.mdx +282 -0
  189. package/docs/v7/_drafts/commands/focus-application.mdx +44 -0
  190. package/docs/v7/_drafts/commands/hover-image.mdx +69 -0
  191. package/docs/v7/_drafts/commands/hover-text.mdx +47 -0
  192. package/docs/v7/_drafts/commands/if.mdx +53 -0
  193. package/docs/v7/_drafts/commands/match-image.mdx +67 -0
  194. package/docs/v7/_drafts/commands/press-keys.mdx +87 -0
  195. package/docs/v7/_drafts/commands/remember.mdx +49 -0
  196. package/docs/v7/_drafts/commands/run.mdx +44 -0
  197. package/docs/v7/_drafts/commands/scroll-until-image.mdx +66 -0
  198. package/docs/v7/_drafts/commands/scroll-until-text.mdx +60 -0
  199. package/docs/v7/_drafts/commands/scroll.mdx +69 -0
  200. package/docs/v7/_drafts/commands/type.mdx +45 -0
  201. package/docs/v7/_drafts/commands/wait-for-image.mdx +54 -0
  202. package/docs/v7/_drafts/commands/wait-for-text.mdx +48 -0
  203. package/docs/v7/_drafts/commands/wait.mdx +45 -0
  204. package/docs/v7/_drafts/configuration.mdx +378 -0
  205. package/docs/v7/_drafts/contributing.mdx +174 -0
  206. package/docs/v7/_drafts/core.mdx +458 -0
  207. package/docs/v7/_drafts/dashcam-title-feature.mdx +89 -0
  208. package/docs/v7/_drafts/debugging.mdx +349 -0
  209. package/docs/v7/_drafts/error-handling.mdx +501 -0
  210. package/docs/v7/_drafts/faq.mdx +393 -0
  211. package/docs/v7/_drafts/hooks.mdx +360 -0
  212. package/docs/v7/_drafts/init-command.mdx +95 -0
  213. package/docs/v7/_drafts/installation.mdx +420 -0
  214. package/docs/v7/_drafts/migration.mdx +562 -0
  215. package/docs/v7/_drafts/observable.mdx +604 -0
  216. package/docs/v7/_drafts/playwright.mdx +342 -0
  217. package/docs/v7/_drafts/plugin-migration.mdx +220 -0
  218. package/docs/v7/_drafts/powerful.mdx +419 -0
  219. package/docs/v7/_drafts/presets.mdx +210 -0
  220. package/docs/v7/_drafts/progressive-disclosure.mdx +230 -0
  221. package/docs/v7/_drafts/prompt-cache.mdx +200 -0
  222. package/docs/v7/_drafts/provision.mdx +390 -0
  223. package/docs/v7/_drafts/quick-start-test-recording.mdx +214 -0
  224. package/docs/v7/_drafts/readme.mdx +135 -0
  225. package/docs/v7/_drafts/reports.mdx +414 -0
  226. package/docs/v7/_drafts/scalable.mdx +754 -0
  227. package/docs/v7/_drafts/screenshot.mdx +155 -0
  228. package/docs/v7/_drafts/sdk-awesome-logs.mdx +468 -0
  229. package/docs/v7/_drafts/sdk-browser-rendering.mdx +167 -0
  230. package/docs/v7/_drafts/sdk-migration.mdx +474 -0
  231. package/docs/v7/_drafts/sdk-v7-complete.mdx +345 -0
  232. package/docs/v7/_drafts/self-hosting.mdx +369 -0
  233. package/docs/v7/_drafts/test-recording.mdx +382 -0
  234. package/docs/v7/_drafts/troubleshooting.mdx +526 -0
  235. package/docs/v7/_drafts/vitest-plugin.mdx +477 -0
  236. package/docs/v7/_drafts/vitest.mdx +535 -0
  237. package/docs/v7/_drafts/writing-tests.mdx +25 -0
  238. package/{ai/skills/testdriver:ai/SKILL.md → docs/v7/ai.mdx} +4 -3
  239. package/{ai/skills/testdriver:assert/SKILL.md → docs/v7/assert.mdx} +4 -3
  240. package/{ai/skills/testdriver:aws-setup/SKILL.md → docs/v7/aws-setup.mdx} +4 -3
  241. package/{ai/skills/testdriver:caching/SKILL.md → docs/v7/caching.mdx} +7 -3
  242. package/{ai/skills/testdriver:captcha/SKILL.md → docs/v7/captcha.mdx} +4 -3
  243. package/{ai/skills/testdriver:ci-cd/SKILL.md → docs/v7/ci-cd.mdx} +4 -3
  244. package/{ai/skills/testdriver:click/SKILL.md → docs/v7/click.mdx} +4 -3
  245. package/{ai/skills/testdriver:client/SKILL.md → docs/v7/client.mdx} +8 -3
  246. package/{ai/skills/testdriver:cloud/SKILL.md → docs/v7/cloud.mdx} +4 -3
  247. package/{ai/skills/testdriver:customizing-devices/SKILL.md → docs/v7/customizing-devices.mdx} +3 -3
  248. package/{ai/skills/testdriver:dashcam/SKILL.md → docs/v7/dashcam.mdx} +4 -3
  249. package/docs/v7/debugging-with-screenshots.mdx +402 -0
  250. package/{ai/skills/testdriver:device-config/SKILL.md → docs/v7/device-config.mdx} +3 -3
  251. package/{ai/skills/testdriver:double-click/SKILL.md → docs/v7/double-click.mdx} +3 -3
  252. package/{ai/skills/testdriver:elements/SKILL.md → docs/v7/elements.mdx} +4 -3
  253. package/{ai/skills/testdriver:enterprise/SKILL.md → docs/v7/enterprise.mdx} +5 -3
  254. package/docs/v7/examples.mdx +5 -0
  255. package/{ai/skills/testdriver:exec/SKILL.md → docs/v7/exec.mdx} +4 -3
  256. package/{ai/skills/testdriver:find/SKILL.md → docs/v7/find.mdx} +4 -3
  257. package/{ai/skills/testdriver:focus-application/SKILL.md → docs/v7/focus-application.mdx} +4 -3
  258. package/{ai/skills/testdriver:generating-tests/SKILL.md → docs/v7/generating-tests.mdx} +3 -3
  259. package/{ai/skills/testdriver:hover/SKILL.md → docs/v7/hover.mdx} +4 -3
  260. package/{ai/skills/testdriver:locating-elements/SKILL.md → docs/v7/locating-elements.mdx} +3 -3
  261. package/{ai/skills/testdriver:making-assertions/SKILL.md → docs/v7/making-assertions.mdx} +3 -3
  262. package/{ai/skills/testdriver:mouse-down/SKILL.md → docs/v7/mouse-down.mdx} +3 -3
  263. package/{ai/skills/testdriver:mouse-up/SKILL.md → docs/v7/mouse-up.mdx} +3 -3
  264. package/docs/v7/ocr.mdx +236 -0
  265. package/{ai/skills/testdriver:performing-actions/SKILL.md → docs/v7/performing-actions.mdx} +3 -3
  266. package/{ai/skills/testdriver:press-keys/SKILL.md → docs/v7/press-keys.mdx} +4 -3
  267. package/{ai/skills/testdriver:quickstart/SKILL.md → docs/v7/quickstart.mdx} +6 -20
  268. package/{ai/skills/testdriver:reusable-code/SKILL.md → docs/v7/reusable-code.mdx} +3 -3
  269. package/{ai/skills/testdriver:right-click/SKILL.md → docs/v7/right-click.mdx} +3 -3
  270. package/{ai/skills/testdriver:running-tests/SKILL.md → docs/v7/running-tests.mdx} +7 -3
  271. package/{ai/skills/testdriver:screenshot/SKILL.md → docs/v7/screenshot.mdx} +88 -6
  272. package/{ai/skills/testdriver:scroll/SKILL.md → docs/v7/scroll.mdx} +40 -3
  273. package/{ai/skills/testdriver:secrets/SKILL.md → docs/v7/secrets.mdx} +3 -3
  274. package/{ai/skills/testdriver:self-hosted/SKILL.md → docs/v7/self-hosted.mdx} +4 -3
  275. package/{ai/skills/testdriver:type/SKILL.md → docs/v7/type.mdx} +4 -3
  276. package/{ai/skills/testdriver:variables/SKILL.md → docs/v7/variables.mdx} +3 -3
  277. package/{ai/skills/testdriver:waiting-for-elements/SKILL.md → docs/v7/waiting-for-elements.mdx} +3 -3
  278. package/{ai/skills/testdriver:what-is-testdriver/SKILL.md → docs/v7/what-is-testdriver.mdx} +3 -3
  279. package/eslint.config.js +67 -0
  280. package/examples/ai.test.mjs +30 -0
  281. package/examples/assert.test.mjs +47 -0
  282. package/examples/captcha-api.test.mjs +50 -0
  283. package/examples/chrome-extension.test.mjs +94 -0
  284. package/examples/drag-and-drop.test.mjs +58 -0
  285. package/examples/element-not-found.test.mjs +26 -0
  286. package/examples/exec-output.test.mjs +59 -0
  287. package/examples/exec-pwsh.test.mjs +57 -0
  288. package/examples/focus-window.test.mjs +36 -0
  289. package/examples/formatted-logging.test.mjs +26 -0
  290. package/examples/hover-image.test.mjs +52 -0
  291. package/examples/hover-text-with-description.test.mjs +56 -0
  292. package/examples/hover-text.test.mjs +27 -0
  293. package/examples/installer.test.mjs +49 -0
  294. package/examples/launch-vscode-linux.test.mjs +54 -0
  295. package/examples/match-image.test.mjs +54 -0
  296. package/examples/no-provision.test.mjs +23 -0
  297. package/examples/press-keys.test.mjs +50 -0
  298. package/examples/prompt.test.mjs +33 -0
  299. package/examples/scroll-keyboard.test.mjs +37 -0
  300. package/examples/scroll-until-image.test.mjs +39 -0
  301. package/examples/scroll-until-text.test.mjs +67 -0
  302. package/examples/scroll.test.mjs +41 -0
  303. package/examples/type.test.mjs +45 -0
  304. package/examples/windows-installer.test.mjs +53 -0
  305. package/jsconfig.json +26 -0
  306. package/manual/test-init-command.js +223 -0
  307. package/mcp-server/README.md +312 -0
  308. package/mcp-server/mcp-app.html +28 -0
  309. package/mcp-server/mcp-config.example.json +19 -0
  310. package/mcp-server/package-lock.json +4018 -0
  311. package/mcp-server/package.json +29 -0
  312. package/mcp-server/src/codegen.ts +189 -0
  313. package/mcp-server/src/mcp-app.css +360 -0
  314. package/mcp-server/src/mcp-app.ts +547 -0
  315. package/mcp-server/src/provision-types.ts +209 -0
  316. package/mcp-server/src/server.ts +2313 -0
  317. package/mcp-server/src/session.ts +194 -0
  318. package/mcp-server/tsconfig.json +16 -0
  319. package/mcp-server/vite.config.ts +23 -0
  320. package/package.json +2 -17
  321. package/scripts/generate-skills.js +94 -0
  322. package/setup/aws/cloudformation.yaml +470 -0
  323. package/setup/aws/spawn-runner.sh +190 -0
  324. package/test/api-resilience.test.mjs +0 -0
  325. package/test/captcha-solver.test.mjs +152 -0
  326. package/test/chrome-remote-debugging.test.mjs +66 -0
  327. package/test/duckduckgo/experiment.test.mjs +28 -0
  328. package/test/duckduckgo/setup.test.mjs +29 -0
  329. package/test/manual/debug-locate-response.js +82 -0
  330. package/test/manual/reconnect-provision.test.mjs +49 -0
  331. package/test/manual/test-console-logs.test.mjs +42 -0
  332. package/test/manual/test-find-api.js +73 -0
  333. package/test/manual/test-init.sh +54 -0
  334. package/test/manual/test-prompt-cache.js +97 -0
  335. package/test/manual/test-provision-auth.mjs +22 -0
  336. package/test/manual/test-sandbox-render.js +29 -0
  337. package/test/manual/test-sdk-methods.js +15 -0
  338. package/test/manual/test-sdk-refactor.js +53 -0
  339. package/test/manual/test-stack-trace.mjs +57 -0
  340. package/test/manual/verify-element-api.js +89 -0
  341. package/test/manual/verify-types.js +0 -0
  342. package/test/manual-unawaited-promise.test.mjs +31 -0
  343. package/test-ide-preview.mjs +17 -0
  344. package/tests/airbnb-booking.test.mjs +39 -0
  345. package/tests/airbnb-search.test.mjs +43 -0
  346. package/tests/example.test.js +33 -0
  347. package/tests/login.js +28 -0
  348. package/vitest.config.mjs +24 -0
  349. package/vscode-extension/.vscodeignore +12 -0
  350. package/vscode-extension/README.md +94 -0
  351. package/vscode-extension/media/icon.png +0 -0
  352. package/vscode-extension/package-lock.json +4126 -0
  353. package/vscode-extension/package.json +86 -0
  354. package/vscode-extension/src/extension.ts +829 -0
  355. package/vscode-extension/testdriverai-0.1.0.vsix +0 -0
  356. package/vscode-extension/tsconfig.json +16 -0
  357. package/ai/skills/testdriver:examples/SKILL.md +0 -7
  358. package/ai/skills/testdriver:mcp-workflow/SKILL.md +0 -410
  359. package/ai/skills/testdriver:testdriver/SKILL.md +0 -523
@@ -0,0 +1,7 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(curl:*)"
5
+ ]
6
+ }
7
+ }
package/.env.example ADDED
@@ -0,0 +1,4 @@
1
+ TD_API_KEY=
2
+ TD_API_ROOT=
3
+
4
+ TWOCAPTCHA_API_KEY=
@@ -0,0 +1,45 @@
1
+ name: Scheduled Acceptance Tests (Linux)
2
+
3
+ permissions:
4
+ id-token: write
5
+ contents: read
6
+
7
+ on:
8
+ schedule:
9
+ # Every 6 hours
10
+ - cron: "0 */6 * * *"
11
+ workflow_dispatch: # Allow manual trigger
12
+
13
+ jobs:
14
+ test-linux:
15
+ runs-on: ubuntu-latest
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "20"
24
+ cache: "npm"
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Install Sentry CLI
30
+ run: npm install -g @sentry/cli
31
+
32
+ - name: Run Linux tests with Sentry Cron monitoring
33
+ run: |
34
+ sentry-cli monitors run testdriver-linux-acceptance -- vitest run examples/*.test.mjs
35
+ env:
36
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
37
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
38
+ TD_OS: linux
39
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
40
+
41
+ - name: Upload test results to Sentry Prevent
42
+ if: ${{ !cancelled() }}
43
+ uses: getsentry/prevent-action@v0
44
+ with:
45
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
@@ -0,0 +1,54 @@
1
+ name: Scheduled Acceptance Tests (Windows)
2
+
3
+ permissions:
4
+ id-token: write
5
+ contents: read
6
+
7
+ on:
8
+ schedule:
9
+ # Every day at midnight UTC
10
+ - cron: "0 0 * * *"
11
+ workflow_dispatch: # Allow manual trigger
12
+
13
+ jobs:
14
+ test-windows:
15
+ uses: ./.github/workflows/windows-self-hosted.yaml
16
+ secrets:
17
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
18
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
19
+ TD_WEBSITE: ${{ secrets.TD_WEBSITE }}
20
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
21
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
22
+
23
+ sentry-and-publish:
24
+ needs: test-windows
25
+ runs-on: ubuntu-latest
26
+ if: always()
27
+
28
+ steps:
29
+ - name: Install Sentry CLI
30
+ run: npm install -g @sentry/cli
31
+
32
+ - name: Report to Sentry Cron
33
+ run: |
34
+ sentry-cli monitors run testdriver-windows-acceptance -- echo "Windows tests completed"
35
+ env:
36
+ SENTRY_DSN: ${{ secrets.SENTRY_DSN }}
37
+
38
+ - name: Download test results
39
+ uses: actions/download-artifact@v4
40
+ with:
41
+ name: test-results-windows
42
+
43
+ - name: Upload test results to Sentry Prevent
44
+ if: ${{ !cancelled() }}
45
+ uses: getsentry/prevent-action@v0
46
+ with:
47
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
48
+
49
+ - name: Publish Test Results
50
+ uses: EnricoMi/publish-unit-test-result-action@v2
51
+ if: always()
52
+ with:
53
+ files: test-report.junit.xml
54
+ check_name: Test Results (Windows Scheduled)
@@ -0,0 +1,106 @@
1
+ name: Acceptance Tests
2
+ permissions:
3
+ id-token: write
4
+ contents: write
5
+ pull-requests: write
6
+ checks: write
7
+ on:
8
+ pull_request:
9
+ branches: [main]
10
+
11
+ concurrency:
12
+ group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
13
+ cancel-in-progress: true
14
+
15
+ jobs:
16
+ test-linux:
17
+ runs-on: ubuntu-latest
18
+
19
+ steps:
20
+ - uses: actions/checkout@v4
21
+
22
+ - name: Setup Node.js
23
+ uses: actions/setup-node@v4
24
+ with:
25
+ node-version: "20"
26
+ cache: "npm"
27
+
28
+ - name: Install dependencies
29
+ run: npm ci
30
+
31
+ - name: Run Linux tests
32
+ run: npx vitest run examples/*.test.mjs 2>&1 | tee test-output.log
33
+ env:
34
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
35
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
36
+ TD_OS: linux
37
+
38
+ - name: Extract example URLs
39
+ if: success()
40
+ run: node docs/_scripts/extract-example-urls.js --file=test-output.log
41
+
42
+ - name: Generate example docs
43
+ if: success()
44
+ run: node docs/_scripts/generate-examples.js --skip-ai
45
+ env:
46
+ OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }}
47
+
48
+ - name: Commit updated docs
49
+ if: success()
50
+ run: |
51
+ git config --local user.email "github-actions[bot]@users.noreply.github.com"
52
+ git config --local user.name "github-actions[bot]"
53
+ git add docs/
54
+ git diff --staged --quiet || git commit -m "docs: update example documentation [skip ci]"
55
+ git push || echo "No changes to push"
56
+
57
+ - name: Upload test results to Sentry Prevent
58
+ if: ${{ !cancelled() }}
59
+ uses: getsentry/prevent-action@v0
60
+ with:
61
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
62
+
63
+ - name: Publish Test Results
64
+ uses: EnricoMi/publish-unit-test-result-action@v2
65
+ if: always()
66
+ with:
67
+ files: test-report.junit.xml
68
+ comment_mode: always
69
+ check_name: Test Results (Linux)
70
+
71
+ test-windows:
72
+ if: contains(github.event.pull_request.labels.*.name, 'test-windows')
73
+ uses: ./.github/workflows/windows-self-hosted.yaml
74
+ with:
75
+ test_pattern: "examples/*.test.mjs"
76
+ secrets:
77
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
78
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
79
+ TD_WEBSITE: ${{ secrets.TD_WEBSITE }}
80
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
81
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
82
+
83
+ publish-windows-results:
84
+ needs: test-windows
85
+ runs-on: ubuntu-latest
86
+ if: always() && contains(github.event.pull_request.labels.*.name, 'test-windows')
87
+
88
+ steps:
89
+ - name: Download test results
90
+ uses: actions/download-artifact@v4
91
+ with:
92
+ name: test-results-windows
93
+
94
+ - name: Upload test results to Sentry Prevent
95
+ if: ${{ !cancelled() }}
96
+ uses: getsentry/prevent-action@v0
97
+ with:
98
+ token: ${{ secrets.SENTRY_PREVENT_TOKEN }}
99
+
100
+ - name: Publish Test Results
101
+ uses: EnricoMi/publish-unit-test-result-action@v2
102
+ if: always()
103
+ with:
104
+ files: test-report.junit.xml
105
+ comment_mode: always
106
+ check_name: Test Results (Windows)
@@ -0,0 +1,75 @@
1
+ name: Publish
2
+ permissions:
3
+ contents: write
4
+ id-token: write # Required for OIDC
5
+ on:
6
+ push:
7
+ branches: [main]
8
+
9
+ jobs:
10
+ publish:
11
+ runs-on: ubuntu-latest
12
+
13
+ steps:
14
+ - uses: actions/checkout@v4
15
+ with:
16
+ fetch-depth: 0
17
+ token: ${{ secrets.GITHUB_TOKEN }}
18
+
19
+ - name: Setup Node.js
20
+ uses: actions/setup-node@v4
21
+ with:
22
+ node-version: "20"
23
+ registry-url: "https://registry.npmjs.org/"
24
+
25
+ - name: Configure Git
26
+ run: |
27
+ git config user.name "github-actions[bot]"
28
+ git config user.email "github-actions[bot]@users.noreply.github.com"
29
+
30
+ - name: Install dependencies
31
+ run: npm ci
32
+
33
+ - name: Build MCP Server
34
+ run: npm run build:mcp
35
+
36
+ - name: Bump version (patch)
37
+ run: npm version patch --no-git-tag-version
38
+
39
+ - name: Generate Changelog
40
+ run: |
41
+ npx conventional-changelog-cli -p angular -i CHANGELOG.md -s
42
+ git add CHANGELOG.md
43
+
44
+ - name: Commit and push version bump
45
+ run: |
46
+ git add package.json package-lock.json
47
+ VERSION=$(node -p "require('./package.json').version")
48
+ git commit -m "chore(release): ${VERSION}"
49
+ git tag "v${VERSION}"
50
+
51
+ # Pull any changes that happened since checkout
52
+ git pull --rebase origin main
53
+
54
+ git push origin main
55
+ git push origin "v${VERSION}"
56
+ echo "VERSION=${VERSION}" >> $GITHUB_ENV
57
+
58
+ - name: Create GitHub Release
59
+ uses: softprops/action-gh-release@v1
60
+ with:
61
+ tag_name: v${{ env.VERSION }}
62
+ generate_release_notes: true
63
+ prerelease: false
64
+
65
+ - name: Debug NPM Token
66
+ run: |
67
+ echo "NPM_TOKEN is set: ${{ secrets.NPM_TOKEN != '' }}"
68
+ echo "NPM_TOKEN first 4 chars: ${NPM_TOKEN:0:4}..."
69
+ env:
70
+ NPM_TOKEN: ${{ secrets.NPM_TOKEN }}
71
+
72
+ - name: Publish to npm
73
+ run: npm publish
74
+ env:
75
+ NODE_AUTH_TOKEN: ${{ secrets.NPM_TOKEN }}
@@ -0,0 +1,157 @@
1
+ name: Test Init Command
2
+
3
+ on:
4
+ push:
5
+ branches: [ main, develop ]
6
+ pull_request:
7
+ branches: [ main, develop ]
8
+ workflow_dispatch:
9
+
10
+ jobs:
11
+ test-init:
12
+ runs-on: ubuntu-latest
13
+
14
+ steps:
15
+ - name: Checkout CLI repository
16
+ uses: actions/checkout@v4
17
+
18
+ - name: Setup Node.js
19
+ uses: actions/setup-node@v4
20
+ with:
21
+ node-version: '20'
22
+ cache: 'npm'
23
+
24
+ - name: Install CLI dependencies
25
+ run: npm ci
26
+
27
+ - name: Pack local testdriverai
28
+ run: |
29
+ npm pack
30
+ mv testdriverai-*.tgz /tmp/testdriverai-local.tgz
31
+
32
+ - name: Create test directory
33
+ run: |
34
+ mkdir -p /tmp/test-init-project
35
+ cd /tmp/test-init-project
36
+
37
+ - name: Run init command (skip prompts)
38
+ working-directory: /tmp/test-init-project
39
+ run: |
40
+ # Create .env with API key first to skip the prompt
41
+ echo "TD_API_KEY=${{ secrets.TD_API_KEY }}" > .env
42
+
43
+ # Run init command using the CLI from the repo
44
+ node ${{ github.workspace }}/bin/testdriverai.js init
45
+ env:
46
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
47
+
48
+ - name: Replace npm testdriverai with local build
49
+ working-directory: /tmp/test-init-project
50
+ run: |
51
+ # Remove npm-installed version and install local tarball
52
+ npm uninstall testdriverai
53
+ npm install /tmp/testdriverai-local.tgz
54
+
55
+ - name: Verify project structure
56
+ working-directory: /tmp/test-init-project
57
+ run: |
58
+ echo "Checking generated files..."
59
+
60
+ # Check for package.json
61
+ if [ ! -f "package.json" ]; then
62
+ echo "❌ package.json not found"
63
+ exit 1
64
+ fi
65
+ echo "✓ package.json exists"
66
+
67
+ # Check for vitest config
68
+ if [ ! -f "vitest.config.js" ]; then
69
+ echo "❌ vitest.config.js not found"
70
+ exit 1
71
+ fi
72
+ echo "✓ vitest.config.js exists"
73
+
74
+ # Check for test file
75
+ if [ ! -f "tests/example.test.js" ]; then
76
+ echo "❌ tests/example.test.js not found"
77
+ exit 1
78
+ fi
79
+ echo "✓ tests/example.test.js exists"
80
+
81
+ # Check for .env file
82
+ if [ ! -f ".env" ]; then
83
+ echo "❌ .env not found"
84
+ exit 1
85
+ fi
86
+ echo "✓ .env exists"
87
+
88
+ # Check for .gitignore
89
+ if [ ! -f ".gitignore" ]; then
90
+ echo "❌ .gitignore not found"
91
+ exit 1
92
+ fi
93
+ echo "✓ .gitignore exists"
94
+
95
+ # Check for GitHub workflow
96
+ if [ ! -f ".github/workflows/testdriver.yml" ]; then
97
+ echo "❌ .github/workflows/testdriver.yml not found"
98
+ exit 1
99
+ fi
100
+ echo "✓ .github/workflows/testdriver.yml exists"
101
+
102
+ - name: Verify vitest config contents
103
+ working-directory: /tmp/test-init-project
104
+ run: |
105
+ echo "Checking vitest.config.js contents..."
106
+
107
+ # Check for TestDriver reporter
108
+ if ! grep -q "TestDriver()" vitest.config.js; then
109
+ echo "❌ TestDriver reporter not found in vitest.config.js"
110
+ cat vitest.config.js
111
+ exit 1
112
+ fi
113
+ echo "✓ TestDriver reporter is configured"
114
+
115
+ # Check for setupFiles
116
+ if ! grep -q "setupFiles.*testdriverai/vitest/setup" vitest.config.js; then
117
+ echo "❌ setupFiles not configured correctly"
118
+ cat vitest.config.js
119
+ exit 1
120
+ fi
121
+ echo "✓ setupFiles is configured"
122
+
123
+ - name: Verify test file contents
124
+ working-directory: /tmp/test-init-project
125
+ run: |
126
+ echo "Checking test file contents..."
127
+
128
+ # Check for .provision usage
129
+ if ! grep -q "\.provision\.chrome" tests/example.test.js; then
130
+ echo "❌ Test does not use .provision.chrome"
131
+ cat tests/example.test.js
132
+ exit 1
133
+ fi
134
+ echo "✓ Test uses .provision.chrome"
135
+
136
+ # Check for TestDriver import
137
+ if ! grep -q "from 'testdriverai/vitest/hooks'" tests/example.test.js; then
138
+ echo "❌ Test does not import from testdriverai/vitest/hooks"
139
+ cat tests/example.test.js
140
+ exit 1
141
+ fi
142
+ echo "✓ Test imports TestDriver from vitest/hooks"
143
+
144
+ - name: Run the generated test
145
+ working-directory: /tmp/test-init-project
146
+ run: npm test
147
+ env:
148
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
149
+
150
+ - name: Upload test results
151
+ if: always()
152
+ uses: actions/upload-artifact@v4
153
+ with:
154
+ name: test-init-results
155
+ path: /tmp/test-init-project/test-results/
156
+ retention-days: 7
157
+ if-no-files-found: warn
@@ -0,0 +1,170 @@
1
+ name: TestDriver.ai Tests
2
+
3
+ on:
4
+ push:
5
+ branches: [main, master]
6
+ pull_request:
7
+ branches: [main, master]
8
+
9
+ jobs:
10
+ test:
11
+ runs-on: ubuntu-latest
12
+
13
+ permissions:
14
+ contents: read
15
+ pull-requests: write # Required to post comments on PRs
16
+
17
+ steps:
18
+ - uses: actions/checkout@v4
19
+
20
+ - name: Setup Node.js
21
+ uses: actions/setup-node@v4
22
+ with:
23
+ node-version: "20"
24
+ cache: "npm"
25
+
26
+ - name: Install dependencies
27
+ run: npm ci
28
+
29
+ - name: Run TestDriver.ai tests
30
+ env:
31
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
32
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
33
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
34
+ GITHUB_PR_NUMBER: ${{ github.event.pull_request.number }}
35
+ run: vitest run
36
+
37
+ - name: Upload test results
38
+ if: always()
39
+ uses: actions/upload-artifact@v4
40
+ with:
41
+ name: test-results
42
+ path: test-results/
43
+ retention-days: 30
44
+
45
+ # Init command test - only runs on PRs, not on main/master
46
+ - name: Create test directory for init
47
+ if: github.event_name == 'pull_request'
48
+ run: |
49
+ mkdir -p /tmp/test-init-project
50
+ cd /tmp/test-init-project
51
+
52
+ - name: Run init command (skip prompts)
53
+ if: github.event_name == 'pull_request'
54
+ working-directory: /tmp/test-init-project
55
+ run: |
56
+ # Create .env with API key first to skip the prompt
57
+ echo "TD_API_KEY=${{ secrets.TD_API_KEY }}" > .env
58
+
59
+ # Run init command using the CLI from the repo
60
+ node ${{ github.workspace }}/bin/testdriverai.js init
61
+ env:
62
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
63
+
64
+ - name: Verify project structure
65
+ if: github.event_name == 'pull_request'
66
+ working-directory: /tmp/test-init-project
67
+ run: |
68
+ echo "Checking generated files..."
69
+
70
+ # Check for package.json
71
+ if [ ! -f "package.json" ]; then
72
+ echo "❌ package.json not found"
73
+ exit 1
74
+ fi
75
+ echo "✓ package.json exists"
76
+
77
+ # Check for vitest config
78
+ if [ ! -f "vitest.config.js" ]; then
79
+ echo "❌ vitest.config.js not found"
80
+ exit 1
81
+ fi
82
+ echo "✓ vitest.config.js exists"
83
+
84
+ # Check for test file
85
+ if [ ! -f "tests/example.test.js" ]; then
86
+ echo "❌ tests/example.test.js not found"
87
+ exit 1
88
+ fi
89
+ echo "✓ tests/example.test.js exists"
90
+
91
+ # Check for .env file
92
+ if [ ! -f ".env" ]; then
93
+ echo "❌ .env not found"
94
+ exit 1
95
+ fi
96
+ echo "✓ .env exists"
97
+
98
+ # Check for .gitignore
99
+ if [ ! -f ".gitignore" ]; then
100
+ echo "❌ .gitignore not found"
101
+ exit 1
102
+ fi
103
+ echo "✓ .gitignore exists"
104
+
105
+ # Check for GitHub workflow
106
+ if [ ! -f ".github/workflows/testdriver.yml" ]; then
107
+ echo "❌ .github/workflows/testdriver.yml not found"
108
+ exit 1
109
+ fi
110
+ echo "✓ .github/workflows/testdriver.yml exists"
111
+
112
+ - name: Verify vitest config contents
113
+ if: github.event_name == 'pull_request'
114
+ working-directory: /tmp/test-init-project
115
+ run: |
116
+ echo "Checking vitest.config.js contents..."
117
+
118
+ # Check for TestDriver reporter
119
+ if ! grep -q "TestDriver()" vitest.config.js; then
120
+ echo "❌ TestDriver reporter not found in vitest.config.js"
121
+ cat vitest.config.js
122
+ exit 1
123
+ fi
124
+ echo "✓ TestDriver reporter is configured"
125
+
126
+ # Check for setupFiles
127
+ if ! grep -q "setupFiles.*testdriverai/vitest/setup" vitest.config.js; then
128
+ echo "❌ setupFiles not configured correctly"
129
+ cat vitest.config.js
130
+ exit 1
131
+ fi
132
+ echo "✓ setupFiles is configured"
133
+
134
+ - name: Verify test file contents
135
+ if: github.event_name == 'pull_request'
136
+ working-directory: /tmp/test-init-project
137
+ run: |
138
+ echo "Checking test file contents..."
139
+
140
+ # Check for .provision usage
141
+ if ! grep -q "\.provision\.chrome" tests/example.test.js; then
142
+ echo "❌ Test does not use .provision.chrome"
143
+ cat tests/example.test.js
144
+ exit 1
145
+ fi
146
+ echo "✓ Test uses .provision.chrome"
147
+
148
+ # Check for TestDriver import
149
+ if ! grep -q "from 'testdriverai/vitest/hooks'" tests/example.test.js; then
150
+ echo "❌ Test does not import from testdriverai/vitest/hooks"
151
+ cat tests/example.test.js
152
+ exit 1
153
+ fi
154
+ echo "✓ Test imports TestDriver from vitest/hooks"
155
+
156
+ - name: Run the generated test
157
+ if: github.event_name == 'pull_request'
158
+ working-directory: /tmp/test-init-project
159
+ run: npm test
160
+ env:
161
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
162
+
163
+ - name: Upload init test results
164
+ if: always() && github.event_name == 'pull_request'
165
+ uses: actions/upload-artifact@v4
166
+ with:
167
+ name: test-init-results
168
+ path: /tmp/test-init-project/test-results/
169
+ retention-days: 7
170
+ if-no-files-found: warn
@@ -0,0 +1,82 @@
1
+ name: Windows Self-Hosted Tests
2
+
3
+ on:
4
+ workflow_call:
5
+ inputs:
6
+ test_pattern:
7
+ description: "Test file pattern to run"
8
+ required: false
9
+ type: string
10
+ default: "examples/*.test.mjs"
11
+ secrets:
12
+ TD_API_KEY:
13
+ required: true
14
+ TWOCAPTCHA_API_KEY:
15
+ required: true
16
+ TD_WEBSITE:
17
+ required: false
18
+ AWS_ACCESS_KEY_ID:
19
+ required: true
20
+ AWS_SECRET_ACCESS_KEY:
21
+ required: true
22
+
23
+ jobs:
24
+ test:
25
+ runs-on: ubuntu-latest
26
+
27
+ steps:
28
+ - name: Checkout repository
29
+ uses: actions/checkout@v4
30
+ with:
31
+ fetch-depth: 0
32
+
33
+ - name: Set up Node.js
34
+ uses: actions/setup-node@v4
35
+ with:
36
+ node-version: "20"
37
+ cache: "npm"
38
+
39
+ - name: Install dependencies
40
+ run: npm ci
41
+
42
+ - name: Debug Environment
43
+ run: |
44
+ echo "Checking environment variables..."
45
+ if [ -n "${{ secrets.TWOCAPTCHA_API_KEY }}" ]; then
46
+ echo "TWOCAPTCHA_API_KEY is set (length: ${#TWOCAPTCHA_API_KEY})"
47
+ else
48
+ echo "TWOCAPTCHA_API_KEY is NOT set"
49
+ fi
50
+ env:
51
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
52
+
53
+ - name: Run Windows tests with self-hosted instances
54
+ run: vitest run ${{ inputs.test_pattern }}
55
+ env:
56
+ TD_API_KEY: ${{ secrets.TD_API_KEY }}
57
+ TWOCAPTCHA_API_KEY: ${{ secrets.TWOCAPTCHA_API_KEY }}
58
+ TD_WEBSITE: ${{ secrets.TD_WEBSITE }}
59
+ TD_OS: windows
60
+ AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
61
+ AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
62
+ AWS_REGION: us-east-2
63
+ AWS_LAUNCH_TEMPLATE_ID: lt-0ef9bf26a945fb442
64
+ AMI_ID: ami-0dd5fa241273a7d50
65
+ RESOLUTION: 1920x1080
66
+
67
+ - name: Upload test results
68
+ if: always()
69
+ uses: actions/upload-artifact@v4
70
+ with:
71
+ name: test-results-windows
72
+ path: test-report.junit.xml
73
+ retention-days: 30
74
+
75
+ - name: Upload TestDriver AI CLI logs
76
+ if: always()
77
+ uses: actions/upload-artifact@v4
78
+ with:
79
+ name: testdriverai-cli-logs-windows
80
+ path: /tmp/testdriverai-cli-*.log
81
+ if-no-files-found: warn
82
+ retention-days: 30