testdriverai 7.8.0-test.7 → 7.8.0-test.71

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 (98) hide show
  1. package/agent/index.js +18 -5
  2. package/agent/lib/commands.js +3 -2
  3. package/agent/lib/http.js +162 -0
  4. package/agent/lib/logger.js +15 -0
  5. package/agent/lib/sandbox.js +554 -209
  6. package/agent/lib/sdk.js +5 -22
  7. package/agent/lib/system.js +25 -65
  8. package/ai/skills/testdriver-cache/SKILL.md +221 -0
  9. package/ai/skills/testdriver-errors/SKILL.md +246 -0
  10. package/ai/skills/testdriver-events/SKILL.md +356 -0
  11. package/ai/skills/testdriver-find/SKILL.md +14 -20
  12. package/ai/skills/testdriver-mcp/SKILL.md +7 -0
  13. package/ai/skills/testdriver-provision/SKILL.md +331 -0
  14. package/ai/skills/testdriver-redraw/SKILL.md +214 -0
  15. package/ai/skills/testdriver-running-tests/SKILL.md +1 -1
  16. package/ai/skills/testdriver-screenshots/SKILL.md +184 -0
  17. package/docs/_data/examples-manifest.json +46 -46
  18. package/docs/_scripts/extract-example-urls.js +67 -72
  19. package/docs/changelog.mdx +148 -8
  20. package/docs/docs.json +46 -38
  21. package/docs/images/content/vscode/v7-chat.png +0 -0
  22. package/docs/images/content/vscode/v7-choose-agent.png +0 -0
  23. package/docs/images/content/vscode/v7-full.png +0 -0
  24. package/docs/images/content/vscode/v7-onboarding.png +0 -0
  25. package/docs/v7/cache.mdx +223 -0
  26. package/docs/v7/copilot/auto-healing.mdx +265 -0
  27. package/docs/v7/copilot/creating-tests.mdx +156 -0
  28. package/docs/v7/copilot/github.mdx +143 -0
  29. package/docs/v7/copilot/running-tests.mdx +149 -0
  30. package/docs/v7/copilot/setup.mdx +143 -0
  31. package/docs/v7/enterprise.mdx +3 -110
  32. package/docs/v7/errors.mdx +248 -0
  33. package/docs/v7/events.mdx +358 -0
  34. package/docs/v7/examples/ai.mdx +1 -1
  35. package/docs/v7/examples/assert.mdx +1 -1
  36. package/docs/v7/examples/captcha-api.mdx +1 -1
  37. package/docs/v7/examples/chrome-extension.mdx +1 -1
  38. package/docs/v7/examples/drag-and-drop.mdx +1 -1
  39. package/docs/v7/examples/element-not-found.mdx +1 -1
  40. package/docs/v7/examples/exec-output.mdx +85 -0
  41. package/docs/v7/examples/exec-pwsh.mdx +83 -0
  42. package/docs/v7/examples/focus-window.mdx +62 -0
  43. package/docs/v7/examples/hover-image.mdx +1 -1
  44. package/docs/v7/examples/hover-text.mdx +1 -1
  45. package/docs/v7/examples/installer.mdx +1 -1
  46. package/docs/v7/examples/launch-vscode-linux.mdx +1 -1
  47. package/docs/v7/examples/match-image.mdx +1 -1
  48. package/docs/v7/examples/press-keys.mdx +1 -1
  49. package/docs/v7/examples/scroll-keyboard.mdx +1 -1
  50. package/docs/v7/examples/scroll-until-image.mdx +1 -1
  51. package/docs/v7/examples/scroll-until-text.mdx +1 -1
  52. package/docs/v7/examples/scroll.mdx +1 -1
  53. package/docs/v7/examples/type.mdx +1 -1
  54. package/docs/v7/examples/windows-installer.mdx +1 -1
  55. package/docs/v7/find.mdx +14 -20
  56. package/docs/v7/{cloud.mdx → hosted.mdx} +43 -5
  57. package/docs/v7/mcp.mdx +9 -0
  58. package/docs/v7/provision.mdx +333 -0
  59. package/docs/v7/quickstart.mdx +30 -2
  60. package/docs/v7/redraw.mdx +216 -0
  61. package/docs/v7/running-tests.mdx +1 -1
  62. package/docs/v7/screenshots.mdx +186 -0
  63. package/docs/v7/self-hosted.mdx +127 -44
  64. package/docs/v7/test-results-json.mdx +258 -0
  65. package/examples/scroll-keyboard.test.mjs +1 -1
  66. package/examples/scroll.test.mjs +1 -12
  67. package/interfaces/logger.js +0 -12
  68. package/interfaces/vitest-plugin.mjs +170 -51
  69. package/lib/core/Dashcam.js +30 -23
  70. package/lib/environments.json +22 -0
  71. package/lib/github-comment.mjs +58 -40
  72. package/lib/init-project.js +5 -67
  73. package/lib/resolve-channel.js +42 -12
  74. package/lib/sentry.js +47 -23
  75. package/lib/vitest/hooks.mjs +63 -3
  76. package/{examples → manual}/drag-and-drop.test.mjs +1 -1
  77. package/manual/exec-stream-logs.test.mjs +25 -0
  78. package/mcp-server/dist/server.mjs +28 -8
  79. package/mcp-server/src/server.ts +31 -8
  80. package/package.json +4 -3
  81. package/sdk.d.ts +4 -0
  82. package/sdk.js +45 -15
  83. package/setup/aws/install-dev-runner.sh +79 -0
  84. package/setup/aws/spawn-runner.sh +165 -0
  85. package/test-sentry-span.js +35 -0
  86. package/vitest.config.mjs +22 -34
  87. package/vitest.runner.config.mjs +33 -0
  88. /package/{examples → manual}/flake-diffthreshold-001.test.mjs +0 -0
  89. /package/{examples → manual}/flake-diffthreshold-01.test.mjs +0 -0
  90. /package/{examples → manual}/flake-diffthreshold-05.test.mjs +0 -0
  91. /package/{examples → manual}/flake-noredraw-cache.test.mjs +0 -0
  92. /package/{examples → manual}/flake-noredraw-nocache.test.mjs +0 -0
  93. /package/{examples → manual}/flake-redraw-cache.test.mjs +0 -0
  94. /package/{examples → manual}/flake-redraw-nocache.test.mjs +0 -0
  95. /package/{examples → manual}/flake-rocket-match.test.mjs +0 -0
  96. /package/{examples → manual}/flake-shared.mjs +0 -0
  97. /package/{examples → manual}/no-provision.test.mjs +0 -0
  98. /package/{examples → manual}/scroll-until-text.test.mjs +0 -0
