Skip to content

Add integration tests for dynamic page engine #14

Description

@coderooz

Status: Pending

What

Integration tests for the page engine that validate end-to-end flows:

  1. Config loading flow — fetch mock JSON config -> validate via Zod -> cache in memory -> retrieve from cache
  2. Page resolution flow — register pages with slugs -> resolve by slug -> return correct PageConfig -> return undefined for unknown slug
  3. Version tracking flow — initialize VersionTracker -> check pages -> detect stale pages -> acknowledge page -> verify acknowledged -> acknowledge all stale -> verify empty
  4. Component registration flow -> register component -> render section with that component -> verify render output
  5. Error boundary flow -> section throws -> ErrorBoundary catches -> retry button appears -> retry succeeds
  6. Template rendering flow -> load marketing template -> resolve sections -> render hero-banner + feature-grid + cta-section

Test runner: Vitest (same as core)

Location: packages/feature-dynamic-pages/tests/

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions