Skip to content

18 — QA Pipeline and Testing

PRD Document · Savoy Signature Hotels — Multi-Site Headless Platform
Version: 1.0 · Date: 2026-03-04
Related docs: 02_Infrastructure_and_Environments.md, 04_Frontend_Architecture.md, 14_Accessibility_and_Compliance.md


This document defines the quality assurance strategy, testing pipeline, and the role of the openClaw AI QA Agent across the Savoy Signature platform. It covers unit, integration, visual regression, and accessibility testing, as well as the CI/CD quality gates.


AI QA

E2E

Visual

Integration

Fastest / Most Tests

Unit Tests (Vitest)

Component Integration (Testing Library)

Visual Regression (Chromatic / Percy)

End-to-End (Playwright)

openClaw Agent (Automated Audit)

LayerToolScope
UnitVitestMappers, utility functions, data transformations
ComponentVitest + React Testing LibraryModule rendering, props, variants
StorybookChromatic or PercyVisual regression across themes and viewports
E2EPlaywrightFull user flows (navigation, forms, language switch, booking bar)
Accessibilityaxe-core (via Playwright + Storybook)WCAG 2.1 AA compliance
PerformanceLighthouse CICore Web Vitals budget enforcement
AI QAopenClawHolistic audit: a11y, performance, visual consistency, broken links

What to TestExample
Module mappersmapHeroSlider() transforms API response → correct HeroSliderProps
Utility functionsbuildCacheTags(), generateHreflangMap(), sanitizeSlug()
Site resolvergetSiteConfig('savoy-palace') returns correct domain, theme, locale config
URL builderbuildUrl(siteKey, locale, slug) constructs correct path

3.2 Component Tests (React Testing Library)

Section titled “3.2 Component Tests (React Testing Library)”
What to TestExample
Render variantsHeroSlider renders correct number of slides, autoplay toggle
AccessibilityAccordion has correct aria-expanded, keyboard interaction
Theme applicationComponent renders correctly with data-theme="savoy-palace"
Edge casesCardGrid with empty cards[] renders gracefully (no crash)
  • Storybook stories are the source of truth.
  • Every PR triggers a visual snapshot comparison across:
    • 8 themes (subset: 3 representative themes for speed).
    • 3 viewports: Mobile (375px), Tablet (768px), Desktop (1440px).
  • Reviewers approve visual diffs in the Chromatic/Percy dashboard before merge.

Critical user flows tested against the STAGE environment:

FlowSteps
Homepage → Room DetailNavigate to homepage → click room card → verify room detail page loads with gallery, amenities, and Booking Bar
Language SwitchVisit /pt/alojamento → switch to EN → verify URL changes to /en/accommodation and content is in English
Contact Form SubmitNavigate to Contact page → fill form → submit → verify success message
404 HandlingNavigate to a non-existent URL → verify themed 404 page renders
Booking Bar FlowOpen Booking Bar → select dates → submit → verify redirect to Synxis with correct query params
SearchUse search functionality → verify results are scoped to current site
Gallery LightboxOpen gallery → click image → verify lightbox opens, swipe navigation works

The openClaw agent runs automatically on every PR merge to develop, staging, or main. It performs a holistic audit:

Audit AreaWhat It Checks
Accessibilityaxe-core scan of all rendered pages (WCAG 2.1 AA)
PerformanceLighthouse CI scores (Performance ≥ 90, A11y ≥ 95, SEO ≥ 95)
Broken LinksCrawl all internal links and verify no 404/500 responses
Visual ConsistencyScreenshot comparison against baseline
SEOVerify <title>, <meta>, hreflang, robots, JSON-LD presence
Console ErrorsFlag any JavaScript errors in the browser console

Approved

Pull Request

ESLint + Prettier

TypeScript Check

Vitest Unit Tests

Turborepo Build

Visual Regression

Code Review

Merge to develop

Pass

Fail

Merge to develop

Deploy to STAGE

Playwright E2E

openClaw AI QA

Ready for QA review

Block release

GateThresholdBlocks Deploy?
ESLint errors0✅ Yes
TypeScript errors0✅ Yes
Unit test failures0✅ Yes
Visual regression diffsMust be approved✅ Yes
Lighthouse Performance≥ 90✅ Yes
Lighthouse Accessibility≥ 95✅ Yes
axe-core critical violations0✅ Yes
E2E test failures0✅ Yes
Console errors on STAGE0⚠️ Warning

  • STAGE mirrors PROD content structure but uses test data (placeholder copy, test images).
  • A scheduled Umbraco task syncs content structure (not data) from PROD to STAGE weekly.
  • E2E tests rely on known, seeded content on STAGE (e.g., “Test Room Deluxe” with predictable slugs).
packages/test-utils/fixtures/rooms.ts
export const testRoom = {
name: 'Test Room Deluxe',
slug: 'test-room-deluxe',
contentType: 'roomDetailPage',
siteKey: 'savoy-palace',
locale: 'pt',
// ... complete fixture
};

  • Unit test coverage ≥ 80% for mapper functions and utility packages.
  • All module stories in Storybook have visual regression snapshots.
  • Playwright E2E suite covers all critical user flows and runs on STAGE after every deploy.
  • openClaw AI QA Agent blocks releases with critical accessibility or performance regressions.
  • Lighthouse CI scores are tracked over time and never drop below thresholds.
  • Zero ESLint, TypeScript, or unit test errors are allowed in merged PRs.

Next document: 19_Booking_Engine_Integration.md