feat: add MFA/TOTP auth, PII encryption, agents/leads/inquiries modules, and comprehensive tests
- Add TOTP-based MFA with setup, verify, disable, backup codes, and challenge flow - Add PII field encryption middleware with AES-256-GCM and deterministic search hashes - Add agents, inquiries, and leads domain modules with entities, events, value objects - Add web dashboard pages for inquiries and leads with detail dialogs - Add 30+ component tests (valuation, charts, listings, search, providers, UI) - Add Prisma migrations for encryption hash columns and MFA TOTP support - Fix all ESLint errors (unused imports, duplicate imports, lint auto-fixes) - Update dependencies and lock file - Clean up obsolete exploration/QA docs, add audit documentation Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -49,7 +49,7 @@ export default async function globalSetup() {
|
||||
// For local dev, the test DB is typically set up manually or via pg_dump.
|
||||
console.log('[E2E globalSetup] Verifying test database schema...');
|
||||
try {
|
||||
execSync('npx prisma db push --skip-generate --accept-data-loss', execOpts);
|
||||
execSync('npx prisma db push --accept-data-loss --config prisma/prisma.config.ts', execOpts);
|
||||
} catch (err) {
|
||||
console.warn('[E2E globalSetup] prisma db push failed (may be expected in Prisma 7):', (err as Error).message);
|
||||
console.log('[E2E globalSetup] Continuing — assuming test DB schema is already set up.');
|
||||
@@ -58,7 +58,7 @@ export default async function globalSetup() {
|
||||
// Seed database (upserts are idempotent)
|
||||
console.log('[E2E globalSetup] Seeding test database...');
|
||||
try {
|
||||
execSync('npx prisma db seed', execOpts);
|
||||
execSync('npx prisma db seed --config prisma/prisma.config.ts', execOpts);
|
||||
} catch (err) {
|
||||
console.warn('[E2E globalSetup] Seed failed (may be expected if Prisma 7 config changed):', (err as Error).message);
|
||||
console.log('[E2E globalSetup] Continuing — assuming test DB is already seeded.');
|
||||
|
||||
@@ -45,7 +45,7 @@ export default async function globalTeardown() {
|
||||
-- Delete test-generated data in dependency order (FK-safe)
|
||||
DELETE FROM "NotificationLog" WHERE "userId" IN (${NON_SEED_USERS});
|
||||
DELETE FROM "NotificationPreference" WHERE "userId" IN (${NON_SEED_USERS});
|
||||
DELETE FROM "Review" WHERE "reviewerId" IN (${NON_SEED_USERS});
|
||||
DELETE FROM "Review" WHERE "userId" IN (${NON_SEED_USERS});
|
||||
DELETE FROM "Lead" WHERE "userId" IN (${NON_SEED_USERS});
|
||||
DELETE FROM "Inquiry" WHERE "userId" IN (${NON_SEED_USERS});
|
||||
DELETE FROM "Transaction" WHERE "sellerId" IN (${NON_SEED_USERS});
|
||||
|
||||
Reference in New Issue
Block a user