Spec 14 Testing and Definition of Done - SekiroKenjii/Quizzivy GitHub Wiki
Section of Quizzivy โ Frontend Portal & Data Model Specification ยท Previous ยท Next
Unit (Vitest): zod schemas, utils, take-test store (timer math, resume merge, submit idempotency), integrity buffering and strike counting, join-code normalization, audio plays-remaining reconciliation.
Component (Testing Library): each form validates and submits; guards redirect correctly; a renderer test per QuestionType; integrity dialog states; audio player states (idle / playing / plays exhausted / seek blocked / load error).
E2E (Playwright + MSW or a seeded backend):
- Admin logs in โ creates a test with one of each question type including audio โ publishes โ assigns.
- Student logs in with password โ starts โ answers โ reloads mid-test โ answers persist โ submits โ sees result.
-
Join flow: anonymous visitor opens
/join/:codeโ sees class name โ Google sign-in (mocked GIS) โ account created, enrolled, lands on/app. - Expired code โ plain error, no account created, nothing leaked about the class.
- Timer expiry auto-submits.
- Tab-switch fires
tab_hidden, warning dialog appears, event lands on the admin integrity timeline. - Second tab on the same attempt supersedes the first; the first goes read-only.
-
Audio
maxPlays: play twice โ play button disabled โ reload โ still disabled (server-authoritative). - Student payload assertion:
GET /app/attempts/:idcontains noisCorrect,sampleAnswer,transcript, oracceptedAnswers.
Definition of done for any task:
- TypeScript strict passes; no
anywithout a comment - Lint clean
- Loading / error / empty states present
- All strings via
t(), keys in bothvianden - Keyboard-operable
- Tests added/updated per the levels above
- Any DDL reviewed against ยง13 and the Neon skill
- Any new public (unauthenticated) endpoint is rate-limited and leaks nothing (ยง6.5)
- No new dependency without a stated reason in the PR description
Section of Quizzivy โ Frontend Portal & Data Model Specification ยท Previous ยท Next
Generated from docs/quizzivy-spec-v0.3.md. Edit that file in the repository; changes made on this page are overwritten.