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.
- package/agent/index.js +77 -59
- package/agent/interface.js +11 -251
- package/agent/lib/debugger-server.js +2 -1
- package/agent/lib/logger.js +56 -0
- package/agent/lib/sandbox.js +79 -29
- package/ai/agents/test-writer.md +457 -0
- package/{docs/v7/ai.mdx → ai/skills/testdriver:ai/SKILL.md} +3 -5
- package/{docs/v7/assert.mdx → ai/skills/testdriver:assert/SKILL.md} +3 -4
- package/{docs/v7/aws-setup.mdx → ai/skills/testdriver:aws-setup/SKILL.md} +3 -4
- package/{docs/v7/caching.mdx → ai/skills/testdriver:caching/SKILL.md} +3 -7
- package/{docs/v7/captcha.mdx → ai/skills/testdriver:captcha/SKILL.md} +4 -5
- package/{docs/v7/ci-cd.mdx → ai/skills/testdriver:ci-cd/SKILL.md} +3 -4
- package/{docs/v7/click.mdx → ai/skills/testdriver:click/SKILL.md} +3 -4
- package/{docs/v7/client.mdx → ai/skills/testdriver:client/SKILL.md} +11 -5
- package/{docs/v7/cloud.mdx → ai/skills/testdriver:cloud/SKILL.md} +3 -4
- package/{docs/v7/customizing-devices.mdx → ai/skills/testdriver:customizing-devices/SKILL.md} +36 -26
- package/{docs/v7/dashcam.mdx → ai/skills/testdriver:dashcam/SKILL.md} +3 -4
- package/{docs/v7/device-config.mdx → ai/skills/testdriver:device-config/SKILL.md} +3 -3
- package/{docs/v7/double-click.mdx → ai/skills/testdriver:double-click/SKILL.md} +3 -3
- package/{docs/v7/elements.mdx → ai/skills/testdriver:elements/SKILL.md} +3 -4
- package/{docs/v7/enterprise.mdx → ai/skills/testdriver:enterprise/SKILL.md} +3 -5
- package/ai/skills/testdriver:examples/SKILL.md +7 -0
- package/{docs/v7/exec.mdx → ai/skills/testdriver:exec/SKILL.md} +3 -4
- package/{docs/v7/find.mdx → ai/skills/testdriver:find/SKILL.md} +81 -4
- package/{docs/v7/focus-application.mdx → ai/skills/testdriver:focus-application/SKILL.md} +3 -4
- package/{docs/v7/generating-tests.mdx → ai/skills/testdriver:generating-tests/SKILL.md} +3 -3
- package/{docs/v7/hover.mdx → ai/skills/testdriver:hover/SKILL.md} +3 -4
- package/{docs/v7/locating-elements.mdx → ai/skills/testdriver:locating-elements/SKILL.md} +3 -3
- package/{docs/v7/making-assertions.mdx → ai/skills/testdriver:making-assertions/SKILL.md} +3 -3
- package/ai/skills/testdriver:mcp-workflow/SKILL.md +410 -0
- package/{docs/v7/mouse-down.mdx → ai/skills/testdriver:mouse-down/SKILL.md} +3 -3
- package/{docs/v7/mouse-up.mdx → ai/skills/testdriver:mouse-up/SKILL.md} +3 -3
- package/{docs/v7/performing-actions.mdx → ai/skills/testdriver:performing-actions/SKILL.md} +3 -3
- package/{docs/v7/press-keys.mdx → ai/skills/testdriver:press-keys/SKILL.md} +3 -4
- package/{docs/v7/quickstart.mdx → ai/skills/testdriver:quickstart/SKILL.md} +3 -4
- package/{docs/v7/reusable-code.mdx → ai/skills/testdriver:reusable-code/SKILL.md} +3 -3
- package/{docs/v7/right-click.mdx → ai/skills/testdriver:right-click/SKILL.md} +3 -3
- package/{docs/v7/running-tests.mdx → ai/skills/testdriver:running-tests/SKILL.md} +3 -3
- package/{docs/v7/screenshot.mdx → ai/skills/testdriver:screenshot/SKILL.md} +3 -4
- package/{docs/v7/scroll.mdx → ai/skills/testdriver:scroll/SKILL.md} +3 -4
- package/{docs/v7/secrets.mdx → ai/skills/testdriver:secrets/SKILL.md} +3 -3
- package/{docs/v7/self-hosted.mdx → ai/skills/testdriver:self-hosted/SKILL.md} +3 -4
- package/ai/skills/testdriver:testdriver/SKILL.md +31 -0
- package/{docs/v7/type.mdx → ai/skills/testdriver:type/SKILL.md} +3 -4
- package/{docs/v7/variables.mdx → ai/skills/testdriver:variables/SKILL.md} +3 -3
- package/{docs/v7/waiting-for-elements.mdx → ai/skills/testdriver:waiting-for-elements/SKILL.md} +3 -3
- package/{docs/v7/what-is-testdriver.mdx → ai/skills/testdriver:what-is-testdriver/SKILL.md} +3 -3
- package/interfaces/cli/commands/init.js +278 -1
- package/interfaces/cli/commands/setup.js +382 -0
- package/interfaces/vitest-plugin.mjs +190 -122
- package/lib/core/Dashcam.js +22 -15
- package/lib/sentry.js +4 -3
- package/lib/vitest/hooks.mjs +70 -16
- package/lib/vitest/setup-aws.mjs +0 -10
- package/package.json +29 -9
- package/sdk.d.ts +32 -5
- package/sdk.js +10 -9
- package/.env.example +0 -4
- package/.github/workflows/acceptance-linux-scheduled.yaml +0 -45
- package/.github/workflows/acceptance-windows-scheduled.yaml +0 -54
- package/.github/workflows/acceptance.yaml +0 -87
- package/.github/workflows/publish.yaml +0 -68
- package/.github/workflows/test-init.yml +0 -145
- package/.github/workflows/testdriver.yml +0 -170
- package/.github/workflows/windows-self-hosted.yaml +0 -82
- package/.prettierignore +0 -4
- package/.prettierrc +0 -1
- package/CHANGELOG.md +0 -30
- package/agents.md +0 -455
- package/debugger/bg.png +0 -0
- package/debugger/icon.png +0 -0
- package/debugger/index.html +0 -797
- package/debugger/td.png +0 -0
- package/debugger/tray-buffered.png +0 -0
- package/debugger/tray.png +0 -0
- package/docs/GITHUB_COMMENTS.md +0 -330
- package/docs/GITHUB_COMMENTS_ANNOUNCEMENT.md +0 -167
- package/docs/QUICK-START-GITHUB-COMMENTS.md +0 -84
- package/docs/TEST-GITHUB-COMMENTS.md +0 -129
- package/docs/_scripts/link-replacer.js +0 -164
- package/docs/_scripts/upload-docs-to-openai.js +0 -284
- package/docs/docs.json +0 -393
- package/docs/github-integration-setup.md +0 -266
- package/docs/guide/best-practices-polling.mdx +0 -154
- package/docs/images/content/account/newprojectsettings.png +0 -0
- package/docs/images/content/account/projectpage.png +0 -0
- package/docs/images/content/account/projectreplays.png +0 -0
- package/docs/images/content/account/team-manage.png +0 -0
- package/docs/images/content/account/teampage.png +0 -0
- package/docs/images/content/extension/cursor.svg +0 -1
- package/docs/images/content/extension/vscode.svg +0 -57
- package/docs/images/content/extension/windsurf.svg +0 -3
- package/docs/images/content/self-hosted/launchtemplateid.png +0 -0
- package/docs/images/content/side-by-side.png +0 -0
- package/docs/images/content/vscode/ide-full.png +0 -0
- package/docs/images/content/vscode/running.png +0 -0
- package/docs/images/content/vscode/vscode-2-assert.png +0 -0
- package/docs/images/content/vscode/vscode-agent-preview.png +0 -0
- package/docs/images/content/vscode/vscode-copilot-ask.png +0 -0
- package/docs/images/content/vscode/vscode-file-creation.png +0 -0
- package/docs/images/content/vscode/vscode-install.png +0 -0
- package/docs/images/content/vscode/vscode-overview.png +0 -0
- package/docs/images/content/vscode/vscode-setup-walkthrough.png +0 -0
- package/docs/images/content/vscode/vscode-stopchat.png +0 -0
- package/docs/images/content/vscode/vscode-stoptest.png +0 -0
- package/docs/images/content/vscode/vscode-tdservice.png +0 -0
- package/docs/images/content/vscode/vscode-test-output.png +0 -0
- package/docs/images/content/vscode/vscode-testhistory.png +0 -0
- package/docs/images/content/vscode/vscode-testpane-runtests.png +0 -0
- package/docs/images/content/vscode/vscode-testpane.png +0 -0
- package/docs/images/template/dark.png +0 -0
- package/docs/images/template/icon.png +0 -0
- package/docs/images/template/light.png +0 -0
- package/docs/snippets/calendar-link.mdx +0 -4
- package/docs/snippets/gitignore-warning.mdx +0 -7
- package/docs/snippets/lifecycle-warning.mdx +0 -6
- package/docs/snippets/test-prereqs.mdx +0 -12
- package/docs/snippets/tests/assert-replay.mdx +0 -7
- package/docs/snippets/tests/assert-yaml.mdx +0 -8
- package/docs/snippets/tests/exec-js-replay.mdx +0 -7
- package/docs/snippets/tests/exec-js-yaml.mdx +0 -32
- package/docs/snippets/tests/exec-shell-replay.mdx +0 -7
- package/docs/snippets/tests/exec-shell-yaml.mdx +0 -15
- package/docs/snippets/tests/hover-image-replay.mdx +0 -7
- package/docs/snippets/tests/hover-image-yaml.mdx +0 -17
- package/docs/snippets/tests/hover-text-replay.mdx +0 -7
- package/docs/snippets/tests/hover-text-with-description-replay.mdx +0 -7
- package/docs/snippets/tests/hover-text-with-description-yaml.mdx +0 -24
- package/docs/snippets/tests/hover-text-yaml.mdx +0 -14
- package/docs/snippets/tests/match-image-replay.mdx +0 -7
- package/docs/snippets/tests/match-image-yaml.mdx +0 -17
- package/docs/snippets/tests/press-keys-replay.mdx +0 -7
- package/docs/snippets/tests/press-keys-yaml.mdx +0 -36
- package/docs/snippets/tests/remember-replay.mdx +0 -7
- package/docs/snippets/tests/remember-yaml.mdx +0 -28
- package/docs/snippets/tests/scroll-replay.mdx +0 -7
- package/docs/snippets/tests/scroll-until-image-replay.mdx +0 -7
- package/docs/snippets/tests/scroll-until-image-yaml.mdx +0 -14
- package/docs/snippets/tests/scroll-until-text-replay.mdx +0 -7
- package/docs/snippets/tests/scroll-until-text-yaml.mdx +0 -17
- package/docs/snippets/tests/scroll-yaml.mdx +0 -30
- package/docs/snippets/tests/type-repeated-replay.mdx +0 -7
- package/docs/snippets/tests/type-repeated-yaml.mdx +0 -22
- package/docs/snippets/tests/type-replay.mdx +0 -7
- package/docs/snippets/tests/type-yaml.mdx +0 -28
- package/docs/snippets/tests/wait-for-image-replay.mdx +0 -7
- package/docs/snippets/tests/wait-for-image-yaml.mdx +0 -18
- package/docs/snippets/tests/wait-for-text-replay.mdx +0 -7
- package/docs/snippets/tests/wait-for-text-yaml.mdx +0 -18
- package/docs/snippets/tests/wait-replay.mdx +0 -7
- package/docs/snippets/tests/wait-yaml.mdx +0 -13
- package/docs/styles.css +0 -65
- package/docs/v6/account/dashboard.mdx +0 -16
- package/docs/v6/account/enterprise.mdx +0 -110
- package/docs/v6/account/pricing.mdx +0 -33
- package/docs/v6/account/projects.mdx +0 -33
- package/docs/v6/account/team.mdx +0 -35
- package/docs/v6/action/ami.mdx +0 -109
- package/docs/v6/action/performance.mdx +0 -105
- package/docs/v6/action/secrets.mdx +0 -93
- package/docs/v6/apps/chrome-extensions.mdx +0 -48
- package/docs/v6/apps/desktop-apps.mdx +0 -93
- package/docs/v6/apps/mobile-apps.mdx +0 -26
- package/docs/v6/apps/static-websites.mdx +0 -54
- package/docs/v6/apps/tauri-apps.mdx +0 -361
- package/docs/v6/bugs/jira.mdx +0 -232
- package/docs/v6/cli/overview.mdx +0 -66
- package/docs/v6/commands/assert.mdx +0 -45
- package/docs/v6/commands/exec.mdx +0 -282
- package/docs/v6/commands/focus-application.mdx +0 -44
- package/docs/v6/commands/hover-image.mdx +0 -69
- package/docs/v6/commands/hover-text.mdx +0 -47
- package/docs/v6/commands/if.mdx +0 -53
- package/docs/v6/commands/match-image.mdx +0 -67
- package/docs/v6/commands/press-keys.mdx +0 -87
- package/docs/v6/commands/remember.mdx +0 -49
- package/docs/v6/commands/run.mdx +0 -44
- package/docs/v6/commands/scroll-until-image.mdx +0 -66
- package/docs/v6/commands/scroll-until-text.mdx +0 -60
- package/docs/v6/commands/scroll.mdx +0 -69
- package/docs/v6/commands/type.mdx +0 -45
- package/docs/v6/commands/wait-for-image.mdx +0 -54
- package/docs/v6/commands/wait-for-text.mdx +0 -48
- package/docs/v6/commands/wait.mdx +0 -45
- package/docs/v6/exporting/junit.mdx +0 -218
- package/docs/v6/exporting/playwright.mdx +0 -197
- package/docs/v6/features/auto-healing.mdx +0 -144
- package/docs/v6/features/generation.mdx +0 -116
- package/docs/v6/features/parallel-testing.mdx +0 -151
- package/docs/v6/features/reusable-snippets.mdx +0 -131
- package/docs/v6/features/selectorless.mdx +0 -80
- package/docs/v6/features/visual-assertions.mdx +0 -139
- package/docs/v6/getting-started/ci.mdx +0 -146
- package/docs/v6/getting-started/cli.mdx +0 -91
- package/docs/v6/getting-started/editing.mdx +0 -100
- package/docs/v6/getting-started/playwright.mdx +0 -342
- package/docs/v6/getting-started/running.mdx +0 -48
- package/docs/v6/getting-started/self-hosting.mdx +0 -408
- package/docs/v6/getting-started/vscode.mdx +0 -89
- package/docs/v6/guide/assertions.mdx +0 -189
- package/docs/v6/guide/authentication.mdx +0 -136
- package/docs/v6/guide/code.mdx +0 -65
- package/docs/v6/guide/dashcam.mdx +0 -118
- package/docs/v6/guide/environment-variables.mdx +0 -26
- package/docs/v6/guide/lifecycle.mdx +0 -242
- package/docs/v6/guide/locating.mdx +0 -141
- package/docs/v6/guide/protips.mdx +0 -43
- package/docs/v6/guide/variables.mdx +0 -143
- package/docs/v6/guide/waiting.mdx +0 -130
- package/docs/v6/importing/csv.mdx +0 -196
- package/docs/v6/importing/gherkin.mdx +0 -143
- package/docs/v6/importing/jira.mdx +0 -164
- package/docs/v6/importing/testrail.mdx +0 -162
- package/docs/v6/integrations/electron.mdx +0 -146
- package/docs/v6/integrations/netlify.mdx +0 -100
- package/docs/v6/integrations/vercel.mdx +0 -125
- package/docs/v6/interactive/explore.mdx +0 -99
- package/docs/v6/interactive/run.mdx +0 -52
- package/docs/v6/interactive/save.mdx +0 -63
- package/docs/v6/overview/comparison.mdx +0 -101
- package/docs/v6/overview/faq.mdx +0 -162
- package/docs/v6/overview/performance.mdx +0 -52
- package/docs/v6/overview/quickstart.mdx +0 -137
- package/docs/v6/overview/what-is-testdriver.mdx +0 -85
- package/docs/v6/scenarios/ai-chatbot.mdx +0 -28
- package/docs/v6/scenarios/cookie-banner.mdx +0 -32
- package/docs/v6/scenarios/file-upload.mdx +0 -33
- package/docs/v6/scenarios/form-filling.mdx +0 -32
- package/docs/v6/scenarios/log-in.mdx +0 -75
- package/docs/v6/scenarios/pdf-generation.mdx +0 -25
- package/docs/v6/scenarios/spell-check.mdx +0 -22
- package/docs/v6/security/action.mdx +0 -84
- package/docs/v6/security/agent.mdx +0 -73
- package/docs/v6/security/platform.mdx +0 -77
- package/docs/v6/tutorials/advanced-test.mdx +0 -81
- package/docs/v6/tutorials/basic-test.mdx +0 -45
- package/docs/v7/_drafts/agents.mdx +0 -852
- package/docs/v7/_drafts/architecture.mdx +0 -399
- package/docs/v7/_drafts/auto-cache-key.mdx +0 -167
- package/docs/v7/_drafts/awesome-logs-quick-ref.mdx +0 -100
- package/docs/v7/_drafts/best-practices.mdx +0 -486
- package/docs/v7/_drafts/caching-ai.mdx +0 -215
- package/docs/v7/_drafts/caching-selectors.mdx +0 -424
- package/docs/v7/_drafts/caching.mdx +0 -366
- package/docs/v7/_drafts/cli-to-sdk-migration.mdx +0 -425
- package/docs/v7/_drafts/commands/assert.mdx +0 -45
- package/docs/v7/_drafts/commands/exec.mdx +0 -282
- package/docs/v7/_drafts/commands/focus-application.mdx +0 -44
- package/docs/v7/_drafts/commands/hover-image.mdx +0 -69
- package/docs/v7/_drafts/commands/hover-text.mdx +0 -47
- package/docs/v7/_drafts/commands/if.mdx +0 -53
- package/docs/v7/_drafts/commands/match-image.mdx +0 -67
- package/docs/v7/_drafts/commands/press-keys.mdx +0 -87
- package/docs/v7/_drafts/commands/remember.mdx +0 -49
- package/docs/v7/_drafts/commands/run.mdx +0 -44
- package/docs/v7/_drafts/commands/scroll-until-image.mdx +0 -66
- package/docs/v7/_drafts/commands/scroll-until-text.mdx +0 -60
- package/docs/v7/_drafts/commands/scroll.mdx +0 -69
- package/docs/v7/_drafts/commands/type.mdx +0 -45
- package/docs/v7/_drafts/commands/wait-for-image.mdx +0 -54
- package/docs/v7/_drafts/commands/wait-for-text.mdx +0 -48
- package/docs/v7/_drafts/commands/wait.mdx +0 -45
- package/docs/v7/_drafts/configuration.mdx +0 -378
- package/docs/v7/_drafts/contributing.mdx +0 -174
- package/docs/v7/_drafts/core.mdx +0 -458
- package/docs/v7/_drafts/dashcam-title-feature.mdx +0 -89
- package/docs/v7/_drafts/debugging.mdx +0 -349
- package/docs/v7/_drafts/error-handling.mdx +0 -501
- package/docs/v7/_drafts/faq.mdx +0 -393
- package/docs/v7/_drafts/hooks.mdx +0 -360
- package/docs/v7/_drafts/init-command.mdx +0 -95
- package/docs/v7/_drafts/installation.mdx +0 -420
- package/docs/v7/_drafts/migration.mdx +0 -562
- package/docs/v7/_drafts/observable.mdx +0 -604
- package/docs/v7/_drafts/playwright.mdx +0 -342
- package/docs/v7/_drafts/plugin-migration.mdx +0 -220
- package/docs/v7/_drafts/powerful.mdx +0 -419
- package/docs/v7/_drafts/presets.mdx +0 -210
- package/docs/v7/_drafts/progressive-disclosure.mdx +0 -230
- package/docs/v7/_drafts/prompt-cache.mdx +0 -200
- package/docs/v7/_drafts/provision.mdx +0 -390
- package/docs/v7/_drafts/quick-start-test-recording.mdx +0 -214
- package/docs/v7/_drafts/readme.mdx +0 -135
- package/docs/v7/_drafts/reports.mdx +0 -414
- package/docs/v7/_drafts/scalable.mdx +0 -754
- package/docs/v7/_drafts/screenshot.mdx +0 -155
- package/docs/v7/_drafts/sdk-awesome-logs.mdx +0 -468
- package/docs/v7/_drafts/sdk-browser-rendering.mdx +0 -167
- package/docs/v7/_drafts/sdk-migration.mdx +0 -474
- package/docs/v7/_drafts/sdk-v7-complete.mdx +0 -345
- package/docs/v7/_drafts/self-hosting.mdx +0 -369
- package/docs/v7/_drafts/test-recording.mdx +0 -382
- package/docs/v7/_drafts/troubleshooting.mdx +0 -526
- package/docs/v7/_drafts/vitest-plugin.mdx +0 -477
- package/docs/v7/_drafts/vitest.mdx +0 -535
- package/docs/v7/_drafts/writing-tests.mdx +0 -25
- package/docs/v7/examples.mdx +0 -5
- package/eslint.config.js +0 -67
- package/examples/ai.test.mjs +0 -30
- package/examples/assert.test.mjs +0 -46
- package/examples/captcha-api.test.mjs +0 -50
- package/examples/chrome-extension.test.mjs +0 -94
- package/examples/drag-and-drop.test.mjs +0 -58
- package/examples/element-not-found.test.mjs +0 -26
- package/examples/exec-output.test.mjs +0 -59
- package/examples/exec-pwsh.test.mjs +0 -57
- package/examples/focus-window.test.mjs +0 -36
- package/examples/formatted-logging.test.mjs +0 -26
- package/examples/hover-image.test.mjs +0 -52
- package/examples/hover-text-with-description.test.mjs +0 -56
- package/examples/hover-text.test.mjs +0 -27
- package/examples/installer.test.mjs +0 -49
- package/examples/launch-vscode-linux.test.mjs +0 -54
- package/examples/match-image.test.mjs +0 -54
- package/examples/no-provision.test.mjs +0 -23
- package/examples/press-keys.test.mjs +0 -50
- package/examples/prompt.test.mjs +0 -33
- package/examples/scroll-keyboard.test.mjs +0 -37
- package/examples/scroll-until-image.test.mjs +0 -39
- package/examples/scroll-until-text.test.mjs +0 -67
- package/examples/scroll.test.mjs +0 -41
- package/examples/type.test.mjs +0 -45
- package/examples/windows-installer.test.mjs +0 -53
- package/interfaces/cli/commands/edit.js +0 -3
- package/interfaces/cli/commands/generate.js +0 -3
- package/interfaces/cli/commands/run.js +0 -3
- package/interfaces/cli/utils/factory.js +0 -71
- package/jsconfig.json +0 -26
- package/manual/test-init-command.js +0 -223
- package/sdk-log-formatter.js +0 -930
- package/setup/aws/cloudformation.yaml +0 -470
- package/setup/aws/spawn-runner.sh +0 -190
- package/test/api-resilience.test.mjs +0 -0
- package/test/captcha-solver.test.mjs +0 -70
- package/test/chrome-remote-debugging.test.mjs +0 -66
- package/test/manual/debug-locate-response.js +0 -82
- package/test/manual/reconnect-provision.test.mjs +0 -49
- package/test/manual/test-console-logs.test.mjs +0 -42
- package/test/manual/test-find-api.js +0 -73
- package/test/manual/test-init.sh +0 -54
- package/test/manual/test-prompt-cache.js +0 -96
- package/test/manual/test-provision-auth.mjs +0 -22
- package/test/manual/test-sandbox-render.js +0 -28
- package/test/manual/test-sdk-methods.js +0 -15
- package/test/manual/test-sdk-refactor.js +0 -53
- package/test/manual/test-stack-trace.mjs +0 -57
- package/test/manual/verify-element-api.js +0 -89
- package/test/manual/verify-types.js +0 -0
- package/test/manual-unawaited-promise.test.mjs +0 -31
- package/testdriver-plugin/skills/actions/SKILL.md +0 -93
- package/testdriver-plugin/skills/assertions/SKILL.md +0 -77
- package/testdriver-plugin/skills/caching/SKILL.md +0 -66
- package/testdriver-plugin/skills/creating-tests/SKILL.md +0 -104
- package/testdriver-plugin/skills/finding-elements/SKILL.md +0 -77
- package/testdriver-plugin/skills/github-actions/SKILL.md +0 -100
- package/testdriver-plugin/skills/running-tests/SKILL.md +0 -77
- package/testdriver-plugin/skills/secrets/SKILL.md +0 -87
- package/testdriver-plugin/skills/self-hosting/SKILL.md +0 -89
- package/testdriver-plugin/skills/setup/SKILL.md +0 -76
- package/testdriver-plugin/skills/variables/SKILL.md +0 -88
- package/testdriver-plugin/skills/waiting/SKILL.md +0 -72
- package/vitest.config.mjs +0 -29
package/debugger/index.html
DELETED
|
@@ -1,797 +0,0 @@
|
|
|
1
|
-
<!doctype html>
|
|
2
|
-
<html>
|
|
3
|
-
<head>
|
|
4
|
-
<meta charset="UTF-8">
|
|
5
|
-
<link rel="preconnect" href="https://fonts.googleapis.com" />
|
|
6
|
-
<link rel="preconnect" href="https://fonts.gstatic.com" crossorigin />
|
|
7
|
-
<link
|
|
8
|
-
href="https://fonts.googleapis.com/css2?family=IBM+Plex+Mono:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;1,100;1,200;1,300;1,400;1,500;1,600;1,700&display=swap"
|
|
9
|
-
rel="stylesheet"
|
|
10
|
-
/>
|
|
11
|
-
<link rel="icon" type="image/png" href="icon.png" />
|
|
12
|
-
<title>TestDriver - Debugger</title>
|
|
13
|
-
<style>
|
|
14
|
-
body {
|
|
15
|
-
background-color: #111;
|
|
16
|
-
background-image: url("bg.png");
|
|
17
|
-
background-repeat: repeat;
|
|
18
|
-
background-size: auto;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
* {
|
|
22
|
-
margin: 0;
|
|
23
|
-
padding: 0;
|
|
24
|
-
box-sizing: border-box;
|
|
25
|
-
font-family: "IBM Plex Mono", monospace;
|
|
26
|
-
font-weight: 400;
|
|
27
|
-
font-style: normal;
|
|
28
|
-
font-size: 14px;
|
|
29
|
-
scrollbar-width: none; /* Hide scrollbars for Firefox */
|
|
30
|
-
pointer-events: none;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
#overlay {
|
|
34
|
-
position: absolute;
|
|
35
|
-
top: 0;
|
|
36
|
-
left: 0;
|
|
37
|
-
transform-origin: top left;
|
|
38
|
-
overflow: hidden;
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
html,
|
|
42
|
-
body {
|
|
43
|
-
overflow: hidden;
|
|
44
|
-
width: 100%;
|
|
45
|
-
height: 100%;
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
*::-webkit-scrollbar {
|
|
49
|
-
display: none; /* Hide scrollbars for WebKit browsers */
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
@keyframes animate-glow {
|
|
53
|
-
0% {
|
|
54
|
-
opacity: 0;
|
|
55
|
-
filter: brightness(3) saturate(3);
|
|
56
|
-
transform: scale(0.8, 0.8);
|
|
57
|
-
}
|
|
58
|
-
|
|
59
|
-
30% {
|
|
60
|
-
opacity: 1;
|
|
61
|
-
filter: brightness(1) saturate(1);
|
|
62
|
-
transform: scale(1, 1);
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
100% {
|
|
66
|
-
/* opacity: 0; */
|
|
67
|
-
opacity: 1;
|
|
68
|
-
transform: scale(1, 1);
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
|
|
72
|
-
.overlay {
|
|
73
|
-
position: relative;
|
|
74
|
-
overflow: hidden;
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
.screenshot {
|
|
78
|
-
position: absolute;
|
|
79
|
-
inset: 0;
|
|
80
|
-
z-index: 1;
|
|
81
|
-
opacity: 0;
|
|
82
|
-
}
|
|
83
|
-
|
|
84
|
-
.box {
|
|
85
|
-
border: 1px solid #b0cf34;
|
|
86
|
-
position: absolute;
|
|
87
|
-
border-radius: 5px;
|
|
88
|
-
animation-duration: 5s;
|
|
89
|
-
animation-delay: 0s;
|
|
90
|
-
animation-timing-function: cubic-bezier(0.26, 0.53, 0.74, 1.48);
|
|
91
|
-
animation-fill-mode: backwards;
|
|
92
|
-
animation-name: animate-glow;
|
|
93
|
-
animation-timing-function: ease;
|
|
94
|
-
animation-fill-mode: forwards;
|
|
95
|
-
border-radius: 5px;
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
.effects {
|
|
99
|
-
inset: 0;
|
|
100
|
-
position: absolute;
|
|
101
|
-
z-index: 20;
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
#mouse {
|
|
105
|
-
margin-left: -100px;
|
|
106
|
-
margin-top: -100px;
|
|
107
|
-
width: 50px;
|
|
108
|
-
height: 50px;
|
|
109
|
-
opacity: 0;
|
|
110
|
-
position: absolute;
|
|
111
|
-
transform: translate(-50%, -50%);
|
|
112
|
-
border-radius: 70%;
|
|
113
|
-
background: #b0cf34;
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
#mouse #dot {
|
|
117
|
-
width: 7px;
|
|
118
|
-
height: 7px;
|
|
119
|
-
position: absolute;
|
|
120
|
-
top: 50%;
|
|
121
|
-
left: 50%;
|
|
122
|
-
transform: translate(-50%, -50%);
|
|
123
|
-
border-radius: 50%;
|
|
124
|
-
background-color: black;
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
.single-click {
|
|
128
|
-
animation: singleClick 0.7s ease-in-out forwards;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
.double-click {
|
|
132
|
-
animation: doubleClick 0.7s ease-in-out forwards;
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
@keyframes singleClick {
|
|
136
|
-
0% {
|
|
137
|
-
opacity: 1;
|
|
138
|
-
transform: translate(-50%, -50%) scale(1);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
100% {
|
|
142
|
-
opacity: 0;
|
|
143
|
-
transform: translate(-50%, -50%) scale(2);
|
|
144
|
-
}
|
|
145
|
-
}
|
|
146
|
-
|
|
147
|
-
@keyframes doubleClick {
|
|
148
|
-
0% {
|
|
149
|
-
opacity: 1;
|
|
150
|
-
transform: translate(-50%, -50%) scale(1);
|
|
151
|
-
}
|
|
152
|
-
|
|
153
|
-
45% {
|
|
154
|
-
opacity: 0;
|
|
155
|
-
transform: translate(-50%, -50%) scale(1.2);
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
55% {
|
|
159
|
-
opacity: 1;
|
|
160
|
-
transform: translate(-50%, -50%) scale(1);
|
|
161
|
-
}
|
|
162
|
-
|
|
163
|
-
100% {
|
|
164
|
-
opacity: 0;
|
|
165
|
-
transform: scale(2);
|
|
166
|
-
}
|
|
167
|
-
}
|
|
168
|
-
|
|
169
|
-
#boxes {
|
|
170
|
-
position: absolute;
|
|
171
|
-
top: 25px;
|
|
172
|
-
left: 0;
|
|
173
|
-
right: 0;
|
|
174
|
-
bottom: 0;
|
|
175
|
-
z-index: 2;
|
|
176
|
-
}
|
|
177
|
-
|
|
178
|
-
#vm-iframe {
|
|
179
|
-
display: none;
|
|
180
|
-
border: none;
|
|
181
|
-
pointer-events: auto;
|
|
182
|
-
position: absolute;
|
|
183
|
-
top: 0px;
|
|
184
|
-
left: 0px;
|
|
185
|
-
width: 100%;
|
|
186
|
-
height: 100%;
|
|
187
|
-
z-index: 1;
|
|
188
|
-
overflow: hidden;
|
|
189
|
-
}
|
|
190
|
-
|
|
191
|
-
/* Loading screen styles */
|
|
192
|
-
.loading-screen {
|
|
193
|
-
position: absolute;
|
|
194
|
-
top: 0;
|
|
195
|
-
left: 0;
|
|
196
|
-
width: 100%;
|
|
197
|
-
height: 100%;
|
|
198
|
-
background-color: black;
|
|
199
|
-
display: flex;
|
|
200
|
-
flex-direction: column;
|
|
201
|
-
align-items: center;
|
|
202
|
-
justify-content: center;
|
|
203
|
-
z-index: 10;
|
|
204
|
-
transition: opacity 0.5s ease-out;
|
|
205
|
-
}
|
|
206
|
-
|
|
207
|
-
.loading-screen.hidden {
|
|
208
|
-
opacity: 0;
|
|
209
|
-
pointer-events: none;
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
.loading-text {
|
|
213
|
-
color: #b0cf34;
|
|
214
|
-
font-size: 18px;
|
|
215
|
-
font-weight: 500;
|
|
216
|
-
margin-top: 10px;
|
|
217
|
-
animation: fadeInOut 1.5s infinite;
|
|
218
|
-
}
|
|
219
|
-
|
|
220
|
-
@keyframes pulse {
|
|
221
|
-
0% {
|
|
222
|
-
transform: scale(1);
|
|
223
|
-
box-shadow: 0 8px 32px rgba(176, 207, 52, 0.3);
|
|
224
|
-
}
|
|
225
|
-
50% {
|
|
226
|
-
transform: scale(1.05);
|
|
227
|
-
box-shadow: 0 12px 48px rgba(176, 207, 52, 0.5);
|
|
228
|
-
}
|
|
229
|
-
100% {
|
|
230
|
-
transform: scale(1);
|
|
231
|
-
box-shadow: 0 8px 32px rgba(176, 207, 52, 0.3);
|
|
232
|
-
}
|
|
233
|
-
}
|
|
234
|
-
|
|
235
|
-
@keyframes fadeInOut {
|
|
236
|
-
0%,
|
|
237
|
-
100% {
|
|
238
|
-
opacity: 0.6;
|
|
239
|
-
}
|
|
240
|
-
50% {
|
|
241
|
-
opacity: 1;
|
|
242
|
-
}
|
|
243
|
-
}
|
|
244
|
-
|
|
245
|
-
.status {
|
|
246
|
-
position: absolute;
|
|
247
|
-
top: 20px;
|
|
248
|
-
left: 20px;
|
|
249
|
-
background: rgba(0, 0, 0, 0.8);
|
|
250
|
-
color: #b0cf34;
|
|
251
|
-
padding: 8px 12px;
|
|
252
|
-
border-radius: 4px;
|
|
253
|
-
font-size: 12px;
|
|
254
|
-
z-index: 11;
|
|
255
|
-
opacity: 0;
|
|
256
|
-
transition: opacity 0.3s ease;
|
|
257
|
-
pointer-events: none;
|
|
258
|
-
}
|
|
259
|
-
|
|
260
|
-
.status.visible {
|
|
261
|
-
opacity: 1;
|
|
262
|
-
}
|
|
263
|
-
|
|
264
|
-
.bounding-box {
|
|
265
|
-
position: absolute;
|
|
266
|
-
border: 2px solid #b0cf34;
|
|
267
|
-
background: rgba(176, 207, 52, 0.1);
|
|
268
|
-
pointer-events: none;
|
|
269
|
-
z-index: 9;
|
|
270
|
-
border-radius: 3px;
|
|
271
|
-
animation: animate-glow 0.6s ease-out;
|
|
272
|
-
}
|
|
273
|
-
|
|
274
|
-
.interaction-overlay {
|
|
275
|
-
position: absolute;
|
|
276
|
-
top: 0;
|
|
277
|
-
left: 0;
|
|
278
|
-
width: 100%;
|
|
279
|
-
height: 100%;
|
|
280
|
-
background: rgba(0, 0, 0, 0.5);
|
|
281
|
-
display: flex;
|
|
282
|
-
flex-direction: column;
|
|
283
|
-
align-items: center;
|
|
284
|
-
justify-content: center;
|
|
285
|
-
z-index: 12;
|
|
286
|
-
opacity: 0;
|
|
287
|
-
pointer-events: none;
|
|
288
|
-
transition: opacity 0.3s ease;
|
|
289
|
-
cursor: pointer;
|
|
290
|
-
color: white;
|
|
291
|
-
font-size: 16px;
|
|
292
|
-
font-weight: 500;
|
|
293
|
-
}
|
|
294
|
-
|
|
295
|
-
.interaction-overlay.visible {
|
|
296
|
-
opacity: 1;
|
|
297
|
-
pointer-events: auto;
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
.interaction-overlay .lock-icon {
|
|
301
|
-
width: 48px;
|
|
302
|
-
height: 48px;
|
|
303
|
-
margin-bottom: 12px;
|
|
304
|
-
fill: white;
|
|
305
|
-
}
|
|
306
|
-
|
|
307
|
-
.interaction-overlay .message {
|
|
308
|
-
text-align: center;
|
|
309
|
-
user-select: none;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
.close-button {
|
|
313
|
-
position: fixed;
|
|
314
|
-
top: 12px;
|
|
315
|
-
right: 12px;
|
|
316
|
-
z-index: 100;
|
|
317
|
-
background: rgba(0, 0, 0, 0.8);
|
|
318
|
-
border: 1px solid #444;
|
|
319
|
-
color: #fff;
|
|
320
|
-
padding: 8px 16px;
|
|
321
|
-
border-radius: 6px;
|
|
322
|
-
cursor: pointer;
|
|
323
|
-
font-size: 13px;
|
|
324
|
-
font-weight: 500;
|
|
325
|
-
pointer-events: auto;
|
|
326
|
-
transition: all 0.2s ease;
|
|
327
|
-
display: flex;
|
|
328
|
-
align-items: center;
|
|
329
|
-
gap: 6px;
|
|
330
|
-
}
|
|
331
|
-
|
|
332
|
-
.close-button:hover {
|
|
333
|
-
background: rgba(220, 53, 69, 0.9);
|
|
334
|
-
border-color: #dc3545;
|
|
335
|
-
}
|
|
336
|
-
|
|
337
|
-
.close-button svg {
|
|
338
|
-
width: 14px;
|
|
339
|
-
height: 14px;
|
|
340
|
-
fill: currentColor;
|
|
341
|
-
}
|
|
342
|
-
</style>
|
|
343
|
-
</head>
|
|
344
|
-
<body>
|
|
345
|
-
<!-- Close window button -->
|
|
346
|
-
<button class="close-button" onclick="window.close()" title="Close this window">
|
|
347
|
-
<svg viewBox="0 0 24 24"><path d="M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"/></svg>
|
|
348
|
-
Close
|
|
349
|
-
</button>
|
|
350
|
-
|
|
351
|
-
<!-- Loading screen -->
|
|
352
|
-
<div class="loading-screen" id="loading-screen">
|
|
353
|
-
<div class="testdriver-logo">
|
|
354
|
-
<img
|
|
355
|
-
src="https://framerusercontent.com/images/eMQDjLmOzfeu91XBo1VPlIc1WmY.png"
|
|
356
|
-
height="120"
|
|
357
|
-
alt="TestDriver Logo"
|
|
358
|
-
/>
|
|
359
|
-
</div>
|
|
360
|
-
<div class="loading-text">Loading...</div>
|
|
361
|
-
</div>
|
|
362
|
-
|
|
363
|
-
<div class="overlay" id="overlay">
|
|
364
|
-
<div class="effects" id="effects">
|
|
365
|
-
<div class="mouse" id="mouse"></div>
|
|
366
|
-
<div class="screenshot" id="screenshot"></div>
|
|
367
|
-
<div class="status" id="status"></div>
|
|
368
|
-
<div class="interaction-overlay" id="interaction-overlay">
|
|
369
|
-
<svg class="lock-icon" viewBox="0 0 24 24">
|
|
370
|
-
<path
|
|
371
|
-
d="M18,8h-1V6c0-2.76-2.24-5-5-5S7,3.24,7,6v2H6c-1.1,0-2,0.9-2,2v10c0,1.1,0.9,2,2,2h12c1.1,0,2-0.9,2-2V10C20,8.9,19.1,8,18,8z M12,17c-1.1,0-2-0.9-2-2s0.9-2,2-2s2,0.9,2,2S13.1,17,12,17z M15.1,8H8.9V6c0-1.71,1.39-3.1,3.1-3.1s3.1,1.39,3.1,3.1V8z"
|
|
372
|
-
/>
|
|
373
|
-
</svg>
|
|
374
|
-
<div class="message">Click to interact with VM</div>
|
|
375
|
-
</div>
|
|
376
|
-
</div>
|
|
377
|
-
<iframe id="vm-iframe" src="" credentialless></iframe>
|
|
378
|
-
</div>
|
|
379
|
-
|
|
380
|
-
<script>
|
|
381
|
-
// get data from URL parameters
|
|
382
|
-
const urlParams = new URLSearchParams(window.location.search);
|
|
383
|
-
const data = urlParams.get("data");
|
|
384
|
-
let parsedData;
|
|
385
|
-
if (data) {
|
|
386
|
-
try {
|
|
387
|
-
parsedData = JSON.parse(atob(data));
|
|
388
|
-
console.log("Data from URL:", parsedData);
|
|
389
|
-
// You can use parsedData here if needed
|
|
390
|
-
} catch (error) {
|
|
391
|
-
console.error("Error parsing data from URL:", error);
|
|
392
|
-
}
|
|
393
|
-
} else {
|
|
394
|
-
alert(
|
|
395
|
-
"Improperly formatted URL. Please ensure the data parameter is present.",
|
|
396
|
-
);
|
|
397
|
-
}
|
|
398
|
-
|
|
399
|
-
const iframe = document.querySelector("#vm-iframe");
|
|
400
|
-
|
|
401
|
-
// Detect if OS is Linux
|
|
402
|
-
const isLinux = parsedData.os === "linux";
|
|
403
|
-
const topBarOffset = isLinux ? 14 : 0;
|
|
404
|
-
|
|
405
|
-
// set overlay width and height to match the given resolution
|
|
406
|
-
const overlayWidth = parsedData.resolution[0];
|
|
407
|
-
const overlayHeight = parsedData.resolution[1];
|
|
408
|
-
|
|
409
|
-
iframe.style.display = "block";
|
|
410
|
-
iframe.src = parsedData.url;
|
|
411
|
-
iframe.style.width = overlayWidth + "px";
|
|
412
|
-
// Increase iframe height by 14px for Linux to account for top bar
|
|
413
|
-
iframe.style.height = overlayHeight + topBarOffset + "px";
|
|
414
|
-
|
|
415
|
-
// Calculate scale factor to fit within window if needed
|
|
416
|
-
const windowWidth = window.innerWidth;
|
|
417
|
-
const windowHeight = window.innerHeight;
|
|
418
|
-
const padding = 20; // Add some padding to prevent cropping
|
|
419
|
-
const scaleX = (windowWidth - padding * 2) / overlayWidth;
|
|
420
|
-
const scaleY = (windowHeight - padding * 2) / overlayHeight;
|
|
421
|
-
const scale = Math.min(scaleX, scaleY, 1); // Don't scale up, only down
|
|
422
|
-
|
|
423
|
-
console.log("window:", {
|
|
424
|
-
width: windowWidth,
|
|
425
|
-
height: windowHeight,
|
|
426
|
-
});
|
|
427
|
-
console.log("overlay:", {
|
|
428
|
-
width: overlayWidth,
|
|
429
|
-
height: overlayHeight,
|
|
430
|
-
});
|
|
431
|
-
|
|
432
|
-
const overlay = document.getElementById("overlay");
|
|
433
|
-
overlay.style.width = overlayWidth + "px";
|
|
434
|
-
overlay.style.height = overlayHeight + "px";
|
|
435
|
-
|
|
436
|
-
console.log("scale", scale);
|
|
437
|
-
// Apply scaling if needed
|
|
438
|
-
if (scale < 1) {
|
|
439
|
-
overlay.style.transform = `scale(${scale})`;
|
|
440
|
-
}
|
|
441
|
-
|
|
442
|
-
// WebSocket connection
|
|
443
|
-
const protocol = window.location.protocol === "https:" ? "wss:" : "ws:";
|
|
444
|
-
const ws = new WebSocket(`${protocol}//${window.location.host}`);
|
|
445
|
-
|
|
446
|
-
// WebSocket event handlers
|
|
447
|
-
const eventHandlers = new Map();
|
|
448
|
-
|
|
449
|
-
const addEventHandler = (event, callback) => {
|
|
450
|
-
if (!eventHandlers.has(event)) {
|
|
451
|
-
eventHandlers.set(event, []);
|
|
452
|
-
}
|
|
453
|
-
eventHandlers.get(event).push(callback);
|
|
454
|
-
};
|
|
455
|
-
|
|
456
|
-
// Activity tracking for title updates
|
|
457
|
-
let idleTimeout = null;
|
|
458
|
-
const IDLE_THRESHOLD = 5000; // 5 seconds
|
|
459
|
-
|
|
460
|
-
// Get test file name for title (use just filename, not full path)
|
|
461
|
-
const testFileName = parsedData?.testFile
|
|
462
|
-
? parsedData.testFile.split('/').pop().split('\\\\').pop()
|
|
463
|
-
: 'TestDriver';
|
|
464
|
-
|
|
465
|
-
const setTitle = (status) => {
|
|
466
|
-
document.title = `[${status}] ${testFileName}`;
|
|
467
|
-
};
|
|
468
|
-
|
|
469
|
-
const resetIdleTimer = () => {
|
|
470
|
-
setTitle("Running");
|
|
471
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
472
|
-
idleTimeout = setTimeout(() => {
|
|
473
|
-
setTitle("Idle");
|
|
474
|
-
}, IDLE_THRESHOLD);
|
|
475
|
-
};
|
|
476
|
-
|
|
477
|
-
ws.addEventListener("message", (message) => {
|
|
478
|
-
resetIdleTimer();
|
|
479
|
-
try {
|
|
480
|
-
const data = JSON.parse(message.data);
|
|
481
|
-
console.log("WebSocket message received:", data);
|
|
482
|
-
const handlers = eventHandlers.get(data.event);
|
|
483
|
-
if (handlers) {
|
|
484
|
-
handlers.forEach((callback) => callback(null, data.data));
|
|
485
|
-
}
|
|
486
|
-
} catch (error) {
|
|
487
|
-
console.error("Error parsing WebSocket message:", error);
|
|
488
|
-
}
|
|
489
|
-
});
|
|
490
|
-
|
|
491
|
-
ws.addEventListener("open", () => {
|
|
492
|
-
console.log("WebSocket connected to TestDriver.ai overlay");
|
|
493
|
-
|
|
494
|
-
// Hide loading screen
|
|
495
|
-
const loadingScreen = document.getElementById("loading-screen");
|
|
496
|
-
loadingScreen.classList.add("hidden");
|
|
497
|
-
|
|
498
|
-
// Show connection status briefly
|
|
499
|
-
document.getElementById("status").textContent = "Connected";
|
|
500
|
-
document.getElementById("status").classList.add("visible");
|
|
501
|
-
setTimeout(() => {
|
|
502
|
-
document.getElementById("status").classList.remove("visible");
|
|
503
|
-
}, 2000);
|
|
504
|
-
});
|
|
505
|
-
|
|
506
|
-
ws.addEventListener("error", (error) => {
|
|
507
|
-
console.error("WebSocket error:", error);
|
|
508
|
-
document.getElementById("status").textContent = "Connection Error";
|
|
509
|
-
document.getElementById("status").classList.add("visible");
|
|
510
|
-
});
|
|
511
|
-
|
|
512
|
-
ws.addEventListener("close", () => {
|
|
513
|
-
console.log("WebSocket disconnected");
|
|
514
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
515
|
-
setTitle("Done");
|
|
516
|
-
document.getElementById("status").textContent = "Disconnected";
|
|
517
|
-
document.getElementById("status").classList.add("visible");
|
|
518
|
-
});
|
|
519
|
-
|
|
520
|
-
// Event handling (same as original)
|
|
521
|
-
const events = {
|
|
522
|
-
mouseClick: "mouse-click",
|
|
523
|
-
mouseMove: "mouse-move",
|
|
524
|
-
screenCapture: {
|
|
525
|
-
start: "screen-capture:start",
|
|
526
|
-
end: "screen-capture:end",
|
|
527
|
-
error: "screen-capture:error",
|
|
528
|
-
},
|
|
529
|
-
interactive: "interactive",
|
|
530
|
-
terminal: {
|
|
531
|
-
stdout: "terminal:stdout",
|
|
532
|
-
stderr: "terminal:stderr",
|
|
533
|
-
},
|
|
534
|
-
matches: {
|
|
535
|
-
show: "matches:show",
|
|
536
|
-
},
|
|
537
|
-
vm: {
|
|
538
|
-
show: "vm:show",
|
|
539
|
-
},
|
|
540
|
-
test: {
|
|
541
|
-
start: "test:start",
|
|
542
|
-
stop: "test:stop",
|
|
543
|
-
success: "test:success",
|
|
544
|
-
error: "test:error",
|
|
545
|
-
},
|
|
546
|
-
error: {
|
|
547
|
-
fatal: "error:fatal",
|
|
548
|
-
general: "error:general",
|
|
549
|
-
sdk: "error:sdk",
|
|
550
|
-
},
|
|
551
|
-
};
|
|
552
|
-
|
|
553
|
-
// Title state handlers for immediate feedback
|
|
554
|
-
addEventHandler(events.test.start, () => {
|
|
555
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
556
|
-
setTitle("Running");
|
|
557
|
-
});
|
|
558
|
-
|
|
559
|
-
addEventHandler(events.test.stop, () => {
|
|
560
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
561
|
-
setTitle("Stopped");
|
|
562
|
-
});
|
|
563
|
-
|
|
564
|
-
addEventHandler(events.test.success, () => {
|
|
565
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
566
|
-
setTitle("Passed");
|
|
567
|
-
});
|
|
568
|
-
|
|
569
|
-
addEventHandler(events.test.error, () => {
|
|
570
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
571
|
-
setTitle("Failed");
|
|
572
|
-
});
|
|
573
|
-
|
|
574
|
-
addEventHandler(events.error.fatal, () => {
|
|
575
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
576
|
-
setTitle("Error");
|
|
577
|
-
});
|
|
578
|
-
|
|
579
|
-
addEventHandler(events.error.sdk, () => {
|
|
580
|
-
if (idleTimeout) clearTimeout(idleTimeout);
|
|
581
|
-
setTitle("Error");
|
|
582
|
-
});
|
|
583
|
-
|
|
584
|
-
const effects = document.getElementById("effects");
|
|
585
|
-
const mouse = document.getElementById("mouse");
|
|
586
|
-
const screenshotElement = document.getElementById("screenshot");
|
|
587
|
-
const interactionOverlay = document.getElementById("interaction-overlay");
|
|
588
|
-
|
|
589
|
-
let boundingBoxesTimeout;
|
|
590
|
-
let interactionTimeout;
|
|
591
|
-
let isInteractionEnabled = false;
|
|
592
|
-
|
|
593
|
-
// Show interaction overlay on hover, hide on click, and bring back after 30 seconds
|
|
594
|
-
const showInteractionOverlay = () => {
|
|
595
|
-
if (!isInteractionEnabled) {
|
|
596
|
-
interactionOverlay.classList.add("visible");
|
|
597
|
-
}
|
|
598
|
-
};
|
|
599
|
-
|
|
600
|
-
const hideInteractionOverlay = () => {
|
|
601
|
-
interactionOverlay.classList.remove("visible");
|
|
602
|
-
isInteractionEnabled = true;
|
|
603
|
-
|
|
604
|
-
// Clear any existing timeout
|
|
605
|
-
if (interactionTimeout) {
|
|
606
|
-
clearTimeout(interactionTimeout);
|
|
607
|
-
}
|
|
608
|
-
};
|
|
609
|
-
|
|
610
|
-
// Event listeners for interaction overlay
|
|
611
|
-
overlay.addEventListener("mouseenter", showInteractionOverlay);
|
|
612
|
-
overlay.addEventListener("mouseleave", () => {
|
|
613
|
-
if (!isInteractionEnabled) {
|
|
614
|
-
interactionOverlay.classList.remove("visible");
|
|
615
|
-
}
|
|
616
|
-
});
|
|
617
|
-
|
|
618
|
-
interactionOverlay.addEventListener("click", hideInteractionOverlay);
|
|
619
|
-
|
|
620
|
-
const drawBoxes = (boxes) => {
|
|
621
|
-
// Remove existing boxes
|
|
622
|
-
document.querySelectorAll(".bounding-box").forEach((box) => {
|
|
623
|
-
box.remove();
|
|
624
|
-
});
|
|
625
|
-
|
|
626
|
-
// Add new boxes
|
|
627
|
-
boxes.forEach((box) => {
|
|
628
|
-
const boxElement = document.createElement("div");
|
|
629
|
-
boxElement.className = "bounding-box";
|
|
630
|
-
boxElement.style.left = toCss(box.x);
|
|
631
|
-
boxElement.style.top = toCss(box.y + topBarOffset);
|
|
632
|
-
boxElement.style.width = toCss(box.width);
|
|
633
|
-
boxElement.style.height = toCss(box.height);
|
|
634
|
-
effects.appendChild(boxElement);
|
|
635
|
-
});
|
|
636
|
-
};
|
|
637
|
-
// Screen capture event handlers
|
|
638
|
-
addEventHandler(events.screenCapture.start, (event, data) => {
|
|
639
|
-
if (data?.silent) return;
|
|
640
|
-
screenshotElement.style.opacity = 0;
|
|
641
|
-
});
|
|
642
|
-
|
|
643
|
-
addEventHandler(events.screenCapture.error, (event, data) => {
|
|
644
|
-
if (data?.silent) return;
|
|
645
|
-
screenshotElement.style.opacity = 1;
|
|
646
|
-
});
|
|
647
|
-
|
|
648
|
-
addEventHandler(events.screenCapture.end, (event, data) => {
|
|
649
|
-
if (data?.silent) return;
|
|
650
|
-
screenshotElement.classList.remove("screenshot");
|
|
651
|
-
// Force reflow
|
|
652
|
-
void screenshotElement.offsetWidth;
|
|
653
|
-
screenshotElement.classList.add("screenshot");
|
|
654
|
-
});
|
|
655
|
-
|
|
656
|
-
// Mouse event handlers
|
|
657
|
-
addEventHandler(events.mouseMove, (event, { x, y } = {}) => {
|
|
658
|
-
mouse.style.marginLeft = toCss(x);
|
|
659
|
-
mouse.style.marginTop = toCss(y + topBarOffset);
|
|
660
|
-
});
|
|
661
|
-
|
|
662
|
-
addEventHandler(
|
|
663
|
-
events.mouseClick,
|
|
664
|
-
(event, { x, y, click = "single" } = {}) => {
|
|
665
|
-
mouse.style.marginLeft = toCss(x);
|
|
666
|
-
mouse.style.marginTop = toCss(y + topBarOffset);
|
|
667
|
-
// Reset class so animation can restart
|
|
668
|
-
mouse.setAttribute("class", "mouse");
|
|
669
|
-
// Force reflow
|
|
670
|
-
void mouse.offsetWidth;
|
|
671
|
-
mouse.classList.add(`${click}-click`);
|
|
672
|
-
},
|
|
673
|
-
);
|
|
674
|
-
|
|
675
|
-
// Matches and VM event handlers
|
|
676
|
-
addEventHandler(events.matches.show, (event, closeMatches = []) => {
|
|
677
|
-
if (boundingBoxesTimeout) clearTimeout(boundingBoxesTimeout);
|
|
678
|
-
drawBoxes(closeMatches);
|
|
679
|
-
boundingBoxesTimeout = setTimeout(() => drawBoxes([]), 10000);
|
|
680
|
-
});
|
|
681
|
-
|
|
682
|
-
addEventHandler(events.terminal.stdout, (event, data) => {
|
|
683
|
-
console.log("Terminal stdout:", data);
|
|
684
|
-
// Could be used to display terminal output in UI
|
|
685
|
-
});
|
|
686
|
-
|
|
687
|
-
addEventHandler(events.terminal.stderr, (event, data) => {
|
|
688
|
-
console.log("Terminal stderr:", data);
|
|
689
|
-
// Could be used to display terminal errors in UI
|
|
690
|
-
});
|
|
691
|
-
|
|
692
|
-
const toCss = (size) => {
|
|
693
|
-
if (typeof size === "number") {
|
|
694
|
-
return `${size}px`;
|
|
695
|
-
}
|
|
696
|
-
return size;
|
|
697
|
-
};
|
|
698
|
-
|
|
699
|
-
// Throttle function to limit how often a function can run
|
|
700
|
-
function throttle(fn, wait) {
|
|
701
|
-
let lastTime = 0;
|
|
702
|
-
return function (...args) {
|
|
703
|
-
const now = Date.now();
|
|
704
|
-
if (now - lastTime >= wait) {
|
|
705
|
-
lastTime = now;
|
|
706
|
-
fn.apply(this, args);
|
|
707
|
-
}
|
|
708
|
-
};
|
|
709
|
-
}
|
|
710
|
-
|
|
711
|
-
const resizeOverlay = () => {
|
|
712
|
-
if (parsedData && parsedData.resolution) {
|
|
713
|
-
const overlayWidth = parsedData.resolution[0];
|
|
714
|
-
const overlayHeight = parsedData.resolution[1];
|
|
715
|
-
const windowWidth = window.innerWidth;
|
|
716
|
-
const windowHeight = window.innerHeight;
|
|
717
|
-
const scaleX = windowWidth / overlayWidth;
|
|
718
|
-
const scaleY = windowHeight / overlayHeight;
|
|
719
|
-
const scale = Math.min(scaleX, scaleY);
|
|
720
|
-
|
|
721
|
-
console.log("scale", scale);
|
|
722
|
-
|
|
723
|
-
console.log(
|
|
724
|
-
"resolution:",
|
|
725
|
-
JSON.stringify({
|
|
726
|
-
width: overlayWidth,
|
|
727
|
-
height: overlayHeight,
|
|
728
|
-
}),
|
|
729
|
-
);
|
|
730
|
-
|
|
731
|
-
console.log(
|
|
732
|
-
"window:",
|
|
733
|
-
JSON.stringify({
|
|
734
|
-
width: windowWidth,
|
|
735
|
-
height: windowHeight,
|
|
736
|
-
}),
|
|
737
|
-
);
|
|
738
|
-
const overlay = document.getElementById("overlay");
|
|
739
|
-
if (scale < 1) {
|
|
740
|
-
overlay.style.transform = `scale(${scale})`;
|
|
741
|
-
} else {
|
|
742
|
-
overlay.style.transform = "none";
|
|
743
|
-
}
|
|
744
|
-
|
|
745
|
-
// get the new width and height after scaling
|
|
746
|
-
const scaledWidth = overlayWidth * scale;
|
|
747
|
-
const scaledHeight = overlayHeight * scale;
|
|
748
|
-
|
|
749
|
-
console.log("scaledWidth", JSON.stringify(scaledWidth));
|
|
750
|
-
console.log("scaledHeight", JSON.stringify(scaledHeight));
|
|
751
|
-
|
|
752
|
-
// use the scaled width and height to center the overlay
|
|
753
|
-
overlay.style.position = "absolute";
|
|
754
|
-
if (scale < 1) {
|
|
755
|
-
// When scaling down, use the original dimensions and let CSS transform handle the scaling
|
|
756
|
-
overlay.style.width = `${overlayWidth}px`;
|
|
757
|
-
overlay.style.height = `${overlayHeight}px`;
|
|
758
|
-
overlay.style.left = `${(windowWidth - scaledWidth) / 2}px`;
|
|
759
|
-
overlay.style.top = `${(windowHeight - scaledHeight) / 2}px`;
|
|
760
|
-
} else {
|
|
761
|
-
// When no scaling is needed, just center the overlay at its original size
|
|
762
|
-
overlay.style.width = `${overlayWidth}px`;
|
|
763
|
-
overlay.style.height = `${overlayHeight}px`;
|
|
764
|
-
overlay.style.left = `${(windowWidth - overlayWidth) / 2}px`;
|
|
765
|
-
overlay.style.top = `${(windowHeight - overlayHeight) / 2}px`;
|
|
766
|
-
}
|
|
767
|
-
|
|
768
|
-
console.log(
|
|
769
|
-
"left,top",
|
|
770
|
-
JSON.stringify({
|
|
771
|
-
left:
|
|
772
|
-
scale < 1
|
|
773
|
-
? (windowWidth - scaledWidth) / 2
|
|
774
|
-
: (windowWidth - overlayWidth) / 2,
|
|
775
|
-
top:
|
|
776
|
-
scale < 1
|
|
777
|
-
? (windowHeight - scaledHeight) / 2
|
|
778
|
-
: (windowHeight - overlayHeight) / 2,
|
|
779
|
-
}),
|
|
780
|
-
);
|
|
781
|
-
}
|
|
782
|
-
};
|
|
783
|
-
resizeOverlay();
|
|
784
|
-
|
|
785
|
-
// Handle window resize to recalculate scale (throttled)
|
|
786
|
-
window.addEventListener("resize", throttle(resizeOverlay, 100));
|
|
787
|
-
|
|
788
|
-
setInterval(resizeOverlay, 1000);
|
|
789
|
-
|
|
790
|
-
// Handle window blur/focus for screen locking
|
|
791
|
-
window.addEventListener("blur", () => {
|
|
792
|
-
showInteractionOverlay();
|
|
793
|
-
isInteractionEnabled = false;
|
|
794
|
-
});
|
|
795
|
-
</script>
|
|
796
|
-
</body>
|
|
797
|
-
</html>
|