Modules Documentation
QC test cases
Functional, UI, responsive, RTL, SEO test cases.
Complete
QC for Coverage focuses on six dimensions: routing (the 2 public routes), data integrity (parentEventId resolves + every mentionedId resolves), kind-specific rendering (5 kind variants each render correctly), sponsor disclosure (visible + non-removable on sponsor-spotlight), JSON-LD validity (NewsArticle / Article / BlogPosting variants validate against schema.org), and reverse-lookup correctness (mentions appear on every cited entity’s profile).
Routing tests
- /coverage/:slug returns 200 for every published article in EN + AR.
- Unknown slug under /coverage/:slug returns 404 (not 500), renders the not-found layout.
- /coverage/design-system returns 200 in EN + AR.
- There is NO /coverage/ index route — confirm /coverage/ returns 404 (this is intentional, not a bug).
Data integrity tests
- parentEventId of every CoverageArticle resolves to an existing CalendarEvent in mock-calendar-events. Build fails (TS catches at compile) if you try to publish a CoverageArticle whose parentEventId is missing.
- Every mentionedFounderId / mentionedStartupId / mentionedOpportunityId / mentionedFileId resolves. Broken IDs are stripped silently at render with a console.warn in development.
- Slug uniqueness: no two coverage articles share a slug across the dataset.
- On publish, parentEvent.coverageStatus transitions to 'covered' exactly once even when multiple coverage articles share the same parent.
Kind-specific rendering tests
- kind="recap" → badge "RECAP" in blue, no disclosure ribbon, JSON-LD @type=NewsArticle.
- kind="analysis" → badge "ANALYSIS" in amber, "Editorial perspective" disclosure visible, JSON-LD @type=Article.
- kind="highlights" → badge "HIGHLIGHTS" in green, ImageGallery JSON-LD node when 3+ figures present.
- kind="pitch-result" → badge "PITCH RESULT" in purple, JSON-LD includes Event subEvent node for the competition with offers + competitor properties.
- kind="sponsor-spotlight" → "SPONSORED" badge replaces kind badge, sponsor-tinted background, disclosure ribbon at top of body, JSON-LD @type=BlogPosting with sponsor property set.
Reverse-lookup tests
- For every mentionedFounderId, the corresponding founder profile renders a "Mentioned in coverage" rail that includes this article.
- For every mentionedStartupId, the startup details page renders a "Mentioned in coverage" rail that includes this article.
- Parent event details page renders the article in its "Coverage" section.
