testdriverai 7.2.63 → 7.2.65

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/agent/index.js +77 -59
  2. package/agent/interface.js +11 -251
  3. package/agent/lib/debugger-server.js +2 -1
  4. package/agent/lib/logger.js +56 -0
  5. package/agent/lib/sandbox.js +79 -29
  6. package/ai/agents/test-writer.md +457 -0
  7. package/{docs/v7/ai.mdx → ai/skills/testdriver:ai/SKILL.md} +3 -5
  8. package/{docs/v7/assert.mdx → ai/skills/testdriver:assert/SKILL.md} +3 -4
  9. package/{docs/v7/aws-setup.mdx → ai/skills/testdriver:aws-setup/SKILL.md} +3 -4
  10. package/{docs/v7/caching.mdx → ai/skills/testdriver:caching/SKILL.md} +3 -7
  11. package/{docs/v7/captcha.mdx → ai/skills/testdriver:captcha/SKILL.md} +4 -5
  12. package/{docs/v7/ci-cd.mdx → ai/skills/testdriver:ci-cd/SKILL.md} +3 -4
  13. package/{docs/v7/click.mdx → ai/skills/testdriver:click/SKILL.md} +3 -4
  14. package/{docs/v7/client.mdx → ai/skills/testdriver:client/SKILL.md} +11 -5
  15. package/{docs/v7/cloud.mdx → ai/skills/testdriver:cloud/SKILL.md} +3 -4
  16. package/{docs/v7/customizing-devices.mdx → ai/skills/testdriver:customizing-devices/SKILL.md} +36 -26
  17. package/{docs/v7/dashcam.mdx → ai/skills/testdriver:dashcam/SKILL.md} +3 -4
  18. package/{docs/v7/device-config.mdx → ai/skills/testdriver:device-config/SKILL.md} +3 -3
  19. package/{docs/v7/double-click.mdx → ai/skills/testdriver:double-click/SKILL.md} +3 -3
  20. package/{docs/v7/elements.mdx → ai/skills/testdriver:elements/SKILL.md} +3 -4
  21. package/{docs/v7/enterprise.mdx → ai/skills/testdriver:enterprise/SKILL.md} +3 -5
  22. package/ai/skills/testdriver:examples/SKILL.md +7 -0
  23. package/{docs/v7/exec.mdx → ai/skills/testdriver:exec/SKILL.md} +3 -4
  24. package/{docs/v7/find.mdx → ai/skills/testdriver:find/SKILL.md} +81 -4
  25. package/{docs/v7/focus-application.mdx → ai/skills/testdriver:focus-application/SKILL.md} +3 -4
  26. package/{docs/v7/generating-tests.mdx → ai/skills/testdriver:generating-tests/SKILL.md} +3 -3
  27. package/{docs/v7/hover.mdx → ai/skills/testdriver:hover/SKILL.md} +3 -4
  28. package/{docs/v7/locating-elements.mdx → ai/skills/testdriver:locating-elements/SKILL.md} +3 -3
  29. package/{docs/v7/making-assertions.mdx → ai/skills/testdriver:making-assertions/SKILL.md} +3 -3
  30. package/ai/skills/testdriver:mcp-workflow/SKILL.md +410 -0
  31. package/{docs/v7/mouse-down.mdx → ai/skills/testdriver:mouse-down/SKILL.md} +3 -3
  32. package/{docs/v7/mouse-up.mdx → ai/skills/testdriver:mouse-up/SKILL.md} +3 -3
  33. package/{docs/v7/performing-actions.mdx → ai/skills/testdriver:performing-actions/SKILL.md} +3 -3
  34. package/{docs/v7/press-keys.mdx → ai/skills/testdriver:press-keys/SKILL.md} +3 -4
  35. package/{docs/v7/quickstart.mdx → ai/skills/testdriver:quickstart/SKILL.md} +3 -4
  36. package/{docs/v7/reusable-code.mdx → ai/skills/testdriver:reusable-code/SKILL.md} +3 -3
  37. package/{docs/v7/right-click.mdx → ai/skills/testdriver:right-click/SKILL.md} +3 -3
  38. package/{docs/v7/running-tests.mdx → ai/skills/testdriver:running-tests/SKILL.md} +3 -3
  39. package/{docs/v7/screenshot.mdx → ai/skills/testdriver:screenshot/SKILL.md} +3 -4
  40. package/{docs/v7/scroll.mdx → ai/skills/testdriver:scroll/SKILL.md} +3 -4
  41. package/{docs/v7/secrets.mdx → ai/skills/testdriver:secrets/SKILL.md} +3 -3
  42. package/{docs/v7/self-hosted.mdx → ai/skills/testdriver:self-hosted/SKILL.md} +3 -4
  43. package/ai/skills/testdriver:testdriver/SKILL.md +31 -0
  44. package/{docs/v7/type.mdx → ai/skills/testdriver:type/SKILL.md} +3 -4
  45. package/{docs/v7/variables.mdx → ai/skills/testdriver:variables/SKILL.md} +3 -3
  46. package/{docs/v7/waiting-for-elements.mdx → ai/skills/testdriver:waiting-for-elements/SKILL.md} +3 -3
  47. package/{docs/v7/what-is-testdriver.mdx → ai/skills/testdriver:what-is-testdriver/SKILL.md} +3 -3
  48. package/interfaces/cli/commands/init.js +278 -1
  49. package/interfaces/cli/commands/setup.js +382 -0
  50. package/interfaces/vitest-plugin.mjs +190 -122
  51. package/lib/core/Dashcam.js +22 -15
  52. package/lib/sentry.js +4 -3
  53. package/lib/vitest/hooks.mjs +70 -16
  54. package/lib/vitest/setup-aws.mjs +0 -10
  55. package/package.json +29 -9
  56. package/sdk.d.ts +32 -5
  57. package/sdk.js +10 -9
  58. package/.env.example +0 -4
  59. package/.github/workflows/acceptance-linux-scheduled.yaml +0 -45
  60. package/.github/workflows/acceptance-windows-scheduled.yaml +0 -54
  61. package/.github/workflows/acceptance.yaml +0 -87
  62. package/.github/workflows/publish.yaml +0 -68
  63. package/.github/workflows/test-init.yml +0 -145
  64. package/.github/workflows/testdriver.yml +0 -170
  65. package/.github/workflows/windows-self-hosted.yaml +0 -82
  66. package/.prettierignore +0 -4
  67. package/.prettierrc +0 -1
  68. package/CHANGELOG.md +0 -30
  69. package/agents.md +0 -455
  70. package/debugger/bg.png +0 -0
  71. package/debugger/icon.png +0 -0
  72. package/debugger/index.html +0 -797
  73. package/debugger/td.png +0 -0
  74. package/debugger/tray-buffered.png +0 -0
  75. package/debugger/tray.png +0 -0
  76. package/docs/GITHUB_COMMENTS.md +0 -330
  77. package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +0 -167
  78. package/docs/QUICK-START-GITHUB-COMMENTS.md +0 -84
  79. package/docs/TEST-GITHUB-COMMENTS.md +0 -129
  80. package/docs/_scripts/link-replacer.js +0 -164
  81. package/docs/_scripts/upload-docs-to-openai.js +0 -284
  82. package/docs/docs.json +0 -393
  83. package/docs/github-integration-setup.md +0 -266
  84. package/docs/guide/best-practices-polling.mdx +0 -154
  85. package/docs/images/content/account/newprojectsettings.png +0 -0
  86. package/docs/images/content/account/projectpage.png +0 -0
  87. package/docs/images/content/account/projectreplays.png +0 -0
  88. package/docs/images/content/account/team-manage.png +0 -0
  89. package/docs/images/content/account/teampage.png +0 -0
  90. package/docs/images/content/extension/cursor.svg +0 -1
  91. package/docs/images/content/extension/vscode.svg +0 -57
  92. package/docs/images/content/extension/windsurf.svg +0 -3
  93. package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
  94. package/docs/images/content/side-by-side.png +0 -0
  95. package/docs/images/content/vscode/ide-full.png +0 -0
  96. package/docs/images/content/vscode/running.png +0 -0
  97. package/docs/images/content/vscode/vscode-2-assert.png +0 -0
  98. package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
  99. package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
  100. package/docs/images/content/vscode/vscode-file-creation.png +0 -0
  101. package/docs/images/content/vscode/vscode-install.png +0 -0
  102. package/docs/images/content/vscode/vscode-overview.png +0 -0
  103. package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
  104. package/docs/images/content/vscode/vscode-stopchat.png +0 -0
  105. package/docs/images/content/vscode/vscode-stoptest.png +0 -0
  106. package/docs/images/content/vscode/vscode-tdservice.png +0 -0
  107. package/docs/images/content/vscode/vscode-test-output.png +0 -0
  108. package/docs/images/content/vscode/vscode-testhistory.png +0 -0
  109. package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
  110. package/docs/images/content/vscode/vscode-testpane.png +0 -0
  111. package/docs/images/template/dark.png +0 -0
  112. package/docs/images/template/icon.png +0 -0
  113. package/docs/images/template/light.png +0 -0
  114. package/docs/snippets/calendar-link.mdx +0 -4
  115. package/docs/snippets/gitignore-warning.mdx +0 -7
  116. package/docs/snippets/lifecycle-warning.mdx +0 -6
  117. package/docs/snippets/test-prereqs.mdx +0 -12
  118. package/docs/snippets/tests/assert-replay.mdx +0 -7
  119. package/docs/snippets/tests/assert-yaml.mdx +0 -8
  120. package/docs/snippets/tests/exec-js-replay.mdx +0 -7
  121. package/docs/snippets/tests/exec-js-yaml.mdx +0 -32
  122. package/docs/snippets/tests/exec-shell-replay.mdx +0 -7
  123. package/docs/snippets/tests/exec-shell-yaml.mdx +0 -15
  124. package/docs/snippets/tests/hover-image-replay.mdx +0 -7
  125. package/docs/snippets/tests/hover-image-yaml.mdx +0 -17
  126. package/docs/snippets/tests/hover-text-replay.mdx +0 -7
  127. package/docs/snippets/tests/hover-text-with-description-replay.mdx +0 -7
  128. package/docs/snippets/tests/hover-text-with-description-yaml.mdx +0 -24
  129. package/docs/snippets/tests/hover-text-yaml.mdx +0 -14
  130. package/docs/snippets/tests/match-image-replay.mdx +0 -7
  131. package/docs/snippets/tests/match-image-yaml.mdx +0 -17
  132. package/docs/snippets/tests/press-keys-replay.mdx +0 -7
  133. package/docs/snippets/tests/press-keys-yaml.mdx +0 -36
  134. package/docs/snippets/tests/remember-replay.mdx +0 -7
  135. package/docs/snippets/tests/remember-yaml.mdx +0 -28
  136. package/docs/snippets/tests/scroll-replay.mdx +0 -7
  137. package/docs/snippets/tests/scroll-until-image-replay.mdx +0 -7
  138. package/docs/snippets/tests/scroll-until-image-yaml.mdx +0 -14
  139. package/docs/snippets/tests/scroll-until-text-replay.mdx +0 -7
  140. package/docs/snippets/tests/scroll-until-text-yaml.mdx +0 -17
  141. package/docs/snippets/tests/scroll-yaml.mdx +0 -30
  142. package/docs/snippets/tests/type-repeated-replay.mdx +0 -7
  143. package/docs/snippets/tests/type-repeated-yaml.mdx +0 -22
  144. package/docs/snippets/tests/type-replay.mdx +0 -7
  145. package/docs/snippets/tests/type-yaml.mdx +0 -28
  146. package/docs/snippets/tests/wait-for-image-replay.mdx +0 -7
  147. package/docs/snippets/tests/wait-for-image-yaml.mdx +0 -18
  148. package/docs/snippets/tests/wait-for-text-replay.mdx +0 -7
  149. package/docs/snippets/tests/wait-for-text-yaml.mdx +0 -18
  150. package/docs/snippets/tests/wait-replay.mdx +0 -7
  151. package/docs/snippets/tests/wait-yaml.mdx +0 -13
  152. package/docs/styles.css +0 -65
  153. package/docs/v6/account/dashboard.mdx +0 -16
  154. package/docs/v6/account/enterprise.mdx +0 -110
  155. package/docs/v6/account/pricing.mdx +0 -33
  156. package/docs/v6/account/projects.mdx +0 -33
  157. package/docs/v6/account/team.mdx +0 -35
  158. package/docs/v6/action/ami.mdx +0 -109
  159. package/docs/v6/action/performance.mdx +0 -105
  160. package/docs/v6/action/secrets.mdx +0 -93
  161. package/docs/v6/apps/chrome-extensions.mdx +0 -48
  162. package/docs/v6/apps/desktop-apps.mdx +0 -93
  163. package/docs/v6/apps/mobile-apps.mdx +0 -26
  164. package/docs/v6/apps/static-websites.mdx +0 -54
  165. package/docs/v6/apps/tauri-apps.mdx +0 -361
  166. package/docs/v6/bugs/jira.mdx +0 -232
  167. package/docs/v6/cli/overview.mdx +0 -66
  168. package/docs/v6/commands/assert.mdx +0 -45
  169. package/docs/v6/commands/exec.mdx +0 -282
  170. package/docs/v6/commands/focus-application.mdx +0 -44
  171. package/docs/v6/commands/hover-image.mdx +0 -69
  172. package/docs/v6/commands/hover-text.mdx +0 -47
  173. package/docs/v6/commands/if.mdx +0 -53
  174. package/docs/v6/commands/match-image.mdx +0 -67
  175. package/docs/v6/commands/press-keys.mdx +0 -87
  176. package/docs/v6/commands/remember.mdx +0 -49
  177. package/docs/v6/commands/run.mdx +0 -44
  178. package/docs/v6/commands/scroll-until-image.mdx +0 -66
  179. package/docs/v6/commands/scroll-until-text.mdx +0 -60
  180. package/docs/v6/commands/scroll.mdx +0 -69
  181. package/docs/v6/commands/type.mdx +0 -45
  182. package/docs/v6/commands/wait-for-image.mdx +0 -54
  183. package/docs/v6/commands/wait-for-text.mdx +0 -48
  184. package/docs/v6/commands/wait.mdx +0 -45
  185. package/docs/v6/exporting/junit.mdx +0 -218
  186. package/docs/v6/exporting/playwright.mdx +0 -197
  187. package/docs/v6/features/auto-healing.mdx +0 -144
  188. package/docs/v6/features/generation.mdx +0 -116
  189. package/docs/v6/features/parallel-testing.mdx +0 -151
  190. package/docs/v6/features/reusable-snippets.mdx +0 -131
  191. package/docs/v6/features/selectorless.mdx +0 -80
  192. package/docs/v6/features/visual-assertions.mdx +0 -139
  193. package/docs/v6/getting-started/ci.mdx +0 -146
  194. package/docs/v6/getting-started/cli.mdx +0 -91
  195. package/docs/v6/getting-started/editing.mdx +0 -100
  196. package/docs/v6/getting-started/playwright.mdx +0 -342
  197. package/docs/v6/getting-started/running.mdx +0 -48
  198. package/docs/v6/getting-started/self-hosting.mdx +0 -408
  199. package/docs/v6/getting-started/vscode.mdx +0 -89
  200. package/docs/v6/guide/assertions.mdx +0 -189
  201. package/docs/v6/guide/authentication.mdx +0 -136
  202. package/docs/v6/guide/code.mdx +0 -65
  203. package/docs/v6/guide/dashcam.mdx +0 -118
  204. package/docs/v6/guide/environment-variables.mdx +0 -26
  205. package/docs/v6/guide/lifecycle.mdx +0 -242
  206. package/docs/v6/guide/locating.mdx +0 -141
  207. package/docs/v6/guide/protips.mdx +0 -43
  208. package/docs/v6/guide/variables.mdx +0 -143
  209. package/docs/v6/guide/waiting.mdx +0 -130
  210. package/docs/v6/importing/csv.mdx +0 -196
  211. package/docs/v6/importing/gherkin.mdx +0 -143
  212. package/docs/v6/importing/jira.mdx +0 -164
  213. package/docs/v6/importing/testrail.mdx +0 -162
  214. package/docs/v6/integrations/electron.mdx +0 -146
  215. package/docs/v6/integrations/netlify.mdx +0 -100
  216. package/docs/v6/integrations/vercel.mdx +0 -125
  217. package/docs/v6/interactive/explore.mdx +0 -99
  218. package/docs/v6/interactive/run.mdx +0 -52
  219. package/docs/v6/interactive/save.mdx +0 -63
  220. package/docs/v6/overview/comparison.mdx +0 -101
  221. package/docs/v6/overview/faq.mdx +0 -162
  222. package/docs/v6/overview/performance.mdx +0 -52
  223. package/docs/v6/overview/quickstart.mdx +0 -137
  224. package/docs/v6/overview/what-is-testdriver.mdx +0 -85
  225. package/docs/v6/scenarios/ai-chatbot.mdx +0 -28
  226. package/docs/v6/scenarios/cookie-banner.mdx +0 -32
  227. package/docs/v6/scenarios/file-upload.mdx +0 -33
  228. package/docs/v6/scenarios/form-filling.mdx +0 -32
  229. package/docs/v6/scenarios/log-in.mdx +0 -75
  230. package/docs/v6/scenarios/pdf-generation.mdx +0 -25
  231. package/docs/v6/scenarios/spell-check.mdx +0 -22
  232. package/docs/v6/security/action.mdx +0 -84
  233. package/docs/v6/security/agent.mdx +0 -73
  234. package/docs/v6/security/platform.mdx +0 -77
  235. package/docs/v6/tutorials/advanced-test.mdx +0 -81
  236. package/docs/v6/tutorials/basic-test.mdx +0 -45
  237. package/docs/v7/_drafts/agents.mdx +0 -852
  238. package/docs/v7/_drafts/architecture.mdx +0 -399
  239. package/docs/v7/_drafts/auto-cache-key.mdx +0 -167
  240. package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +0 -100
  241. package/docs/v7/_drafts/best-practices.mdx +0 -486
  242. package/docs/v7/_drafts/caching-ai.mdx +0 -215
  243. package/docs/v7/_drafts/caching-selectors.mdx +0 -424
  244. package/docs/v7/_drafts/caching.mdx +0 -366
  245. package/docs/v7/_drafts/cli-to-sdk-migration.mdx +0 -425
  246. package/docs/v7/_drafts/commands/assert.mdx +0 -45
  247. package/docs/v7/_drafts/commands/exec.mdx +0 -282
  248. package/docs/v7/_drafts/commands/focus-application.mdx +0 -44
  249. package/docs/v7/_drafts/commands/hover-image.mdx +0 -69
  250. package/docs/v7/_drafts/commands/hover-text.mdx +0 -47
  251. package/docs/v7/_drafts/commands/if.mdx +0 -53
  252. package/docs/v7/_drafts/commands/match-image.mdx +0 -67
  253. package/docs/v7/_drafts/commands/press-keys.mdx +0 -87
  254. package/docs/v7/_drafts/commands/remember.mdx +0 -49
  255. package/docs/v7/_drafts/commands/run.mdx +0 -44
  256. package/docs/v7/_drafts/commands/scroll-until-image.mdx +0 -66
  257. package/docs/v7/_drafts/commands/scroll-until-text.mdx +0 -60
  258. package/docs/v7/_drafts/commands/scroll.mdx +0 -69
  259. package/docs/v7/_drafts/commands/type.mdx +0 -45
  260. package/docs/v7/_drafts/commands/wait-for-image.mdx +0 -54
  261. package/docs/v7/_drafts/commands/wait-for-text.mdx +0 -48
  262. package/docs/v7/_drafts/commands/wait.mdx +0 -45
  263. package/docs/v7/_drafts/configuration.mdx +0 -378
  264. package/docs/v7/_drafts/contributing.mdx +0 -174
  265. package/docs/v7/_drafts/core.mdx +0 -458
  266. package/docs/v7/_drafts/dashcam-title-feature.mdx +0 -89
  267. package/docs/v7/_drafts/debugging.mdx +0 -349
  268. package/docs/v7/_drafts/error-handling.mdx +0 -501
  269. package/docs/v7/_drafts/faq.mdx +0 -393
  270. package/docs/v7/_drafts/hooks.mdx +0 -360
  271. package/docs/v7/_drafts/init-command.mdx +0 -95
  272. package/docs/v7/_drafts/installation.mdx +0 -420
  273. package/docs/v7/_drafts/migration.mdx +0 -562
  274. package/docs/v7/_drafts/observable.mdx +0 -604
  275. package/docs/v7/_drafts/playwright.mdx +0 -342
  276. package/docs/v7/_drafts/plugin-migration.mdx +0 -220
  277. package/docs/v7/_drafts/powerful.mdx +0 -419
  278. package/docs/v7/_drafts/presets.mdx +0 -210
  279. package/docs/v7/_drafts/progressive-disclosure.mdx +0 -230
  280. package/docs/v7/_drafts/prompt-cache.mdx +0 -200
  281. package/docs/v7/_drafts/provision.mdx +0 -390
  282. package/docs/v7/_drafts/quick-start-test-recording.mdx +0 -214
  283. package/docs/v7/_drafts/readme.mdx +0 -135
  284. package/docs/v7/_drafts/reports.mdx +0 -414
  285. package/docs/v7/_drafts/scalable.mdx +0 -754
  286. package/docs/v7/_drafts/screenshot.mdx +0 -155
  287. package/docs/v7/_drafts/sdk-awesome-logs.mdx +0 -468
  288. package/docs/v7/_drafts/sdk-browser-rendering.mdx +0 -167
  289. package/docs/v7/_drafts/sdk-migration.mdx +0 -474
  290. package/docs/v7/_drafts/sdk-v7-complete.mdx +0 -345
  291. package/docs/v7/_drafts/self-hosting.mdx +0 -369
  292. package/docs/v7/_drafts/test-recording.mdx +0 -382
  293. package/docs/v7/_drafts/troubleshooting.mdx +0 -526
  294. package/docs/v7/_drafts/vitest-plugin.mdx +0 -477
  295. package/docs/v7/_drafts/vitest.mdx +0 -535
  296. package/docs/v7/_drafts/writing-tests.mdx +0 -25
  297. package/docs/v7/examples.mdx +0 -5
  298. package/eslint.config.js +0 -67
  299. package/examples/ai.test.mjs +0 -30
  300. package/examples/assert.test.mjs +0 -46
  301. package/examples/captcha-api.test.mjs +0 -50
  302. package/examples/chrome-extension.test.mjs +0 -94
  303. package/examples/drag-and-drop.test.mjs +0 -58
  304. package/examples/element-not-found.test.mjs +0 -26
  305. package/examples/exec-output.test.mjs +0 -59
  306. package/examples/exec-pwsh.test.mjs +0 -57
  307. package/examples/focus-window.test.mjs +0 -36
  308. package/examples/formatted-logging.test.mjs +0 -26
  309. package/examples/hover-image.test.mjs +0 -52
  310. package/examples/hover-text-with-description.test.mjs +0 -56
  311. package/examples/hover-text.test.mjs +0 -27
  312. package/examples/installer.test.mjs +0 -49
  313. package/examples/launch-vscode-linux.test.mjs +0 -54
  314. package/examples/match-image.test.mjs +0 -54
  315. package/examples/no-provision.test.mjs +0 -23
  316. package/examples/press-keys.test.mjs +0 -50
  317. package/examples/prompt.test.mjs +0 -33
  318. package/examples/scroll-keyboard.test.mjs +0 -37
  319. package/examples/scroll-until-image.test.mjs +0 -39
  320. package/examples/scroll-until-text.test.mjs +0 -67
  321. package/examples/scroll.test.mjs +0 -41
  322. package/examples/type.test.mjs +0 -45
  323. package/examples/windows-installer.test.mjs +0 -53
  324. package/interfaces/cli/commands/edit.js +0 -3
  325. package/interfaces/cli/commands/generate.js +0 -3
  326. package/interfaces/cli/commands/run.js +0 -3
  327. package/interfaces/cli/utils/factory.js +0 -71
  328. package/jsconfig.json +0 -26
  329. package/manual/test-init-command.js +0 -223
  330. package/sdk-log-formatter.js +0 -930
  331. package/setup/aws/cloudformation.yaml +0 -470
  332. package/setup/aws/spawn-runner.sh +0 -190
  333. package/test/api-resilience.test.mjs +0 -0
  334. package/test/captcha-solver.test.mjs +0 -70
  335. package/test/chrome-remote-debugging.test.mjs +0 -66
  336. package/test/manual/debug-locate-response.js +0 -82
  337. package/test/manual/reconnect-provision.test.mjs +0 -49
  338. package/test/manual/test-console-logs.test.mjs +0 -42
  339. package/test/manual/test-find-api.js +0 -73
  340. package/test/manual/test-init.sh +0 -54
  341. package/test/manual/test-prompt-cache.js +0 -96
  342. package/test/manual/test-provision-auth.mjs +0 -22
  343. package/test/manual/test-sandbox-render.js +0 -28
  344. package/test/manual/test-sdk-methods.js +0 -15
  345. package/test/manual/test-sdk-refactor.js +0 -53
  346. package/test/manual/test-stack-trace.mjs +0 -57
  347. package/test/manual/verify-element-api.js +0 -89
  348. package/test/manual/verify-types.js +0 -0
  349. package/test/manual-unawaited-promise.test.mjs +0 -31
  350. package/testdriver-plugin/skills/actions/SKILL.md +0 -93
  351. package/testdriver-plugin/skills/assertions/SKILL.md +0 -77
  352. package/testdriver-plugin/skills/caching/SKILL.md +0 -66
  353. package/testdriver-plugin/skills/creating-tests/SKILL.md +0 -104
  354. package/testdriver-plugin/skills/finding-elements/SKILL.md +0 -77
  355. package/testdriver-plugin/skills/github-actions/SKILL.md +0 -100
  356. package/testdriver-plugin/skills/running-tests/SKILL.md +0 -77
  357. package/testdriver-plugin/skills/secrets/SKILL.md +0 -87
  358. package/testdriver-plugin/skills/self-hosting/SKILL.md +0 -89
  359. package/testdriver-plugin/skills/setup/SKILL.md +0 -76
  360. package/testdriver-plugin/skills/variables/SKILL.md +0 -88
  361. package/testdriver-plugin/skills/waiting/SKILL.md +0 -72
  362. package/vitest.config.mjs +0 -29
