Skip to content

feat(testing): E2E runtime, enhanced smoke, and Playwright tests#103

Open
Marve10s wants to merge 3 commits intomainfrom
feat/testing-infrastructure
Open

feat(testing): E2E runtime, enhanced smoke, and Playwright tests#103
Marve10s wants to merge 3 commits intomainfrom
feat/testing-infrastructure

Conversation

@Marve10s
Copy link
Owner

Summary

Adds three new testing layers for runtime validation of generated projects, closing critical gaps in test coverage. All run nightly + manually — not on every PR.

Layer 1: E2E Runtime Tests

  • Expanded from 3 to 9 configs covering Next.js, Nuxt, SvelteKit, TanStack Start, React Router with fullstack and standalone backends
  • startDevServer() — runs turbo dev, waits for correct frontend port
  • checkFrontendPage() — validates HTML, detects SSR errors, hydration mismatches
  • checkStaticAssets() — verifies CSS/JS bundles load (200 status)
  • validateFrameworkPage() — checks _next, _nuxt, type="module" markers
  • Run with: bun run test:e2e

Layer 2: Enhanced Smoke Tests

  • --strict flag makes dev-check failures blocking (not advisory)
  • 5 new presets: next-payload, astro-sanity, nuxt-fullstack, react-router-hono, tanstack-start-fullstack
  • Framework-specific HTML validation (empty body detection, asset markers)
  • Run with: bun run test:smoke:strict

Layer 3: Playwright Web Builder Tests

  • 5 tests across 3 spec files: builder load, CLI command display, URL state, preview file tree, URL param restoration
  • data-testid attributes on key stack builder elements
  • Auto-starts dev server on port 3333
  • Run with: bun run test:playwright

CI Workflow

  • .github/workflows/e2e-test.yaml — nightly at 4am UTC + manual dispatch
  • 3 parallel jobs with artifact upload

Test plan

  • bun run lint — 6/6 pass
  • CLI-builder sync — 334/334 pass
  • Playwright test list — 5 tests discovered
  • Manual: E2E=1 bun test apps/cli/test/e2e/e2e.e2e.ts with one config
  • Manual: bun run test:smoke -- --preset tanstack-fullstack --dev-check --strict
  • Manual: cd apps/web && npx playwright test
  • Trigger workflow dispatch to validate CI

…and Playwright

Adds three new testing layers for runtime validation of generated projects:

**Layer 1: E2E Runtime Tests** (apps/cli/test/e2e/)
- Expanded from 3 to 9 test configs covering Next.js, Nuxt, SvelteKit,
  TanStack Start, React Router, Astro with both fullstack and standalone backends
- New startDevServer() runs turbo dev and validates frontend pages load
- checkFrontendPage() validates HTML, detects error patterns
- checkStaticAssets() verifies CSS/JS bundles load
- validateFrameworkPage() checks framework-specific markers

**Layer 2: Enhanced Smoke Tests** (testing/)
- Added --strict flag: dev-check failures become blocking (not advisory)
- 5 new presets: next-payload, astro-sanity, nuxt-fullstack, react-router-hono,
  tanstack-start-fullstack
- Improved HTML validation with framework-specific marker detection
- Empty body detection catches render failures

**Layer 3: Playwright Web Builder Tests** (apps/web/test/e2e/)
- Playwright configured with chromium, auto-starts dev server
- data-testid attributes added to stack builder and preview panel
- 5 test specs: builder load, CLI command display, URL state,
  preview file tree, URL sharing restoration

**CI Workflow** (.github/workflows/e2e-test.yaml)
- Nightly at 4am UTC + manual dispatch
- 3 parallel jobs: e2e-runtime, smoke-strict, playwright
- Artifact upload for debugging failures

Root scripts: test:e2e, test:smoke:strict, test:playwright
@vercel
Copy link

vercel bot commented Mar 22, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

1 Skipped Deployment
Project Deployment Actions Updated (UTC)
better-fullstack-web Ignored Ignored Preview Mar 22, 2026 4:06pm

…ification, and turbo wiring

Addresses gaps in testing coverage:

- CLI binary tests: spawn actual `node dist/cli.mjs` with --yes, --yolo,
  --ecosystem flags, verify project files are created correctly
- CLI interaction tests: test flag validation (incompatible combos rejected),
  ecosystem selection, directory conflict handling via spawned process
- TypeScript verification: typecheckProject() runs tsc --noEmit on generated
  projects to verify zero type errors
- Turbo pipeline: test:e2e and test:integration tasks added to turbo.json,
  `turbo test` now runs all test suites across all packages
- Root scripts: test:e2e (CLI), test:e2e:web (Playwright), test:integration

Test results: 8/8 interaction tests pass, 7/7 binary tests pass
Adds the 2 missing Playwright test files:
- compatibility.spec.ts: Convex disables options, Payload requires Next.js, Sanity works everywhere
- mobile.spec.ts: mobile viewport, no overflow, CLI command visible, landing page

Total: 13 Playwright tests across 5 spec files
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant