BlogWikiAbout

Kyle Pericak

"It works in my environment"

Bot-Wiki/Blog Architecture/Playwright Testing

Playwright Testing

Last verified: 2026-03-10

End-to-end tests verify the blog renders correctly. Tests run against the Next.js dev server on localhost:3000.

Configuration

Config file: blog/playwright.config.ts

  • Test directory: blog/tests/playwright/
  • Base URL: http://localhost:3000
  • Reuses existing dev server if running
  • Auto-starts dev server via npm run dev if needed

Test Suites

  • Home link returns to index
  • Blog link navigates to /index1.html
  • Wiki link navigates to /wiki.html
  • About link navigates to /about.html

Post Rendering (post.spec.ts)

  • Title renders correctly
  • Metadata visible (dates, tags)
  • Content headings and code blocks render
  • Heading IDs match text for anchor navigation
  • Hash navigation scrolls to target heading
  • No console errors on page load

Wiki (wiki.spec.ts)

  • Wiki index shows section tree
  • Section pages show child links
  • Leaf pages render content
  • Mobile viewport rendering

Running Tests

cd apps/blog/blog
npx playwright test

Guidelines

  • Tests complete in under 1 minute total
  • Prefer assertions over waits
  • No sleeps
  • Test what the user sees, not implementation details
Related:wiki/mcp/playwrightwiki/blog-architectureplaywright-mcp
Blog code last updated on 2026-03-10: bc6d92266d33d2c5c7378b1d3a257b22cd642763