@@ -1,54 +0,0 @@
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
- });
@@ -1,23 +0,0 @@
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
-
@@ -1,50 +0,0 @@
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
- });
@@ -1,33 +0,0 @@
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
- });
@@ -1,37 +0,0 @@
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
- });
@@ -1,39 +0,0 @@
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
- });
@@ -1,67 +0,0 @@
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
- });
@@ -1,41 +0,0 @@
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
- });
@@ -1,45 +0,0 @@
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
- });
@@ -1,53 +0,0 @@
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 npx 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
- });
@@ -1,3 +0,0 @@
1
- const { createOclifCommand } = require("../utils/factory.js");
2
-
3
- module.exports = createOclifCommand("edit");
@@ -1,3 +0,0 @@
1
- const { createOclifCommand } = require("../utils/factory.js");
2
-
3
- module.exports = createOclifCommand("generate");
@@ -1,3 +0,0 @@
1
- const { createOclifCommand } = require("../utils/factory.js");
2
-
3
- module.exports = createOclifCommand("run");
@@ -1,71 +0,0 @@
1
- const BaseCommand = require("../lib/base.js");
2
- const { createCommandDefinitions } = require("../../../agent/interface.js");
3
-
4
- /**
5
- * Creates an oclif command class from a unified command definition
6
- */
7
- function createOclifCommand(commandName) {
8
- // Get the command definition once during class creation
9
- const tempAgent = { workingDir: process.cwd() };
10
- const definitions = createCommandDefinitions(tempAgent);
11
- const commandDef = definitions[commandName];
12
-
13
- const DynamicCommand = class extends BaseCommand {
14
- async run() {
15
- try {
16
- const { args, flags } = await this.parse(this.constructor);
17
-
18
- // Special handling for edit mode
19
- if (commandName === "edit") {
20
- await this.setupAgent(args.file, flags);
21
-
22
- // Build environment for edit mode
23
- await this.agent.buildEnv(flags);
24
-
25
- // Start interactive mode
26
- const ReadlineInterface = require("../../readline.js");
27
- const readlineInterface = new ReadlineInterface(this.agent);
28
- this.agent.readlineInterface = readlineInterface;
29
- await readlineInterface.start();
30
- } else {
31
- // For run and generate commands, use the unified command system
32
- let commandArgs;
33
- if (commandName === "generate") {
34
- // Generate command: pass prompt as first argument
35
- await this.setupAgent(args.prompt, flags);
36
- commandArgs = [args.prompt];
37
- } else {
38
- // Run and other commands use file argument
39
- const fileArg = args.file || args.action || null;
40
- await this.setupAgent(fileArg, flags);
41
- commandArgs = [fileArg];
42
- }
43
-
44
- if (commandName === "run") {
45
- // Set error limit higher for run command
46
- this.agent.errorLimit = 100;
47
- }
48
-
49
- // Execute through unified command system
50
- await this.agent.executeUnifiedCommand(
51
- commandName,
52
- commandArgs,
53
- flags,
54
- );
55
- }
56
- } catch (error) {
57
- console.error(`Error executing ${commandName} command:`, error);
58
- process.exit(1);
59
- }
60
- }
61
- };
62
-
63
- // Set static properties directly on the class
64
- DynamicCommand.description = commandDef?.description || "";
65
- DynamicCommand.args = commandDef?.args || {};
66
- DynamicCommand.flags = commandDef?.flags || {};
67
-
68
- return DynamicCommand;
69
- }
70
-
71
- module.exports = { createOclifCommand };
package/jsconfig.json DELETED
@@ -1,26 +0,0 @@
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
- }