finish the testing framework
This commit is contained in:
17
CLAUDE.md
17
CLAUDE.md
@@ -146,6 +146,8 @@ The desktop designer (`designer/`) provides rapid UI development with:
|
||||
- **UI Hierarchy Dumping**: Exports element tree to JSON for inspection
|
||||
- **Screenshot Capture**: PNG export via F12 key
|
||||
- **Logging**: Detailed output for debugging navigation and events
|
||||
- **Action Recording**: Record mouse/keyboard interactions to JSON
|
||||
- **Action Playback**: Replay recorded interactions with timing
|
||||
|
||||
### Key Files
|
||||
|
||||
@@ -154,7 +156,10 @@ The desktop designer (`designer/`) provides rapid UI development with:
|
||||
| `designer/src/main.cpp` | Main entry point, GLFW window, event loop |
|
||||
| `designer/src/desktop_kernel.cpp` | RmlUi context management, rendering |
|
||||
| `designer/src/testing/ui_inspector.cpp` | UI hierarchy JSON export |
|
||||
| `designer/src/testing/visual_capture.cpp` | PNG screenshot capture |
|
||||
| `designer/src/testing/visual_capture.cpp` | PNG screenshot capture and comparison |
|
||||
| `designer/src/testing/action_recorder.cpp` | Record user interactions to JSON |
|
||||
| `designer/src/testing/action_player.cpp` | Playback recorded actions |
|
||||
| `designer/src/backend/RmlUi_Backend_GLFW_GL3.cpp` | GLFW backend with input hooks |
|
||||
|
||||
### Command Line Options
|
||||
|
||||
@@ -162,8 +167,18 @@ The desktop designer (`designer/`) provides rapid UI development with:
|
||||
--log <path> Write logs to file
|
||||
--hierarchy <path> Dump UI hierarchy JSON each frame
|
||||
--dump Single-shot dump mode (screenshot + hierarchy)
|
||||
--record <path> Enable recording mode (F5 to start/stop)
|
||||
--playback <path> Play back recorded actions from JSON
|
||||
```
|
||||
|
||||
### Keyboard Controls
|
||||
|
||||
| Key | Function |
|
||||
|-----|----------|
|
||||
| F5 | Start/stop recording (when --record is enabled) |
|
||||
| F6 | Pause/resume playback (when --playback is enabled) |
|
||||
| F12 | Take screenshot |
|
||||
|
||||
## Automated Testing Framework
|
||||
|
||||
The designer-test (`designer-test/`) provides automated UI testing:
|
||||
|
||||
Reference in New Issue
Block a user