BillTracker/tests
null d53a64b604 feat(data): "Erase my data" danger zone (Batch 5)
New services/userDataService.js eraseUserData() permanently wipes a user's
financial + imported data in one transaction (child → parent order for FK
safety): bills (+ cascading payments/monthly_bill_state/bill_history_ranges),
transactions/accounts/data_sources, categories/groups, templates, snowball,
spending rules/budgets, merchant rules, imports, and per-user hint tables. It
PRESERVES the account, sessions, 2FA/WebAuthn, login history and preferences —
this resets your data, not your account — then re-seeds default categories and
writes an audit row to import_history.

- POST /api/user/erase-data — rate-limited (demoDataLimiter), requires a
  type-to-confirm token ("ERASE"), structured errors.
- UI: EraseDataSection danger-zone card (Export & backups pane) — red-accented,
  "download a backup first" nudge, type-to-confirm AlertDialog, toasts; on
  success DataPage reloads all state.

Tests: tests/eraseUserData.test.js — wipes user A only, preserves user B +
account + session, re-seeds categories, audited. Server 139 pass.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-03 15:21:07 -05:00
..
backupAndCleanup.test.js fix(qa): retention GC orphaned matched transactions on bill purge (QA-B5-04) 2026-07-03 11:04:59 -05:00
bankSyncService.test.js fix(bank-sync): transaction matching, services, and worker updates 2026-06-07 20:07:27 -05:00
billReorder.test.js feat(money): cents migration stage 2 — schema flip to integer cents (batch 0.38.4) 2026-06-11 20:12:31 -05:00
billsDeletedRoute.test.js feat(bills): "Recently deleted" restore view for the 30-day window (IMP-UX-01) 2026-07-03 12:56:45 -05:00
billsService.test.js feat: Payoff Custom mode, Summary reordering, unifed billing schedule, SimpleFIN + backup fixes (batch v0.34.1.3) 2026-05-30 21:20:51 -05:00
calendarFeedService.test.js feat(money): cents migration stage 2 — schema flip to integer cents (batch 0.38.4) 2026-06-11 20:12:31 -05:00
categoryGroups.test.js feat(spending): category groups, YNAB-style spending page overhaul, 3-month averages, cover overspending (batch 0.41.0) 2026-06-14 19:21:34 -05:00
categoryReorder.test.js feat: reordering across management pages (Bills, Subscriptions, Categories, Snowball) — batch v0.34.1.2 2026-05-30 20:04:50 -05:00
csvTransactionImportService.test.js v0.28.01 2026-05-16 20:26:09 -05:00
eraseUserData.test.js feat(data): "Erase my data" danger zone (Batch 5) 2026-07-03 15:21:07 -05:00
exportImportRoundTrip.test.js test(qa): export→import round-trip preserves money (B9 data integrity) 2026-07-02 22:26:49 -05:00
exportRicher.test.js feat(export): JSON export + date-range/format payments export (Batch 4) 2026-07-03 15:15:36 -05:00
migrationModules.test.js refactor(db): extract legacy-reconcile migrations + lock version-sync (IMP-CODE-02) 2026-07-03 13:34:01 -05:00
money.test.js fix(qa): cent-exact toCents rounding + money.js test coverage 2026-07-02 21:11:12 -05:00
notificationDelivery.test.js fix(qa): escape bill name in reminder email HTML — XSS via bill name (B14-04) 2026-07-02 22:18:05 -05:00
ofxImportService.test.js feat(import): OFX/QFX transaction import (Batch 3) 2026-07-03 15:11:59 -05:00
profileRoute.test.js feat: profile settings UI, auth service refactor, schema migration, route tests 2026-06-07 01:17:49 -05:00
safeToSpend.test.js feat(cashflow): safe-to-spend projection with timeline, vitest setup, package upgrades 2026-06-12 01:32:28 -05:00
spendingSummary.test.js feat(spending): category groups, YNAB-style spending page overhaul, 3-month averages, cover overspending (batch 0.41.0) 2026-06-14 19:21:34 -05:00
statusService.test.js feat(money): cents migration stage 2 — schema flip to integer cents (batch 0.38.4) 2026-06-11 20:12:31 -05:00
subscriptionService.test.js feat(money): cents migration stage 2 — schema flip to integer cents (batch 0.38.4) 2026-06-11 20:12:31 -05:00
summaryBankTracking.test.js fix(qa): bank-tracking unpaid_this_month gates by occurrence (QA-B5-02) 2026-07-02 21:41:33 -05:00
summarySkipOverride.test.js test(qa): summary skip-exclusion + per-month override regression (B2/B5) 2026-07-02 21:56:46 -05:00
transactionMatchService.test.js feat(money): cents migration stage 2 — schema flip to integer cents (batch 0.38.4) 2026-06-11 20:12:31 -05:00
transactionMatchState.test.js refactor(match): one canonical writer for transaction match state (IMP-CODE-03) 2026-07-03 13:02:10 -05:00
updateCheckOptOut.test.js fix(qa): version check is opt-out-able (QA-B16-01) 2026-07-03 10:05:37 -05:00