Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

14 - QA Checklist (Houses Module)

Module-specific quality gates on top of 00-shared/10 (QA baseline: performance budgets, offline matrix, a11y, motion, security). Every item is testable and maps to source.


1. Core flows (must pass)

#ScenarioExpectationSource
1.1Create house → appears in listPOST 201; doc in GET list, createdAt order (no server sort)houses.controller.ts:24-34, houses.service.ts:30
1.2Create house with only name+code201; color/motto absent (optional, create-house.dto.ts:13-21)house.schema.ts:15-19
1.3House detail → identity fields rendername, code, color, motto round-trip verbatim (trim only)houses.service.ts:36-40, house.schema.ts:9-19
1.4Update house → PATCH applies$set full DTO; untouched fields stablehouses.service.ts:42-49, houses.controller.ts:44
1.5Soft delete → list excludes itisDeleted: true filtered by scoped queryhouses.service.ts:51-54, base.repository.ts
1.6Reassign student house via PATCH /students/:idhouseId changes; student detail reflectsupdate-student.dto.ts:45-48, student.service.ts:142-155

2. Validation & conflicts (negative paths)

#ScenarioExpectationSource
2.1Create with duplicate code409 verbatim House code "X" already exists.houses.service.ts:19-21; index house.schema.ts:23
2.2Create with duplicate name (different code)Allowed (no check/index) - document as by-design; UI soft-warnshouses.service.ts:19-21 checks code only
2.3Duplicate color across housesAllowed - palette conflict is a UX concern, not API errorhouse.schema.ts:15-16
2.4Concurrent create of same code (race)One 201, other → Mongo E11000 → 500 as wired today; gap: should map to 409 (planned)house.schema.ts:23, error filter
2.5Update code to an existing oneNo service check (houses.service.ts:42-49); unique index throws → generic error; client normalizes to conflict copy (08 §3)gap
2.6Missing name or code400 (class-validator @IsString required)create-house.dto.ts:5-11
2.7Invalid color (e.g. blue!)Accepted (free string) - client must validate hex before sendcreate-house.dto.ts:13-16
2.8Unauthenticated call401houses.controller.ts:19-20

3. Reassignment & transfer semantics

#ScenarioExpectationSource
3.1Transfer student (class change)houseId unchanged (transfer $set excludes house)student.service.ts:185-192
3.2Clear a student's housePATCH with houseId omitted/null - field optionalupdate-student.dto.ts:45-48
3.3Set house on createhouseId IsMongoId acceptedcreate-student.dto.ts:39-42
3.4houseId pointing at a deleted houseAllowed; no referential validation - students show "house unavailable"; client must render fallbackgap (09 G2)
3.5House member count after reassignmentChanges only after refetch (client join) - expect ~ unverified count07 §5, 13 §4

4. Soft-delete & reference integrity (the big gap)

#ScenarioExpectationSource
4.1Delete house with membersNo 409, no cascade - soft delete succeeds; students keep dangling houseId (student.schema.ts:41-42). Client warns pre-delete (07 §7); server guard (planned)houses.service.ts:51-54
4.2Delete already-deleted house404 (scoped filter excludes deleted)houses.service.ts:53
4.3Recreate house with same code after deleteAllowed (soft-deleted row excluded by scoped query) - old students still point at the deleted _id, new house gets a new _id: historical membership silently orphaned. Document + testbase.repository.ts scoped filter
4.4Detail of deleted house via stale link404 → "House not found" UXhouses.service.ts:38

5. Multi-tenancy

#ScenarioExpectationSource
5.1Tenant B queries housessees only B's rowsbase.repository.ts scoped filter (house.repository.ts:9-15)
5.2Cross-tenant duplicate codesallowed - uniqueness per tenanthouse.schema.ts:23
5.3tenantId in request bodyignored - server never reads it from bodyAGENTS.md

6. UI/UX (manual + golden)

#Check
6.1Pagination boundaries: page 1 Prev disabled; last page Next disabled (meta.hasNext/hasPrevious)
6.2409 inline error under Code; focus + live-region
6.3PATCH full-set prefill: edit opens with all 4 fields filled (08 §4)
6.4Color round-trip: swatch selected → stored hex → detail banner identical (11 §3-4)
6.5Contrast matrix: 8 presets × light/dark × white text ≥ AA (11 §4)
6.6Unverified count shows ~ + tooltip; verified count shows exact
6.7Offline: cached list + banner; mutations blocked (00-shared/10 §2)
6.8Empty states: list, detail members, search-less grid
6.9Permission gating: read-only role sees no FAB/menu; 403 copy on deep link
6.10Skeleton < 200 ms perceived; content < 2 s on network (00-shared/10 §1)
6.11Delete dialog copy accurate: "members keep their house reference" (no fake cascade promise, 09 §2)

7. E2E regression seeds (manual fixtures)

  • 2 tenants, identical house codes (proves 5.2 isolation).
  • House with a #-less color value and one with color missing (fallback path, 11 §3).
  • Student assigned to a house that is then soft-deleted (4.1, 4.3 orphan check).
  • 3 houses with the same name, different codes (2.2 by-design duplicates).
  • Duplicate-code create race reproduced by two parallel POSTs (2.4).

8. Backend follow-ups (flagged to engineering)

#ItemPriority
1Map E11000 race to 409 on create (2.4)High
2Duplicate-code check on update (2.5)Medium
3GET /students?houseId= or members endpoint (G1)High
4Delete guard / cascade for assigned students (G2)High
5sort/q on houses list (G5)Low
6House events + RBAC guards on endpoints (IMPLEMENTATION_PLAN.md:239 audit)Medium