Skip to main content

Modules Documentation

QC test cases

Functional, UI, responsive, RTL, SEO test cases.

Complete

QC for the Calendar covers 6 surfaces × 16 countries × 17 categories. Test cases group into: routing (all 14 routes return 200), rendering (status badges compute correctly), data integrity (cross-module IDs resolve), schema fidelity (JSON-LD validates against schema.org), language parity (EN + AR render at full coverage), and accessibility (keyboard navigation + screen-reader labels).

Routing tests

  • /calendar returns 200 in EN + AR.
  • /calendar/events returns 200 with all events visible.
  • Each of the 16 /calendar/events/countries/:slug routes returns 200.
  • Each of the 17 /calendar/events/categories/:slug routes returns 200.
  • Unknown slug under /calendar/events/:slug returns 404 (not 500) and renders the not-found layout.
  • /calendar/submit returns 200 with the form interactive.

Status badge tests

  • Event with startDate in future + no deadline → badge="upcoming".
  • Event with applicationDeadline in 3 days → badge="closing-soon" with warning tint.
  • Event with startDate=now-1h, endDate=now+2h → badge="live" with pulse animation.
  • Event with endDate=yesterday → badge="completed" with desaturated tint.
  • Editor sets status="cancelled" → badge shows "cancelled" + CTAs become disabled + JSON-LD eventStatus=EventCancelled.

Data integrity tests

  • Every relatedFounderId resolves to an existing founder in mock-founders. Broken IDs are stripped silently.
  • Slug uniqueness: no two events share a slug across the dataset.
  • Required fields per the model: missing any required field fails the build (TypeScript catches at compile).
  • mode='online' without onlineUrl, or mode='physical' without venue/city: editor flags at admin save.

Schema fidelity tests

  • Details page JSON-LD validates against Google Rich Results Test for Event.
  • eventAttendanceMode matches the mode field (offline/online/mixed).
  • organizer.@type=Organization with name + url present.
  • location is Place (physical) or VirtualLocation (online) — never absent.