@vizzly-testing/cli 0.8.0 → 0.9.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/README.md +26 -13
- package/dist/cli.js +25 -1
- package/dist/client/index.js +77 -11
- package/dist/commands/init.js +23 -17
- package/dist/commands/tdd-daemon.js +312 -0
- package/dist/commands/tdd.js +45 -14
- package/dist/reporter/reporter-bundle.css +1 -0
- package/dist/reporter/reporter-bundle.iife.js +57 -0
- package/dist/server/handlers/api-handler.js +98 -30
- package/dist/server/handlers/tdd-handler.js +264 -77
- package/dist/server/http-server.js +358 -15
- package/dist/services/html-report-generator.js +77 -0
- package/dist/services/report-generator/report.css +56 -0
- package/dist/services/screenshot-server.js +6 -3
- package/dist/services/server-manager.js +2 -9
- package/dist/services/tdd-service.js +188 -25
- package/dist/services/test-runner.js +43 -1
- package/dist/types/commands/tdd-daemon.d.ts +18 -0
- package/dist/types/container/index.d.ts +1 -3
- package/dist/types/reporter/src/components/app-router.d.ts +3 -0
- package/dist/types/reporter/src/components/comparison/comparison-actions.d.ts +5 -0
- package/dist/types/reporter/src/components/comparison/comparison-card.d.ts +6 -0
- package/dist/types/reporter/src/components/comparison/comparison-list.d.ts +6 -0
- package/dist/types/reporter/src/components/comparison/comparison-viewer.d.ts +4 -0
- package/dist/types/reporter/src/components/comparison/view-mode-selector.d.ts +4 -0
- package/dist/types/reporter/src/components/comparison/viewer-modes/onion-viewer.d.ts +3 -0
- package/dist/types/reporter/src/components/comparison/viewer-modes/overlay-viewer.d.ts +3 -0
- package/dist/types/reporter/src/components/comparison/viewer-modes/side-by-side-viewer.d.ts +3 -0
- package/dist/types/reporter/src/components/comparison/viewer-modes/toggle-viewer.d.ts +3 -0
- package/dist/types/reporter/src/components/dashboard/dashboard-filters.d.ts +16 -0
- package/dist/types/reporter/src/components/dashboard/dashboard-header.d.ts +5 -0
- package/dist/types/reporter/src/components/dashboard/dashboard-stats.d.ts +4 -0
- package/dist/types/reporter/src/components/dashboard/empty-state.d.ts +8 -0
- package/dist/types/reporter/src/components/ui/smart-image.d.ts +7 -0
- package/dist/types/reporter/src/components/ui/status-badge.d.ts +5 -0
- package/dist/types/reporter/src/components/ui/toast.d.ts +4 -0
- package/dist/types/reporter/src/components/views/comparisons-view.d.ts +6 -0
- package/dist/types/reporter/src/components/views/stats-view.d.ts +6 -0
- package/dist/types/reporter/src/hooks/use-baseline-actions.d.ts +5 -0
- package/dist/types/reporter/src/hooks/use-comparison-filters.d.ts +20 -0
- package/dist/types/reporter/src/hooks/use-image-loader.d.ts +1 -0
- package/dist/types/reporter/src/hooks/use-report-data.d.ts +7 -0
- package/dist/types/reporter/src/hooks/use-vizzly-api.d.ts +9 -0
- package/dist/types/reporter/src/main.d.ts +1 -0
- package/dist/types/reporter/src/services/api-client.d.ts +4 -0
- package/dist/types/reporter/src/utils/comparison-helpers.d.ts +16 -0
- package/dist/types/reporter/src/utils/constants.d.ts +37 -0
- package/dist/types/reporter/vite.config.d.ts +2 -0
- package/dist/types/reporter/vite.dev.config.d.ts +2 -0
- package/dist/types/sdk/index.d.ts +1 -2
- package/dist/types/server/handlers/api-handler.d.ts +5 -14
- package/dist/types/server/handlers/tdd-handler.d.ts +18 -17
- package/dist/types/server/http-server.d.ts +2 -1
- package/dist/types/services/base-service.d.ts +1 -2
- package/dist/types/services/html-report-generator.d.ts +3 -3
- package/dist/types/services/screenshot-server.d.ts +1 -1
- package/dist/types/services/server-manager.d.ts +25 -35
- package/dist/types/services/tdd-service.d.ts +7 -1
- package/dist/types/services/test-runner.d.ts +6 -1
- package/dist/types/utils/build-history.d.ts +16 -0
- package/dist/types/utils/config-loader.d.ts +1 -1
- package/dist/types/utils/console-ui.d.ts +1 -1
- package/dist/types/utils/git.d.ts +4 -4
- package/dist/types/utils/security.d.ts +2 -1
- package/dist/utils/build-history.js +103 -0
- package/dist/utils/security.js +14 -5
- package/docs/api-reference.md +1 -3
- package/docs/getting-started.md +1 -1
- package/docs/tdd-mode.md +176 -112
- package/package.json +17 -4
package/docs/tdd-mode.md
CHANGED
|
@@ -1,57 +1,62 @@
|
|
|
1
1
|
# TDD Mode Guide
|
|
2
2
|
|
|
3
|
-
TDD (Test-Driven Development) Mode enables fast local development
|
|
3
|
+
TDD (Test-Driven Development) Mode enables fast local development with an interactive dashboard for real-time visual comparison feedback.
|
|
4
4
|
|
|
5
5
|
## What is TDD Mode?
|
|
6
6
|
|
|
7
|
-
TDD Mode transforms your visual testing workflow
|
|
7
|
+
TDD Mode transforms your visual testing workflow with:
|
|
8
8
|
|
|
9
|
-
- **
|
|
10
|
-
- **
|
|
11
|
-
- **
|
|
12
|
-
- **
|
|
13
|
-
- **
|
|
9
|
+
- **Interactive Dashboard** - Real-time visual feedback as tests run
|
|
10
|
+
- **Local Comparison** - Compares screenshots on your machine using `odiff`
|
|
11
|
+
- **Live Updates** - See comparisons instantly in the browser
|
|
12
|
+
- **Baseline Management** - Accept/reject changes directly from the UI
|
|
13
|
+
- **Fast Feedback** - No network uploads during development
|
|
14
|
+
- **No Token Required** - Works entirely offline for local development
|
|
14
15
|
|
|
15
16
|
## Quick Start
|
|
16
17
|
|
|
17
|
-
### 1.
|
|
18
|
+
### 1. Start the TDD Dashboard
|
|
18
19
|
|
|
19
|
-
Start
|
|
20
|
+
Start the interactive dashboard server:
|
|
20
21
|
|
|
21
22
|
```bash
|
|
22
|
-
npx vizzly tdd
|
|
23
|
+
npx vizzly tdd start
|
|
23
24
|
```
|
|
24
25
|
|
|
25
|
-
🐻 **
|
|
26
|
-
-
|
|
27
|
-
-
|
|
28
|
-
-
|
|
29
|
-
- All tests pass (baseline creation)
|
|
26
|
+
🐻 **Dashboard starts:**
|
|
27
|
+
- Opens at `http://localhost:47392` (or custom `--port`)
|
|
28
|
+
- Shows empty state ready for comparisons
|
|
29
|
+
- Runs in foreground (use `--daemon` for background)
|
|
30
30
|
|
|
31
|
-
### 2.
|
|
31
|
+
### 2. Run Your Tests in Watch Mode
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
In a separate terminal, run your tests in watch mode:
|
|
34
34
|
|
|
35
35
|
```bash
|
|
36
|
-
|
|
37
|
-
vim src/components/Header.js
|
|
38
|
-
|
|
39
|
-
# Test immediately with local comparison
|
|
40
|
-
npx vizzly tdd "npm test"
|
|
36
|
+
npm test -- --watch
|
|
41
37
|
```
|
|
42
38
|
|
|
43
|
-
🐻 **
|
|
44
|
-
-
|
|
45
|
-
-
|
|
46
|
-
-
|
|
47
|
-
-
|
|
39
|
+
🐻 **As tests run:**
|
|
40
|
+
- Screenshots sent to dashboard in real-time
|
|
41
|
+
- Comparisons appear instantly
|
|
42
|
+
- Live pass/fail statistics update
|
|
43
|
+
- Filter by status (all/changed/identical/new)
|
|
44
|
+
|
|
45
|
+
### 3. Review Changes in the Dashboard
|
|
46
|
+
|
|
47
|
+
Open your browser to `http://localhost:47392`:
|
|
48
|
+
|
|
49
|
+
- **Visual Diff Modes** - Overlay, side-by-side, onion skin, toggle
|
|
50
|
+
- **Accept Baselines** - Click to accept individual or all changes
|
|
51
|
+
- **Test Statistics** - Total tests, pass rate, change detection
|
|
52
|
+
- **Dark Theme** - Easy on the eyes during development
|
|
48
53
|
|
|
49
|
-
###
|
|
54
|
+
### 4. Accept Changes (Update Baseline)
|
|
50
55
|
|
|
51
|
-
|
|
56
|
+
Accept changes directly in the dashboard UI, or via CLI:
|
|
52
57
|
|
|
53
58
|
```bash
|
|
54
|
-
npx vizzly tdd "npm test" --set-baseline
|
|
59
|
+
npx vizzly tdd run "npm test" --set-baseline
|
|
55
60
|
```
|
|
56
61
|
|
|
57
62
|
🐻 **Baseline update behavior:**
|
|
@@ -60,24 +65,34 @@ npx vizzly tdd "npm test" --set-baseline
|
|
|
60
65
|
- All tests pass (baseline accepted)
|
|
61
66
|
- Future runs use updated baselines
|
|
62
67
|
|
|
63
|
-
###
|
|
68
|
+
### 5. Stop the Dashboard
|
|
64
69
|
|
|
65
|
-
When
|
|
70
|
+
When done developing:
|
|
66
71
|
|
|
67
72
|
```bash
|
|
68
|
-
npx vizzly
|
|
73
|
+
npx vizzly tdd stop
|
|
69
74
|
```
|
|
70
75
|
|
|
76
|
+
Or press `Ctrl+C` if running in foreground.
|
|
77
|
+
|
|
71
78
|
## How It Works
|
|
72
79
|
|
|
73
|
-
TDD Mode
|
|
80
|
+
TDD Mode provides two workflows:
|
|
81
|
+
|
|
82
|
+
### Interactive Dashboard Workflow
|
|
83
|
+
|
|
84
|
+
1. **Start dashboard** - `vizzly tdd start` launches persistent server
|
|
85
|
+
2. **Run tests in watch** - Tests run continuously as you code
|
|
86
|
+
3. **Live updates** - Screenshots compared and displayed in real-time
|
|
87
|
+
4. **Review in browser** - Visual diff modes help analyze changes
|
|
88
|
+
5. **Accept baselines** - Click to update baselines from UI
|
|
74
89
|
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
90
|
+
### Single-Shot Workflow
|
|
91
|
+
|
|
92
|
+
1. **Run tests** - `vizzly tdd run "npm test"` executes once
|
|
93
|
+
2. **Compares locally** - Uses `odiff` for pixel-perfect comparison
|
|
94
|
+
3. **Generates report** - Creates HTML report with visual comparisons
|
|
95
|
+
4. **Exit with status** - Fails if differences exceed threshold
|
|
81
96
|
|
|
82
97
|
## Directory Structure
|
|
83
98
|
|
|
@@ -101,44 +116,79 @@ TDD Mode creates a `.vizzly/` directory:
|
|
|
101
116
|
|
|
102
117
|
**Important**: Add `.vizzly/` to your `.gitignore` file as it contains local development artifacts.
|
|
103
118
|
|
|
104
|
-
## Interactive
|
|
119
|
+
## Interactive Dashboard
|
|
120
|
+
|
|
121
|
+
The TDD dashboard provides real-time visual comparison feedback as you develop.
|
|
122
|
+
|
|
123
|
+
### 🐻 **Dashboard Features**
|
|
124
|
+
|
|
125
|
+
**Two-View Navigation**
|
|
126
|
+
- **Comparisons View** - Main view showing all screenshot comparisons with visual diffs
|
|
127
|
+
- **Statistics View** - Overview of test runs, pass/fail metrics, and baseline management
|
|
128
|
+
- Switch between views using the navigation tabs at the top
|
|
105
129
|
|
|
106
|
-
|
|
130
|
+
**Live Updates**
|
|
131
|
+
- Screenshots appear as tests run
|
|
132
|
+
- Comparisons processed in real-time
|
|
133
|
+
- No page refresh needed
|
|
134
|
+
- Auto-refreshes every 2 seconds to show latest results
|
|
107
135
|
|
|
108
|
-
|
|
136
|
+
**Visual Diff Modes** (in Comparisons view)
|
|
137
|
+
- **Overlay** - Toggle diff overlay on/off
|
|
138
|
+
- **Side-by-Side** - Compare baseline and current horizontally
|
|
139
|
+
- **Onion Skin** - Drag to reveal baseline underneath
|
|
140
|
+
- **Toggle** - Click to switch between baseline and current
|
|
109
141
|
|
|
110
|
-
**
|
|
111
|
-
-
|
|
112
|
-
-
|
|
113
|
-
-
|
|
142
|
+
**Baseline Management**
|
|
143
|
+
- **Accept Individual** - Click accept on any comparison to update that baseline
|
|
144
|
+
- **Accept All Changes** - Bulk accept all failed/new screenshots at once (shown when changes detected)
|
|
145
|
+
- Shows count of failed and new baselines
|
|
146
|
+
- Prominent button appears in Comparisons view when changes exist
|
|
147
|
+
- **Reset Baselines** - Delete all baselines and comparison history (in Statistics view)
|
|
148
|
+
- Useful for starting fresh or fixing corrupted state
|
|
149
|
+
- Requires confirmation before executing
|
|
114
150
|
|
|
115
|
-
**
|
|
116
|
-
-
|
|
117
|
-
-
|
|
118
|
-
-
|
|
151
|
+
**Filtering & Search** (in Comparisons view)
|
|
152
|
+
- Filter by status: All, Failed, Passed, New
|
|
153
|
+
- Search by screenshot name
|
|
154
|
+
- Filter by browser type
|
|
155
|
+
- Filter by viewport size
|
|
156
|
+
- Sort by name, status, or diff percentage
|
|
119
157
|
|
|
120
|
-
|
|
121
|
-
- Drag across image to reveal baseline underneath
|
|
122
|
-
- Interactive reveal lets you control comparison area
|
|
123
|
-
- Ideal for precise change inspection
|
|
158
|
+
### 🐻 **Dashboard UI**
|
|
124
159
|
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
160
|
+
```bash
|
|
161
|
+
# Start the dashboard
|
|
162
|
+
npx vizzly tdd start
|
|
163
|
+
|
|
164
|
+
# Opens at http://localhost:47392
|
|
165
|
+
# Shows real-time comparisons as tests run
|
|
166
|
+
# Dark theme optimized for development
|
|
167
|
+
# Navigate between Comparisons and Statistics views
|
|
168
|
+
```
|
|
129
169
|
|
|
130
|
-
|
|
170
|
+
**Dashboard Views:**
|
|
131
171
|
|
|
132
|
-
|
|
133
|
-
-
|
|
134
|
-
-
|
|
135
|
-
-
|
|
136
|
-
-
|
|
172
|
+
1. **Comparisons View** (`/`)
|
|
173
|
+
- Lists all screenshot comparisons with visual diffs
|
|
174
|
+
- Filter, search, and sort capabilities
|
|
175
|
+
- "Accept All" button appears when changes are detected
|
|
176
|
+
- Individual accept/reject actions per comparison
|
|
177
|
+
- Multiple visual diff modes for detailed inspection
|
|
137
178
|
|
|
138
|
-
|
|
179
|
+
2. **Statistics View** (`/stats`)
|
|
180
|
+
- Overview of test runs and baseline status
|
|
181
|
+
- Total pass/fail/new screenshot counts
|
|
182
|
+
- Current baseline information (build name, creation date)
|
|
183
|
+
- "Accept All Changes" button for bulk baseline updates
|
|
184
|
+
- "Reset Baselines" button to clear all baselines and start fresh
|
|
185
|
+
|
|
186
|
+
### 🐻 **Static HTML Report**
|
|
187
|
+
|
|
188
|
+
When using `vizzly tdd run`, a static HTML report is generated at `.vizzly/report/index.html`:
|
|
139
189
|
|
|
140
190
|
```bash
|
|
141
|
-
# Report path
|
|
191
|
+
# Report path shown after each run
|
|
142
192
|
🐻 View detailed report: file:///path/to/.vizzly/report/index.html
|
|
143
193
|
|
|
144
194
|
# Click the link in your terminal, or open manually
|
|
@@ -147,82 +197,96 @@ open .vizzly/report/index.html # macOS
|
|
|
147
197
|
|
|
148
198
|
## Command Options
|
|
149
199
|
|
|
150
|
-
###
|
|
200
|
+
### TDD Subcommands
|
|
151
201
|
|
|
202
|
+
**Start Dashboard Server**
|
|
152
203
|
```bash
|
|
153
|
-
vizzly tdd
|
|
204
|
+
vizzly tdd start [options]
|
|
154
205
|
```
|
|
155
206
|
|
|
156
|
-
|
|
207
|
+
Options:
|
|
208
|
+
- `--port <port>` - Server port (default: 47392)
|
|
209
|
+
- `--threshold <number>` - Comparison threshold (default: 0.1)
|
|
210
|
+
- `--baseline-build <id>` - Use specific build as baseline
|
|
211
|
+
- `--daemon` - Run in background mode
|
|
157
212
|
|
|
213
|
+
**Run Tests (Single-Shot)**
|
|
158
214
|
```bash
|
|
159
|
-
vizzly tdd "npm test"
|
|
215
|
+
vizzly tdd run "npm test" [options]
|
|
160
216
|
```
|
|
161
217
|
|
|
162
|
-
|
|
218
|
+
Options:
|
|
219
|
+
- `--set-baseline` - Accept screenshots as new baseline
|
|
220
|
+
- `--port <port>` - Server port (default: 47392)
|
|
221
|
+
- `--threshold <number>` - Comparison threshold (default: 0.1)
|
|
222
|
+
- `--baseline-build <id>` - Use specific build as baseline
|
|
223
|
+
- `--timeout <ms>` - Server timeout (default: 30000)
|
|
163
224
|
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
**`--baseline-build <id>`** - Use specific build as baseline
|
|
225
|
+
**Stop Dashboard Server**
|
|
167
226
|
```bash
|
|
168
|
-
|
|
227
|
+
vizzly tdd stop
|
|
169
228
|
```
|
|
170
229
|
|
|
171
|
-
|
|
172
|
-
```bash
|
|
173
|
-
VIZZLY_TOKEN=your-token vizzly tdd "npm test" --baseline-comparison comparison-xyz789
|
|
174
|
-
```
|
|
175
|
-
|
|
176
|
-
### Server Configuration
|
|
230
|
+
### Legacy Command
|
|
177
231
|
|
|
178
|
-
|
|
232
|
+
The legacy command format is still supported:
|
|
179
233
|
|
|
180
234
|
```bash
|
|
181
|
-
vizzly tdd "npm test"
|
|
182
|
-
vizzly tdd "npm test" --timeout 60000
|
|
235
|
+
vizzly tdd "npm test" # Equivalent to: vizzly tdd run "npm test"
|
|
183
236
|
```
|
|
184
237
|
|
|
185
238
|
## Development Workflow
|
|
186
239
|
|
|
187
|
-
###
|
|
240
|
+
### Interactive Development (Recommended)
|
|
188
241
|
|
|
189
242
|
```bash
|
|
190
|
-
# 1
|
|
191
|
-
npx vizzly
|
|
243
|
+
# Terminal 1: Start dashboard
|
|
244
|
+
npx vizzly tdd start
|
|
192
245
|
|
|
193
|
-
# 2
|
|
194
|
-
|
|
246
|
+
# Terminal 2: Run tests in watch mode
|
|
247
|
+
npm test -- --watch
|
|
195
248
|
|
|
196
|
-
#
|
|
197
|
-
#
|
|
198
|
-
npx vizzly tdd "npm test"
|
|
249
|
+
# Browser: Open http://localhost:47392
|
|
250
|
+
# See live comparisons as you code
|
|
199
251
|
|
|
200
|
-
#
|
|
252
|
+
# Accept changes from dashboard UI when ready
|
|
253
|
+
# Or stop when done: npx vizzly tdd stop
|
|
254
|
+
```
|
|
255
|
+
|
|
256
|
+
### Single-Shot Testing
|
|
257
|
+
|
|
258
|
+
```bash
|
|
259
|
+
# Run tests once with comparison
|
|
260
|
+
npx vizzly tdd run "npm test"
|
|
261
|
+
|
|
262
|
+
# Accept changes as new baseline
|
|
263
|
+
npx vizzly tdd run "npm test" --set-baseline
|
|
264
|
+
|
|
265
|
+
# Upload to Vizzly when satisfied
|
|
201
266
|
npx vizzly run "npm test" --wait
|
|
202
267
|
```
|
|
203
268
|
|
|
204
269
|
### Feature Development
|
|
205
270
|
|
|
206
271
|
```bash
|
|
207
|
-
# Start
|
|
208
|
-
npx vizzly tdd
|
|
272
|
+
# Start interactive dashboard
|
|
273
|
+
npx vizzly tdd start
|
|
274
|
+
|
|
275
|
+
# In another terminal, run tests in watch mode
|
|
276
|
+
npm test -- --watch
|
|
209
277
|
|
|
210
|
-
#
|
|
211
|
-
|
|
212
|
-
# Edit code to fix visual differences
|
|
213
|
-
vim src/components/NewFeature.js
|
|
214
|
-
npx vizzly tdd "npm test"
|
|
215
|
-
done
|
|
278
|
+
# Make changes and see live feedback in browser
|
|
279
|
+
# Accept baselines directly from dashboard UI
|
|
216
280
|
|
|
217
|
-
#
|
|
281
|
+
# When feature complete, upload to Vizzly
|
|
218
282
|
npx vizzly run "npm test" --build-name "Feature: New Dashboard"
|
|
219
283
|
```
|
|
220
284
|
|
|
221
285
|
### Bug Fixing
|
|
222
286
|
|
|
223
287
|
```bash
|
|
224
|
-
#
|
|
225
|
-
npx vizzly tdd "npm test"
|
|
288
|
+
# Quick verification with single-shot mode
|
|
289
|
+
npx vizzly tdd run "npm test"
|
|
226
290
|
|
|
227
291
|
# Tests should pass when bug is fixed
|
|
228
292
|
# Then upload the fix
|
|
@@ -242,9 +306,7 @@ Configure in `vizzly.config.js`:
|
|
|
242
306
|
```javascript
|
|
243
307
|
export default {
|
|
244
308
|
comparison: {
|
|
245
|
-
threshold: 0.01
|
|
246
|
-
ignoreAntialiasing: true,
|
|
247
|
-
ignoreColors: false
|
|
309
|
+
threshold: 0.01 // 1% difference tolerance
|
|
248
310
|
}
|
|
249
311
|
};
|
|
250
312
|
```
|
|
@@ -262,7 +324,7 @@ npx vizzly status # Shows latest build info
|
|
|
262
324
|
Download new baselines from a different build:
|
|
263
325
|
|
|
264
326
|
```bash
|
|
265
|
-
npx vizzly tdd "npm test" --baseline-build build-xyz789
|
|
327
|
+
npx vizzly tdd run "npm test" --baseline-build build-xyz789
|
|
266
328
|
```
|
|
267
329
|
|
|
268
330
|
### Force Baseline Refresh
|
|
@@ -271,7 +333,7 @@ Delete local baselines to force re-download:
|
|
|
271
333
|
|
|
272
334
|
```bash
|
|
273
335
|
rm -rf .vizzly/baselines/
|
|
274
|
-
npx vizzly tdd "npm test"
|
|
336
|
+
npx vizzly tdd run "npm test"
|
|
275
337
|
```
|
|
276
338
|
|
|
277
339
|
## Advanced Usage
|
|
@@ -322,7 +384,7 @@ jobs:
|
|
|
322
384
|
# Use TDD mode for PR builds (faster, no uploads)
|
|
323
385
|
- name: TDD Visual Tests (PR)
|
|
324
386
|
if: github.event_name == 'pull_request'
|
|
325
|
-
run: npx vizzly tdd "npm test"
|
|
387
|
+
run: npx vizzly tdd run "npm test"
|
|
326
388
|
env:
|
|
327
389
|
VIZZLY_TOKEN: ${{ secrets.VIZZLY_TOKEN }}
|
|
328
390
|
|
|
@@ -345,6 +407,8 @@ jobs:
|
|
|
345
407
|
- **Fast iteration** - Make changes and test immediately
|
|
346
408
|
- **Visual debugging** - See exact pixel differences
|
|
347
409
|
- **Offline capable** - Works without internet (after initial baseline download)
|
|
410
|
+
- **Clean console output** - Reduced logging noise, only shows important information
|
|
411
|
+
- **Silent mode** - Vizzly client auto-disables after first warning if not initialized
|
|
348
412
|
|
|
349
413
|
### Cost Efficiency
|
|
350
414
|
- **Reduced API usage** - Only upload final results
|
|
@@ -383,7 +447,7 @@ Error: Failed to compare 'homepage': baseline image not found
|
|
|
383
447
|
**Solution**: Refresh baselines:
|
|
384
448
|
```bash
|
|
385
449
|
rm -rf .vizzly/baselines/
|
|
386
|
-
npx vizzly tdd "npm test"
|
|
450
|
+
npx vizzly tdd run "npm test"
|
|
387
451
|
```
|
|
388
452
|
|
|
389
453
|
### Odiff Not Found
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vizzly-testing/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.9.0",
|
|
4
4
|
"description": "Visual review platform for UI developers and designers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"visual-testing",
|
|
@@ -53,10 +53,12 @@
|
|
|
53
53
|
],
|
|
54
54
|
"scripts": {
|
|
55
55
|
"start": "node src/index.js",
|
|
56
|
-
"build": "npm run clean && npm run compile && npm run copy-assets && npm run types",
|
|
56
|
+
"build": "npm run clean && npm run compile && npm run copy-assets && npm run build:reporter && npm run types",
|
|
57
57
|
"clean": "rimraf dist",
|
|
58
58
|
"compile": "babel src --out-dir dist --ignore '**/*.test.js'",
|
|
59
59
|
"copy-assets": "cp src/services/report-generator/report.css dist/services/report-generator/",
|
|
60
|
+
"build:reporter": "cd src/reporter && vite build",
|
|
61
|
+
"dev:reporter": "cd src/reporter && vite --config vite.dev.config.js",
|
|
60
62
|
"types": "tsc --emitDeclarationOnly --outDir dist/types",
|
|
61
63
|
"prepublishOnly": "npm test && npm run build",
|
|
62
64
|
"test": "vitest run",
|
|
@@ -88,15 +90,26 @@
|
|
|
88
90
|
"@babel/preset-react": "^7.27.1",
|
|
89
91
|
"@babel/preset-typescript": "^7.23.6",
|
|
90
92
|
"@eslint/js": "^9.31.0",
|
|
93
|
+
"@heroicons/react": "^2.2.0",
|
|
94
|
+
"@tailwindcss/postcss": "^4.1.13",
|
|
95
|
+
"@vitejs/plugin-react": "^5.0.3",
|
|
91
96
|
"@vitest/coverage-v8": "^3.2.4",
|
|
97
|
+
"autoprefixer": "^10.4.21",
|
|
92
98
|
"babel-plugin-transform-remove-console": "^6.9.4",
|
|
93
99
|
"eslint": "^9.31.0",
|
|
94
100
|
"eslint-config-prettier": "^10.1.8",
|
|
95
101
|
"eslint-plugin-prettier": "^5.5.3",
|
|
102
|
+
"eslint-plugin-react": "^7.37.5",
|
|
103
|
+
"eslint-plugin-react-hooks": "^5.2.0",
|
|
104
|
+
"postcss": "^8.5.6",
|
|
96
105
|
"prettier": "^3.6.2",
|
|
106
|
+
"react": "^19.1.1",
|
|
107
|
+
"react-dom": "^19.1.1",
|
|
97
108
|
"rimraf": "^6.0.1",
|
|
109
|
+
"tailwindcss": "^4.1.13",
|
|
98
110
|
"typescript": "^5.0.4",
|
|
99
|
-
"vite": "^7.1.
|
|
100
|
-
"vitest": "^3.2.4"
|
|
111
|
+
"vite": "^7.1.7",
|
|
112
|
+
"vitest": "^3.2.4",
|
|
113
|
+
"wouter": "^3.7.1"
|
|
101
114
|
}
|
|
102
115
|
}
|