Repository navigation
feat(test): add route-level visual regression coverage across locales and themes (#220) - #231
Merged
truthixify merged 11 commits intoNov 23, 2026
Conversation
…fects Add deterministic Playwright visual coverage across desktop and mobile widths, dark and light themes, and en plus longest translated locale es. Fix Governance missing team images, Contributors light-theme contrast, and Chains mobile card overflow while keeping runtime artifacts outside the repository. Refs wraith-protocol#220
Add reviewed Ubuntu Chromium visual baselines (part 1 of 5).
Add reviewed Ubuntu Chromium visual baselines (part 2 of 5).
Add reviewed Ubuntu Chromium visual baselines (part 3 of 5).
Add reviewed Ubuntu Chromium visual baselines (part 4 of 5).
Add reviewed Ubuntu Chromium visual baselines (part 5 of 5). Closes wraith-protocol#220
|
@khoap1220-hue is attempting to deploy a commit to the truthixify's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@khoap1220-hue Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
…28-route coverage Harden CI runtime artifact detection for gitignored Playwright report directories, isolate visual CLI invocation in playwright.config.ts, deduplicate retried checks in VisualRegressionReporter, refine layout-shift origin attribution in region-diff, fix light-theme contrast tokens in Chains/Vitals/Status/Security, and enroll all 28 App routes (148 baselines). Refs wraith-protocol#220
Add reviewed Ubuntu Chromium baselines for newly enrolled route families (part 1 of 2).
Add reviewed Ubuntu Chromium baselines for newly enrolled route families (part 2 of 2). Refs wraith-protocol#220
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In
playwright.config.ts,playwright.visual.config.ts, andtests/visual/, Playwright previously rane2e-chromiumanda11y-chromiumwithreporter: 'html'and defaulttest-results/output without route-level visual regression coverage across locales, themes, and viewports.Summary of Changes
Full 28-Route Visual Inventory & Locale/Theme/Viewport Matrix (
tests/visual/route-inventory.ts,tests/visual/routes.visual.spec.ts):<Route>patterns declared insrc/App.tsx(enforced by unit parity check intests/visual-regression.test.ts) across reusable layout families (landing-home,protocol-showcase,program-accordion,editorial-index,editorial-detail,editorial-archive,author-profile,card-catalog,case-study-detail,interactive-tool,responsive-table,responsive-matrix-table,telemetry-dashboard,status-telemetry,standalone-form,team-governance,leaderboard-grid,brand-press-kit,partner-ecosystem-grid,milestone-timeline,privacy-comparison-legal,security-disclosures,minimal-standalone,standard-layout-page,error-fallback).src/i18n/*.json(resolveLongestTranslatedLocale()->esat 11,648 UI chars vsptat 11,512 UI chars) alongsideen, generating 148 reviewed Ubuntu Chromium baselines intests/visual/__screenshots__/acrossdesktop(1280x800) andmobile(390x844) widths anddark/lightthemes.Deterministic Stabilization & Narrow Dynamic Masking (
tests/visual/stabilize.ts):page.clockto2026-01-15T12:00:00.000Z(UTC), stubs nondeterministicPerformanceObserverlive RUM overrides on/vitals, disables CSS animations/transitions/marquee/pulse, triggersIntersectionObserver([data-reveal]) andReact.lazychunks, waits for self-hosted.woff2fonts (document.fonts.ready), and intercepts Soroban RPC (getHealth/getEvents), Plausible, status/uptime endpoints, and external avatars with deterministic fixtures.StellarMetricslive counts,TrustStriplive uptime figure,/vitalsrolling axis dates, and optional env-gated/statuspoll timestamp/latency) with non-zero match validation on required masks and a strict<= 8%viewport-area guard on each mask.Changed-Region Attribution & Zero Outside-Baseline Runtime Artifacts (
tests/visual/region-diff.ts,tests/visual/visual-reporter.ts,playwright.config.ts,.github/workflows/ci.yml):node:zlibon screenshot mismatch to compute the diff bounding box, prunes broad wrapper containers, attributes vertical layout shifts to the shift-origin DOM region (header,hero,compare-table,stellar-deployment-table,threat-model-matrix,vitals-rolling-chart,footer, etc.), and deduplicates retried checks inVisualRegressionReporterwhen emitting reports that nameroute,locale,theme,viewport, andchangedRegion.isVisualCliInvocation(process.argv.slice(2))inplaywright.config.ts, routes Playwright runtimeoutputDirtoos.tmpdir()(removing the trackedtest-results/.last-run.jsonartifact and addingtest-results/+blob-report/to.gitignore), adds thePlaywright Visual Gatejob in.github/workflows/ci.ymlchecking both gitignored runtime directories (playwright-report/,test-results/,blob-report/) and untracked/modified workspace files outsidetests/visual/__screenshots__/, and bumpsfollow-redirectsoverride to1.16.3(GHSA-mrwp-f3q8-3g9p) forpnpm audit --prod --audit-level=high.Visual & Theme Contrast Defects Caught & Resolved During Baseline Review:
src/pages/Governance.tsx: Replaced missing/team/*.jpg<img>tags (naturalWidth === 0broken images) with deterministic initials badges matchingsrc/pages/About.tsx.src/pages/Contributors.tsx,src/pages/Chains.tsx,src/pages/Vitals.tsx,src/pages/Status.tsx,src/pages/Security.tsx: Replaced raw dark-only palette hexes and non-token classes with design-system tokens (text-on-surface,text-on-surface-variant,text-tertiary,bg-tertiary-10,text-error,bg-error-10,bg-surface-container,border-outline-variant) for WCAG AA contrast across bothdarkandlightthemes, plus avatar fallback onContributors.tsx.src/components/Chains.tsx: Fixed 22px horizontal document overflow on390x844mobile (/and/es) caused by an unwrapped three-item flex header insidegrid-cols-2cards, updatingpublic/sitemap.xmlfor touched page sources.Verification
pnpm format:check,pnpm lint:i18n,pnpm validate:content,pnpm check:sitemap,pnpm validate:jsonld,pnpm audit --prod --audit-level=highpnpm build,pnpm test:a11y,pnpm test:smoke,vitest run tests/visual-regression.test.ts(12/12 unit tests passing)pnpm test:visual(148/148 route/locale/theme/viewport baselines passing across all 28 routes with zero broken images, zero horizontal overflow, zero light/dark contrast regressions, and zero workspace runtime artifacts)Closes #220