@vizzly-testing/cli 0.5.0 → 0.6.0

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/docs/tdd-mode.md CHANGED
@@ -8,7 +8,7 @@ TDD Mode transforms your visual testing workflow by:
8
8
 
9
9
  - **Local comparison** - Compares screenshots on your machine using `odiff`
10
10
  - **Fast feedback** - No network uploads during development
11
- - **Immediate results** - Tests fail instantly when visual differences are detected
11
+ - **Immediate results** - Tests fail instantly when visual differences are detected
12
12
  - **Auto-baseline creation** - Creates baselines locally when none exist
13
13
  - **No token required** - Works entirely offline for local development
14
14
 
@@ -43,7 +43,7 @@ npx vizzly tdd "npm test"
43
43
  🐻 **Comparison behavior:**
44
44
  - Compares new screenshots against local baselines
45
45
  - **Tests fail immediately** when visual differences detected
46
- - Shows exact diff paths and percentages
46
+ - Generates interactive HTML report for visual analysis
47
47
  - Creates diff images in `.vizzly/diffs/`
48
48
 
49
49
  ### 3. Accept Changes (Update Baseline)
@@ -56,7 +56,7 @@ npx vizzly tdd "npm test" --set-baseline
56
56
 
57
57
  🐻 **Baseline update behavior:**
58
58
  - Skips all comparisons
59
- - Sets current screenshots as new baselines
59
+ - Sets current screenshots as new baselines
60
60
  - All tests pass (baseline accepted)
61
61
  - Future runs use updated baselines
62
62
 
@@ -73,7 +73,7 @@ npx vizzly run "npm test" --wait
73
73
  TDD Mode creates a local development environment:
74
74
 
75
75
  1. **Downloads baselines** - Gets approved screenshots from Vizzly
76
- 2. **Runs tests** - Executes your test suite normally
76
+ 2. **Runs tests** - Executes your test suite normally
77
77
  3. **Captures screenshots** - Collects new screenshots via `vizzlyScreenshot()`
78
78
  4. **Compares locally** - Uses `odiff` for pixel-perfect comparison
79
79
  5. **Fails immediately** - Tests fail when differences exceed threshold
@@ -89,9 +89,11 @@ TDD Mode creates a `.vizzly/` directory:
89
89
  │ ├── homepage.png
90
90
  │ ├── dashboard.png
91
91
  │ └── metadata.json # Baseline build information
92
- ├── current/ # Current test screenshots
92
+ ├── current/ # Current test screenshots
93
93
  │ ├── homepage.png
94
94
  │ └── dashboard.png
95
+ ├── report/ # Interactive HTML report
96
+ │ └── index.html # Visual comparison interface
95
97
  └── diffs/ # Visual diff images (when differences found)
96
98
  ├── homepage.png # Red overlay showing differences
97
99
  └── dashboard.png
@@ -99,6 +101,50 @@ TDD Mode creates a `.vizzly/` directory:
99
101
 
100
102
  **Important**: Add `.vizzly/` to your `.gitignore` file as it contains local development artifacts.
101
103
 
104
+ ## Interactive HTML Report
105
+
106
+ Each TDD run automatically generates a comprehensive HTML report at `.vizzly/report/index.html`. This report provides advanced visual comparison tools to analyze differences:
107
+
108
+ ### 🐻 **Viewing Modes**
109
+
110
+ **Overlay Mode** (Default)
111
+ - Shows current screenshot as base layer
112
+ - Click to toggle diff overlay on/off
113
+ - Perfect for spotting subtle changes
114
+
115
+ **Side-by-Side Mode**
116
+ - Displays baseline and current screenshots horizontally
117
+ - Easy to compare layout and content changes
118
+ - Great for reviewing larger modifications
119
+
120
+ **Onion Skin Mode**
121
+ - Drag across image to reveal baseline underneath
122
+ - Interactive reveal lets you control comparison area
123
+ - Ideal for precise change inspection
124
+
125
+ **Toggle Mode**
126
+ - Click image to switch between baseline and current
127
+ - Quick back-and-forth comparison
128
+ - Simple way to see before/after
129
+
130
+ ### 🐻 **Report Features**
131
+
132
+ - **Dark Theme** - Easy on the eyes during long debugging sessions
133
+ - **Mobile Responsive** - Works on any screen size
134
+ - **Clickable File Paths** - Click from terminal to open instantly
135
+ - **Clean Status Display** - Shows "Visual differences detected" instead of technical metrics
136
+ - **Test Summary** - Total, passed, failed counts and pass rate
137
+
138
+ ### 🐻 **Opening the Report**
139
+
140
+ ```bash
141
+ # Report path is shown after each run
142
+ 🐻 View detailed report: file:///path/to/.vizzly/report/index.html
143
+
144
+ # Click the link in your terminal, or open manually
145
+ open .vizzly/report/index.html # macOS
146
+ ```
147
+
102
148
  ## Command Options