@@ -0,0 +1,331 @@
1
+ ---
2
+ name: testdriver:provision
3
+ description: Launch browsers, desktop apps, and extensions in your sandbox
4
+ ---
5
+ <!-- Generated from provision.mdx. DO NOT EDIT. -->
6
+
7
+ ## Overview
8
+
9
+ The Provision API sets up applications in your sandbox before tests run. It handles downloading, installing, and launching browsers, desktop apps, VS Code, Chrome extensions, and more.
10
+
11
+ Access provision methods via `testdriver.provision.*`:
12
+
13
+ ```javascript
14
+ await testdriver.provision.chrome({ url: 'https://example.com' });
15
+ ```
16
+
17
+ <Note>
18
+ When `reconnect: true` is set on the client, **all provision methods are skipped** since the application is assumed to already be running.
19
+ </Note>
20
+
21
+ ## Methods
22
+
23
+ ### chrome()
24
+
25
+ Launch Google Chrome with an optional URL.
26
+
27
+ ```javascript
28
+ await testdriver.provision.chrome(options?)
29
+ ```
30
+
31
+ <ParamField path="options" type="ProvisionChromeOptions">
32
+ <Expandable title="properties">
33
+ <ParamField path="url" type="string" default="http://testdriver-sandbox.vercel.app/">
34
+ URL to navigate to after launch.
35
+ </ParamField>
36
+
37
+ <ParamField path="maximized" type="boolean" default={true}>
38
+ Launch Chrome in maximized window mode.
39
+ </ParamField>
40
+
41
+ <ParamField path="guest" type="boolean" default={false}>
42
+ Launch Chrome in guest profile mode.
43
+ </ParamField>
44
+ </Expandable>
45
+ </ParamField>
46
+
47
+ ```javascript
48
+ // Basic
49
+ await testdriver.provision.chrome({ url: 'https://example.com' });
50
+
51
+ // With guest mode
52
+ await testdriver.provision.chrome({
53
+ url: 'https://example.com',
54
+ guest: true,
55
+ maximized: true,
56
+ });
57
+ ```
58
+
59
+ ### chromeExtension()
60
+
61
+ Install and launch a Chrome extension. You can install from a local unpacked directory or from the Chrome Web Store by extension ID.
62
+
63
+ ```javascript
64
+ await testdriver.provision.chromeExtension(options)
65
+ ```
66
+
67
+ <ParamField path="options" type="ProvisionChromeExtensionOptions" required>
68
+ One of `extensionPath` or `extensionId` is required.
69
+
70
+ <Expandable title="properties">
71
+ <ParamField path="extensionPath" type="string">
72
+ Local path to an unpacked extension directory. The extension files are uploaded to the sandbox.
73
+ </ParamField>
74
+
75
+ <ParamField path="extensionId" type="string">
76
+ Chrome Web Store extension ID to install.
77
+ </ParamField>
78
+
79
+ <ParamField path="maximized" type="boolean" default={true}>
80
+ Launch Chrome in maximized window mode.
81
+ </ParamField>
82
+ </Expandable>
83
+ </ParamField>
84
+
85
+ ```javascript
86
+ // From local directory
87
+ await testdriver.provision.chromeExtension({
88
+ extensionPath: './my-extension',
89
+ });
90
+
91
+ // From Chrome Web Store
92
+ await testdriver.provision.chromeExtension({
93
+ extensionId: 'abcdefghijklmnop',
94
+ });
95
+ ```
96
+
97
+ ### vscode()
98
+
99
+ Launch Visual Studio Code with an optional workspace and extensions.
100
+
101
+ ```javascript
102
+ await testdriver.provision.vscode(options?)
103
+ ```
104
+
105
+ <ParamField path="options" type="ProvisionVSCodeOptions">
106
+ <Expandable title="properties">
107
+ <ParamField path="workspace" type="string">
108
+ Path to a workspace folder or `.code-workspace` file to open.
109
+ </ParamField>
110
+
111
+ <ParamField path="extensions" type="string[]" default={[]}>
112
+ Array of VS Code extension IDs to install before launching.
113
+ </ParamField>
114
+ </Expandable>
115
+ </ParamField>
116
+
117
+ ```javascript
118
+ await testdriver.provision.vscode({
119
+ workspace: '/home/testdriver/project',
120
+ extensions: ['ms-python.python', 'esbenp.prettier-vscode'],
121
+ });
122
+ ```
123
+
124
+ ### installer()
125
+
126
+ Download and run an application installer. Supports `.msi`, `.exe`, `.deb`, `.rpm`, `.appimage`, `.sh`, `.dmg`, and `.pkg` formats.
127
+
128
+ ```javascript
129
+ await testdriver.provision.installer(options)
130
+ ```
131
+
132
+ <ParamField path="options" type="ProvisionInstallerOptions" required>
133
+ <Expandable title="properties">
134
+ <ParamField path="url" type="string" required>
135
+ Download URL for the installer.
136
+ </ParamField>
137
+
138
+ <ParamField path="filename" type="string">
139
+ Override the auto-detected filename from the URL.
140
+ </ParamField>
141
+
142
+ <ParamField path="appName" type="string">
143
+ Application name to focus after installation completes.
144
+ </ParamField>
145
+
146
+ <ParamField path="launch" type="boolean" default={true}>
147
+ Whether to focus/launch the app after installation.
148
+ </ParamField>
149
+ </Expandable>
150
+ </ParamField>
151
+
152
+ **Behavior:**
153
+ - Downloads the installer from the URL
154
+ - Auto-detects the install method based on file extension
155
+ - Runs the appropriate install command (e.g., `msiexec` for `.msi`, `dpkg` for `.deb`)
156
+ - Optionally focuses the installed application
157
+
158
+ ```javascript
159
+ // Windows MSI installer
160
+ await testdriver.provision.installer({
161
+ url: 'https://example.com/app-setup.msi',
162
+ appName: 'MyApp',
163
+ });
164
+
165
+ // Linux DEB package
166
+ await testdriver.provision.installer({
167
+ url: 'https://example.com/app.deb',
168
+ appName: 'MyApp',
169
+ launch: true,
170
+ });
171
+ ```
172
+
173
+ ### electron()
174
+
175
+ Launch an Electron application.
176
+
177
+ ```javascript
178
+ await testdriver.provision.electron(options)
179
+ ```
180
+
181
+ <ParamField path="options" type="ProvisionElectronOptions" required>
182
+ <Expandable title="properties">
183
+ <ParamField path="appPath" type="string" required>
184
+ Path to the Electron application directory or executable.
185
+ </ParamField>
186
+
187
+ <ParamField path="args" type="string[]" default={[]}>
188
+ Additional command-line arguments to pass to the Electron app.
189
+ </ParamField>
190
+ </Expandable>
191
+ </ParamField>
192
+
193
+ ```javascript
194
+ await testdriver.provision.electron({
195
+ appPath: '/home/testdriver/my-electron-app',
196
+ args: ['--no-sandbox'],
197
+ });
198
+ ```
199
+
200
+ ### dashcam()
201
+
202
+ Start Dashcam recording with custom options. Usually called automatically by other provision methods, but can be called directly for custom configurations.
203
+
204
+ ```javascript
205
+ await testdriver.provision.dashcam(options?)
206
+ ```
207
+
208
+ <ParamField path="options" type="ProvisionDashcamOptions">
209
+ <Expandable title="properties">
210
+ <ParamField path="logPath" type="string">
211
+ Path to the TestDriver log file. Defaults to `/tmp/testdriver.log` (Linux) or `C:\Users\testdriver\testdriver.log` (Windows).
212
+ </ParamField>
213
+
214
+ <ParamField path="logName" type="string" default="TestDriver Log">
215
+ Display name for the log file in the Dashcam replay.
216
+ </ParamField>
217
+
218
+ <ParamField path="webLogs" type="boolean" default={true}>
219
+ Enable web traffic log capture.
220
+ </ParamField>
221
+
222
+ <ParamField path="title" type="string">
223
+ Recording title for the Dashcam session.
224
+ </ParamField>
225
+ </Expandable>
226
+ </ParamField>
227
+
228
+ ```javascript
229
+ await testdriver.provision.dashcam({
230
+ title: 'Login Flow Test',
231
+ logPath: '/tmp/my-app.log',
232
+ logName: 'Application Log',
233
+ webLogs: true,
234
+ });
235
+ ```
236
+
237
+ ## Reconnect Behavior
238
+
239
+ When `reconnect: true` is set on the client, all provision methods are wrapped in a Proxy that intercepts calls and skips them silently. This is because when reconnecting to an existing sandbox, the applications are already running.
240
+
241
+ ```javascript
242
+ const testdriver = new TestDriver({
243
+ reconnect: true,
244
+ });
245
+
246
+ await testdriver.ready();
247
+
248
+ // These calls are silently skipped:
249
+ await testdriver.provision.chrome({ url: 'https://example.com' });
250
+ await testdriver.provision.dashcam();
251
+ ```
252
+
253
+ ## Types
254
+
255
+ ```typescript
256
+ interface ProvisionChromeOptions {
257
+ url?: string; // Default: "http://testdriver-sandbox.vercel.app/"
258
+ maximized?: boolean; // Default: true
259
+ guest?: boolean; // Default: false
260
+ }
261
+
262
+ interface ProvisionChromeExtensionOptions {
263
+ extensionPath?: string; // Local unpacked extension path
264
+ extensionId?: string; // Chrome Web Store ID
265
+ maximized?: boolean; // Default: true
266
+ }
267
+
268
+ interface ProvisionVSCodeOptions {
269
+ workspace?: string; // Workspace path
270
+ extensions?: string[]; // Extension IDs to install
271
+ }
272
+
273
+ interface ProvisionInstallerOptions {
274
+ url: string; // Download URL (required)
275
+ filename?: string; // Override filename
276
+ appName?: string; // App name to focus
277
+ launch?: boolean; // Default: true
278
+ }
279
+
280
+ interface ProvisionElectronOptions {
281
+ appPath: string; // Path to Electron app (required)
282
+ args?: string[]; // Additional args
283
+ }
284
+
285
+ interface ProvisionDashcamOptions {
286
+ logPath?: string; // Log file path
287
+ logName?: string; // Default: "TestDriver Log"
288
+ webLogs?: boolean; // Default: true
289
+ title?: string; // Recording title
290
+ }
291
+ ```
292
+
293
+ ## Complete Example
294
+
295
+ ```javascript
296
+ import { describe, it, beforeAll, afterAll } from 'vitest';
297
+ import TestDriver from 'testdriverai';
298
+
299
+ describe('Chrome Extension Test', () => {
300
+ let testdriver;
301
+
302
+ beforeAll(async () => {
303
+ testdriver = new TestDriver({
304
+ os: 'linux',
305
+ resolution: '1920x1080',
306
+ });
307
+
308
+ await testdriver.ready();
309
+
310
+ // Install extension and open Chrome
311
+ await testdriver.provision.chromeExtension({
312
+ extensionPath: './my-extension',
313
+ });
314
+
315
+ // Start Dashcam with custom logs
316
+ await testdriver.provision.dashcam({
317
+ title: 'Extension Test',
318
+ webLogs: true,
319
+ });
320
+ });
321
+
322
+ afterAll(async () => {
323
+ await testdriver.disconnect();
324
+ });
325
+
326
+ it('tests the extension popup', async () => {
327
+ await testdriver.find('extension icon').click();
328
+ await testdriver.find('popup content').click();
329
+ });
330
+ });
331
+ ```
@@ -0,0 +1,214 @@
1
+ ---
2
+ name: testdriver:redraw
3
+ description: Wait for the screen to stabilize after interactions
4
+ ---
5
+ <!-- Generated from redraw.mdx. DO NOT EDIT. -->
6
+
7
+ ## Overview
8
+
9
+ The redraw system waits for the screen to stabilize after an interaction before continuing. It detects when animations, page loads, and network requests have settled, preventing actions from being performed on a changing screen.
10
+
11
+ <Note>
12
+ **Redraw is disabled by default since v7.3.** Enable it explicitly if your tests interact with applications that have significant animations or loading states.
13
+ </Note>
14
+
15
+ ## How It Works
16
+
17
+ Redraw uses a **two-phase detection** approach:
18
+
19
+ 1. **Change Detection** — Compare the current frame to the initial screenshot taken right after the action. If the pixel diff exceeds 0.1%, the screen has changed.
20
+ 2. **Stability Detection** — Compare consecutive frames using z-score analysis. When the diff between frames drops below 0.1% or the z-score is negative (current diff is below average), the screen has settled.
21
+
22
+ The screen is considered **settled** when both phases complete: the screen changed from the initial state AND consecutive frames are now stable.
23
+
24
+ ```mermaid
25
+ flowchart TD
26
+ A[Action performed] --> B{Phase 1: Change Detection\ndiffFromInitial > 0.1%?}
27
+ B -- "Yes (screen changed)" --> C{Phase 2: Stability\nz-score < 0 or\ndiffPercent < 0.1%?}
28
+ C -- "Yes (frames stable)" --> D[Screen settled ✓]
29
+ B -- "No (waiting...)" --> B
30
+ C -- "No (waiting...)" --> C
31
+ ```
32
+
33
+ ### Polling
34
+
35
+ The system polls at **500ms intervals**, comparing screenshot frames. This reduces WebSocket traffic while still providing responsive detection.
36
+
37
+ ### Pixel Comparison
38
+
39
+ Uses [pixelmatch](https://github.com/mapbox/pixelmatch) for per-pixel comparison with a threshold of `0.1` for pixel sensitivity. A frame diff above **0.1% of total pixels** indicates the screen has changed.
40
+
41
+ ### Z-Score Analysis
42
+
43
+ Screen stability uses statistical analysis of the last **10 measurements**:
44
+
45
+ 1. Calculate the mean and standard deviation of consecutive frame diffs
46
+ 2. Compute the z-score: `(currentDiff - mean) / stddev`
47
+ 3. Screen is stable when `diffPercent < 0.1%` or `z-score < 0` (current diff is below the average)
48
+
49
+ This approach adapts to the specific animation patterns of your application rather than using a fixed threshold.
50
+
51
+ ## Per-Command Timeouts
52
+
53
+ Each command type has a specific redraw timeout:
54
+
55
+ | Command | Timeout | Reason |
56
+ |---------|---------|--------|
57
+ | `click` | 5000ms | Page navigations, modal openings |
58
+ | `hover` (within click) | 5000ms | Same as click |
59
+ | `hover` (standalone) | 2500ms | Tooltip animations |
60
+ | `scroll` | 5000ms | Lazy-loaded content |
61
+ | `type` | 5000ms | Autocomplete, validation |
62
+ | `pressKeys` | 5000ms | Keyboard shortcuts may trigger changes |
63
+ | `focusApplication` | 1000ms | Window focus animations |
64
+
65
+ If the timeout is reached before the screen settles, the command continues anyway. The timeout event is available via the `redraw:complete` event.
66
+
67
+ ## Configuration
68
+
69
+ ### Constructor Options
70
+
71
+ ```javascript
72
+ const testdriver = new TestDriver({
73
+ // Shorthand: enable/disable
74
+ redraw: true, // enable with defaults
75
+ redraw: false, // disable (default since v7.3)
76
+
77
+ // Full configuration
78
+ redraw: {
79
+ enabled: true,
80
+ screenRedraw: true, // enable screen pixel diff detection
81
+ networkMonitor: false, // enable network settling detection
82
+ },
83
+ });
84
+ ```
85
+
86
+ <ParamField path="redraw" type="RedrawConfig | boolean" default={false}>
87
+ Redraw configuration. Pass `true`/`false` for shorthand, or an object for fine-grained control.
88
+
89
+ <Expandable title="properties">
90
+ <ParamField path="enabled" type="boolean" default={false}>
91
+ Enable or disable the redraw system. Default changed to `false` in v7.3.
92
+ </ParamField>
93
+
94
+ <ParamField path="screenRedraw" type="boolean" default={true}>
95
+ Enable pixel-diff-based screen change detection. If both `screenRedraw` and `networkMonitor` are `false`, redraw auto-disables.
96
+ </ParamField>
97
+
98
+ <ParamField path="networkMonitor" type="boolean" default={false}>
99
+ Enable network traffic monitoring for settling detection. Monitors WebSocket traffic on the sandbox to detect when network activity subsides.
100
+ </ParamField>
101
+ </Expandable>
102
+ </ParamField>
103
+
104
+ ### Per-Command Override
105
+
106
+ Override redraw settings for individual commands:
107
+
108
+ ```javascript
109
+ // Enable redraw for a specific click
110
+ await testdriver.find('load more').click({
111
+ redraw: { enabled: true },
112
+ });
113
+
114
+ // Disable redraw for a fast interaction
115
+ await testdriver.find('checkbox').click({
116
+ redraw: false,
117
+ });
118
+ ```
119
+
120
+ ## Network Settling
121
+
122
+ When `networkMonitor` is enabled, the system also monitors sandbox network traffic:
123
+
124
+ - Polls for `totalBytesReceived` and `totalBytesSent` from the sandbox
125
+ - Keeps the last **60 measurements**
126
+ - Calculates z-scores for both RX and TX byte rates
127
+ - Network is **settled** when both RX and TX z-scores are negative (traffic is below average)
128
+ - Has a **10-second timeout** for network polling
129
+ - Non-critical: network errors are logged but never throw
130
+
131
+ The final settling condition requires **both** screen AND network to be settled (when both are enabled).
132
+
133
+ ## Events
134
+
135
+ The redraw system emits events through the SDK emitter. See [Events](/v7/events) for the full event reference.
136
+
137
+ | Event | Description |
138
+ |---|---|
139
+ | `redraw:status` | Emitted on each poll with current screen diff, network stats, and timeout info |
140
+ | `redraw:complete` | Emitted when redraw resolves (settled or timed out) |
141
+
142
+ ```javascript
143
+ testdriver.emitter.on('redraw:status', (status) => {
144
+ console.log(`Screen: ${status.redraw.text}`);
145
+ console.log(`Network: ${status.network.text}`);
146
+ console.log(`Timeout: ${status.timeout.text}`);
147
+ });
148
+
149
+ testdriver.emitter.on('redraw:complete', (result) => {
150
+ if (result.isTimeout) {
151
+ console.warn(`Redraw timed out after ${result.timeElapsed}ms`);
152
+ } else {
153
+ console.log(`Screen settled in ${result.timeElapsed}ms`);
154
+ }
155
+ });
156
+ ```
157
+
158
+ ## When to Use Redraw
159
+
160
+ **Enable redraw when:**
161
+ - Testing single-page applications (SPAs) with route transitions
162
+ - Interacting with pages that lazy-load content on scroll
163
+ - Clicking buttons that trigger animations or modals
164
+ - Testing apps with significant network-driven UI updates
165
+
166
+ **Keep redraw disabled when:**
167
+ - Tests are already stable without it
168
+ - You want faster test execution
169
+ - Your application has minimal animations
170
+ - You're using explicit waits or assertions instead
171
+
172
+ ## Types
173
+
174
+ ```typescript
175
+ interface RedrawConfig {
176
+ enabled?: boolean; // Default: false (since v7.3)
177
+ screenRedraw?: boolean; // Default: true
178
+ networkMonitor?: boolean; // Default: false
179
+ }
180
+
181
+ interface RedrawStatusEvent {
182
+ redraw: {
183
+ enabled: boolean;
184
+ settled: boolean;
185
+ hasChangedFromInitial: boolean;
186
+ consecutiveFramesStable: number;
187
+ diffFromInitial: number;
188
+ diffFromLast: number;
189
+ text: string;
190
+ };
191
+ network: {
192
+ enabled: boolean;
193
+ settled: boolean;
194
+ rxBytes: number;
195
+ txBytes: number;
196
+ text: string;
197
+ };
198
+ timeout: {
199
+ isTimeout: boolean;
200
+ elapsed: number;
201
+ max: number;
202
+ text: string;
203
+ };
204
+ }
205
+
206
+ interface RedrawCompleteEvent {
207
+ screenSettled: boolean;
208
+ hasChangedFromInitial: boolean;
209
+ consecutiveFramesStable: number;
210
+ networkSettled: boolean;
211
+ isTimeout: boolean;
212
+ timeElapsed: number;
213
+ }
214
+ ```
@@ -133,7 +133,7 @@ export default defineConfig({
133
133
  <Card
134
134
  title="View Plans & Pricing"
135
135
  icon="credit-card"
136
- href="/v7/cloud"
136
+ href="/v7/hosted"
137
137
  >
138
138
  Compare plans and find the right level of parallelization for your team.
139
139
  </Card>