Commit f40366a
authored
test: improve privacy snapshot generation (#38571)
## **Description**
- Our code was generating new privacy snapshots that did not end with a
newline, and then failed Prettier lint. It now ends with a newline.
- One of the unit tests was using `o124216.ingest.us.sentry.io`, which
works, but lands at the same place as the simpler `sentry.io` we use
everywhere else. I changed it to be simpler and more consistent.
## **Changelog**
CHANGELOG entry: null
<!--## **Related issues**
## **Manual testing steps**
## **Screenshots/Recordings**
## **Pre-merge author checklist**
## **Pre-merge reviewer checklist**-->
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> Adds a trailing newline when writing `privacy-snapshot.json` and
updates Sentry DSN test URLs/expectations to `sentry.io`.
>
> - **Tests**:
> - **E2E (`test/e2e/helpers.js`)**: Write `privacy-snapshot.json` with
a trailing newline to satisfy prettier.
> - **Unit (`ui/helpers/utils/display-critical-error.test.ts`)**: Update
mocked DSNs to `sentry.io` and adjust `extractEnvelopeUrlFromDsn`
expected envelope URL accordingly; regional DSN test remains unchanged.
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
827f326. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 3781b99 commit f40366a
File tree
2 files changed
+5
-8
lines changed- test/e2e
- ui/helpers/utils
2 files changed
+5
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
454 | 454 | | |
455 | 455 | | |
456 | 456 | | |
457 | | - | |
| 457 | + | |
458 | 458 | | |
459 | 459 | | |
460 | 460 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
26 | | - | |
| 25 | + | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
237 | 237 | | |
238 | 238 | | |
239 | 239 | | |
240 | | - | |
241 | | - | |
| 240 | + | |
242 | 241 | | |
243 | | - | |
244 | | - | |
245 | | - | |
| 242 | + | |
246 | 243 | | |
247 | 244 | | |
248 | 245 | | |
| |||
0 commit comments