103
149
 
104
150
  ### Basic TDD Mode
@@ -122,7 +168,7 @@ vizzly tdd "npm test" --set-baseline
122
168
  VIZZLY_TOKEN=your-token vizzly tdd "npm test" --baseline-build build-abc123
123
169
  ```
124
170
 
125
- **`--baseline-comparison <id>`** - Use specific comparison as baseline
171
+ **`--baseline-comparison <id>`** - Use specific comparison as baseline
126
172
  ```bash
127
173
  VIZZLY_TOKEN=your-token vizzly tdd "npm test" --baseline-comparison comparison-xyz789
128
174
  ```
@@ -272,14 +318,14 @@ jobs:
272
318
  - uses: actions/checkout@v4
273
319
  - uses: actions/setup-node@v4
274
320
  - run: npm ci
275
-
321
+
276
322
  # Use TDD mode for PR builds (faster, no uploads)
277
323
  - name: TDD Visual Tests (PR)
278
324
  if: github.event_name == 'pull_request'
279
325
  run: npx vizzly tdd "npm test"
280
326
  env:
281
327
  VIZZLY_TOKEN: ${{ secrets.VIZZLY_TOKEN }}
282
-
328
+
283
329
  # Upload full build for main branch
284
330
  - name: Full Visual Tests (main)
285
331
  if: github.ref == 'refs/heads/main'
@@ -295,7 +341,7 @@ jobs:
295
341
  - **Immediate feedback** - See results in seconds
296
342
  - **No API rate limits** - Test as often as needed
297
343
 
298
- ### Development Experience
344
+ ### Development Experience
299
345
  - **Fast iteration** - Make changes and test immediately
300
346
  - **Visual debugging** - See exact pixel differences
301
347
  - **Offline capable** - Works without internet (after initial baseline download)
@@ -354,7 +400,7 @@ npm install odiff-bin
354
400
 
355
401
  ### Use TDD Mode For
356
402
  - **Local development** - Fast iteration on UI changes
357
- - **Bug fixing** - Verify visual fixes immediately
403
+ - **Bug fixing** - Verify visual fixes immediately
358
404
  - **PR validation** - Quick checks without uploading
359
405
  - **Debugging** - Understand exactly what changed visually
360
406
 
@@ -372,5 +418,5 @@ npm install odiff-bin
372
418
  ## Next Steps
373
419
 
374
420
  - Learn about [Test Integration](./test-integration.md) for screenshot capture
375
- - Explore [Upload Command](./upload-command.md) for direct uploads
376
- - Check the [API Reference](./api-reference.md) for programmatic usage
421
+ - Explore [Upload Command](./upload-command.md) for direct uploads
422
+ - Check the [API Reference](./api-reference.md) for programmatic usage
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vizzly-testing/cli",
3
- "version": "0.5.0",
3
+ "version": "0.6.0",
4
4
  "description": "Visual review platform for UI developers and designers",
5
5
  "keywords": [
6
6
  "visual-testing",
@@ -53,9 +53,10 @@
53
53
  ],
54
54
  "scripts": {
55
55
  "start": "node src/index.js",
56
- "build": "npm run clean && npm run compile && npm run types",
56
+ "build": "npm run clean && npm run compile && npm run copy-assets && npm run types",
57
57
  "clean": "rimraf dist",
58
58
  "compile": "babel src --out-dir dist --ignore '**/*.test.js'",
59
+ "copy-assets": "cp src/services/report-generator/report.css dist/services/report-generator/",
59
60
  "types": "tsc --emitDeclarationOnly --outDir dist/types",
60
61
  "prepublishOnly": "npm test && npm run build",
61
62
  "test": "vitest run",