Commit 16dc2ff
authored
✨ Capture page URL in all JS client SDKs (#220)
## Summary
Sends the current page URL as a `url` property when capturing
screenshots. This enables the backend to link individual screenshots to
their corresponding deploy preview pages (preview-to-screenshot
integration).
- **Static Site**: `properties.url = page.url()` — Playwright page
available in `captureAndSendScreenshot`
- **Storybook**: `{ properties: { url: page.url() } }` passed to
`vizzlyScreenshot` — was previously sending no properties
- **Vitest**: `url: page.url()` added to the properties object built in
`toMatchScreenshot`
- **Ember**: `url: window.location.href` added to browser-side
properties payload — screenshot server forwards as-is
All placed before the user's `...customProperties` spread so users can
override if needed.
## Test plan
- [x] `npm test` — 1892 pass, 0 fail
- [x] `npm run lint` — clean
- [x] Storybook screenshot test mocks updated with `url()` method
- [ ] Deploy and verify `url` appears in screenshot records via Vizzly
dashboard1 parent d82d78e commit 16dc2ff
9 files changed
Lines changed: 6 additions & 645 deletions
File tree
- .github/workflows
- clients
- ember
- src/test-support
- tests/integration
- static-site/src
- storybook
- src
- tests
- vitest/src
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
312 | 312 | | |
313 | 313 | | |
314 | 314 | | |
315 | | - | |
316 | | - | |
317 | | - | |
318 | | - | |
319 | | - | |
320 | | - | |
321 | 315 | | |
322 | 316 | | |
323 | 317 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
48 | 48 | | |
49 | 49 | | |
50 | 50 | | |
51 | | - | |
52 | | - | |
53 | 51 | | |
54 | 52 | | |
55 | 53 | | |
56 | | - | |
57 | | - | |
58 | 54 | | |
59 | 55 | | |
60 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
266 | 266 | | |
267 | 267 | | |
268 | 268 | | |
| 269 | + | |
269 | 270 | | |
270 | 271 | | |
271 | 272 | | |
| |||
0 commit comments