Commit c1711ff
authored
v7 (#522)
* linux is back
* base64 encode
* add credentialless to see if we can get this to load
* bump v
* it works
* acceptance-linux
* remove testmo
* gather
* update api key for local
* updots
* fix catch err
* sdk prototype
* migrate for new dashcam 1.0
* sdk to test.mjs
* vitest
* correctly editing
* Update acceptance-sdk-tests.yml
* disable aws
* update workflow
* use vitest
* run self-hosted less often
* increase hook timeout for non-hot vm
* fix client / healingclient syntax error
* debugable test results
* eslint
* test
* seems ot be working
* add global dashcam track functionality
* add sdk back
* silent log forwarding
* fix setup
* checkout globalsetup to revert
* update for stack track
* refactor to use internal methods
* sdk refactor
* remove recovery functions
* v7
* making a mess
* passing prompt test
* tests working, error reporting looking good
* update td api root to prod
* fix eslint and prettier
* client -> testdriver
* ensure type runs sequential
* prompt caching, windows fixes
* workflow runs on windows and linux
* fix for rendersandbox
* fix for rendersandbox
* find recordings
* fix eslint
* prettier
* fix for finding dashcam recording
* dont forward all messages
* fix eslint
* run prettier
* fix for logfile not existing on track
* prettier
* pretty good checkpoint
* it worked
* it worked
* stop for today
* linux passing
* fix prettier
* this at least starts it
* absolute path progress
* all the way to upload
* video actually working
* 1.4.10
* duration updates
* Phase 1 Complete: Core Foundation
- Created Dashcam class as composable module (src/core/Dashcam.js)
- Extracted from lifecycle helpers
- Platform-agnostic (Windows/Linux/Mac)
- Methods: auth(), addFileLog(), addApplicationLog(), start(), stop(), isRecording()
- State tracking with this.recording
- Created core module exports (src/core/index.js)
- Exports TestDriver and Dashcam classes
- Updated package.json with modular exports
- . (main SDK)
- ./core (TestDriver + Dashcam)
- ./vitest (plugin)
- Converted lifecycle helpers to thin wrappers
- Uses WeakMap to cache Dashcam instances per client
- Maintains state across helper calls
- Backward compatible
- Added unit tests (test/dashcam.test.js)
- 5 passing tests
- Tests creation, options, errors, URL extraction, state
- All acceptance tests passing ✅
* Phase 2 Task 2.1: Vitest Hooks API
- Created useTestDriver() hook for managed TestDriver instances
- Accepts Vitest context parameter
- Auto-cleanup via context.onTestFinished()
- Returns configured TestDriver client
- Created useDashcam() hook for managed Dashcam instances
- Requires TestDriver client from useTestDriver()
- Optional auto-auth, auto-start, auto-stop
- Automatic URL registration with plugin
- Created useTestDriverWithDashcam() combined hook
- Single-line setup for both TestDriver + Dashcam
- Full auto-lifecycle management
- Simplest API for 90% of use cases
- Added ./vitest/hooks export to package.json
- Created example test demonstrating hooks usage
Progressive disclosure: users can choose their level of control
- useTestDriverWithDashcam() - fully automatic
- useTestDriver() + useDashcam() - custom lifecycle
- Direct class usage - full manual control
* Phase 3: Presets System
- Created chromePreset for automated Chrome setup
- Auto-launches Chrome with configurable options
- Supports maximized, guest mode, custom URL
- Dashcam auto-enabled by default
- Created vscodePreset for automated VS Code setup
- Opens workspace/folder automatically
- Installs extensions on demand
- Dashcam integration included
- Created electronPreset for Electron apps
- Launches with configurable app path and args
- Platform-aware shell execution
- Created webAppPreset as generic wrapper
- Currently delegates to chromePreset
- Extensible for Firefox, Edge, etc.
- Created createPreset() builder API
- Enables users to create custom presets
- Automatic client + dashcam setup
- Simple setup() function pattern
- Updated useTestDriver hook
- Fixed TestDriver initialization (apiKey as first param)
- Added autoConnect option (default: true)
- Auto-auth and auto-connect to sandbox
- Returns __connectionPromise for presets to await
- Added ./presets export to package.json
- Created comprehensive PRESETS.md documentation
- Usage examples for all presets
- Custom preset creation guide
- Progressive disclosure explanation
- Created presets-example.test.mjs with examples
- Demonstrates all preset usage patterns
- Shows custom preset creation
Progressive disclosure hierarchy:
- Beginner: chromePreset(context, { url }) - instant setup
- Intermediate: useTestDriver + useDashcam - custom lifecycle
- Advanced: new TestDriver() - full manual control
* Phase 4: DX Polish - TypeScript Definitions and Migration Guide
TypeScript Definitions:
- Created src/core/index.d.ts
- Full type definitions for TestDriver and Dashcam classes
- DashcamOptions, LogConfig, TestDriverOptions interfaces
- Comprehensive JSDoc comments
- Created src/vitest/hooks.d.ts
- Type definitions for all hooks
- VitestContext, UseTestDriverOptions, UseDashcamOptions interfaces
- Full autocomplete support for hook options
- Created src/presets/index.d.ts
- Type definitions for all presets
- ChromePresetOptions, VSCodePresetOptions, ElectronPresetOptions
- PresetSetupFunction and PresetConfig types
- Full type safety for preset creation
Migration Guide (docs/MIGRATION.md):
- Complete v6 → v7 migration guide
- Side-by-side before/after examples
- Three migration strategies:
1. Gradual - Keep old code, use new for new tests
2. Convert to Hooks - Replace helpers with hooks
3. Adopt Presets - Use presets for common scenarios
- Common pattern conversions with LOC reductions
- TypeScript examples
- Zero breaking changes - 100% backward compatible
- Deprecation timeline explained
Updated README.md:
- Added v7 Progressive Disclosure section
- Three levels clearly explained with examples:
🟢 Beginner: Presets (chromePreset)
🟡 Intermediate: Hooks (useTestDriver/useDashcam)
🔴 Advanced: Core Classes (TestDriver/Dashcam)
- Links to documentation
Benefits:
✅ Full TypeScript IntelliSense
✅ Type-safe preset options
✅ Clear migration path
✅ No breaking changes
✅ Progressive learning curve
✅ Professional documentation
* 📋 SDK v7 Implementation Complete Summary
Created comprehensive summary document covering:
- All 4 phases completion status
- Detailed task breakdowns
- Architecture overview
- Code metrics and LOC counts
- Timeline and git history
- Future work suggestions
Status: ✅ READY FOR RELEASE
* major refactor, logs, browser tarcking in dashcam
* decent sdk stopping
* interactions
* timeline updates
* update track interactions
* fix many bug
* updates
* friday
* double asser test in same file
* fix for log tracking
* run 2 tests in parallel one file
* name dashcam recordings
* clean up directories a bit
* major cleanup
* remove tset
* update workflow
* testdriver is a reporter, not a plugin
* small test for cicd test running
* update to get reporter working in ci
* try for reporter in ci
* test workflow in github
* v7 js beta
* remove docs publish sript
* bump v1 parent d7604be commit c1711ff
File tree
438 files changed
+58807
-20116
lines changed- .github
- workflows
- .vscode
- agent
- lib
- debugger
- docs
- guide
- v6
- account
- action
- apps
- bugs
- cli
- commands
- exporting
- features
- getting-started
- guide
- importing
- integrations
- interactive
- overview
- scenarios
- security
- tutorials
- v7
- _drafts
- api
- commands
- features
- getting-started
- overview
- platforms
- presets
- examples
- interfaces
- cli
- commands
- lib
- lib
- core
- presets
- vitest
- setup/aws
- styles
- .vale-config
- Microsoft
- alex
- config/vocabularies/Docs
- proselint
- write-good
- test-results
- assets
- testdriver
- acceptance
- screenshots
- snippets
- behavior
- lifecycle
- edge-cases
- lifecycle
- examples
- android
- lifecycle
- chrome-extension/lifecycle
- desktop/lifecycle
- vscode-extension/lifecycle
- web/lifecycle
- lifecycle
- test
- manual
- testdriver
- setup
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
438 files changed
+58807
-20116
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
This file was deleted.
This file was deleted.
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
0 commit comments