Commit Graph

9 Commits

Author SHA1 Message Date
aferrer 91dc0220ae feat(assignments): emit ADJUSTMENT movement on quantity change 2026-06-25 16:58:03 +02:00
aferrer a0a1e1bdc8 feat(movements): gate StockMovementLine on trackingType QUANTITY 2026-06-25 03:22:08 +02:00
aferrer c1763ed007 feat(assignments): support line-based returns and authenticated updates 2026-06-19 17:14:22 +02:00
aferrer 6d34a2f74f feat(inventory): support line-based assignments and movements 2026-06-19 01:05:33 +02:00
aferrer caf19575c6 refactor: rename DB columns recipientId to personId 2026-06-16 13:37:58 +02:00
aferrer cf6820a7aa refactor: rename remaining recipient references to person/people 2026-06-16 13:34:15 +02:00
aferrer d67f31cf54 refactor: rename Recipient to Person, remove username, add userId FK 2026-06-16 10:04:24 +02:00
aferrer 18a192a069 chore: apply Biome cleanup 2026-06-11 04:56:01 +02:00
aferrer f2b9239d82 test: add initial unit integration and e2e coverage
Adds the initial testing baseline for the project:

   Unit coverage:
   - Zod schemas for items, assignments, movements, categories, auth, recipients, users, and assets
   - password hashing and verification helpers
   - auth role helper functions

   Integration coverage with PostgreSQL Testcontainers:
   - item use-cases: create, duplicate names, delete constraints
   - assignment use-cases: create, insufficient stock, return, double return
   - asset use-cases: available/assigned creation and lifecycle transitions
   - user use-cases: create/update, uniqueness, admin safeguards, password reset
   - category use-cases: create/update/delete constraints
   - recipient use-cases: create/update and uniqueness constraints

   E2E smoke coverage with Playwright:
   - unauthenticated redirect to login
   - seeded admin login
   - dashboard load
   - admin users page
   - inventory items page
   - assignments page

   Also configures:
   - Vitest
   - Playwright
   - PostgreSQL Testcontainers helpers
   - deterministic E2E admin bootstrap
   - test artifact ignores

   Validation:
   - bun run test: 9 files / 37 tests passed
   - bun run test:e2e: 3 passed
   - bunx tsc --noEmit: passed
   - bunx prisma validate: passed
2026-06-07 04:14:01 +02:00