Layer 5b: Content Regression Tests — No Raw JSON, No Broken Labels, No Placeholders #57
Labels
No labels
meeting-notes
meeting-sensitive
meeting-transcript
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
coopcloud_code/home#57
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Problem
Our 7-layer test pyramid has a critical gap between API tests (Layer 3) and visual screenshots (Layer 7). API tests verify the backend sends correct data. Visual tests catch layout shifts. But zero tests verify what the user actually reads on the rendered page.
This gap allowed a bug to ship where the product detail Specifications table displayed raw JSON objects (
{"attribute_type":"Number","display_order":3,...}) instead of human-readable values (8,32 GB,Germany). All 176 API tests passed. All 17 visual snapshots passed. The bug was caught by a human looking at the page.Root Cause Analysis
Current Playwright tests check:
Current Playwright tests do NOT check:
8not{"attribute_type":...}) ✗CPU CoresnotCpu_cores) ✗$154.00notundefined) ✗Solution: Content Regression Suite
New Playwright test file:
tests/playwright/tests/content-regression.spec.tsThis test crawls every SPA page and asserts the rendered content is correct.
Test 1: No Raw JSON in Visible Text
For every page, assert that no visible table cell, paragraph, or heading contains raw JSON objects.
Test 2: No Snake_Case Labels in UI
Assert no visible text contains snake_case patterns that should be humanized.
Test 3: No Placeholder Text in Production
Assert no "will appear here", "lorem ipsum", "TODO", "coming soon" in rendered pages.
Test 4: Product Detail Has Real Specs
Navigate to a product, verify specs table has numeric/text values.
Test 5: Wallet Shows Formatted Balance
Test 6: Marketplace Cards Have Price and Name
Test 7: Empty States Handled Gracefully
Navigate as a fresh user to orders, messaging, etc. and verify friendly empty state messages.
Test 8: All 44 Routes Render (No Panics, No Blank Pages)
Crawl every SPA route and verify minimum content length, no WASM panics, no router debug output.
Pages to Cover
Public (unauthenticated)
/(home)/marketplace+ each category (/marketplace/compute, etc.)/products/:id(at least 3 products)/docs+/docs/:topic/login,/register/about,/privacy,/terms,/contact,/changelog,/roadmapAuthenticated (after register/login)
/dashboard/wallet(balance + transactions)/orders(empty + after purchase)/cart(empty + with items)/messaging(empty state)/profile,/settings/dashboard/nodes,/dashboard/services,/dashboard/apps/poolsUpdated Test Pyramid
Acceptance Criteria
content-regression.spec.tsmake test-e2epipelineReferences
tests/playwright/tests/marketplace-e2e.spec.ts(48 tests)tests/playwright/tests/admin-e2e.spec.ts(41 tests)— mik-tf
Done. 53 Playwright content regression tests in
tests/playwright/tests/content-regression.spec.ts.Covers all 44 SPA routes:
All 53 pass against dev-app.projectmycelium.org after deploy.
Total test pyramid: 318 tests (265 + 53 new).