Skip to content

test: add dir="rtl" Playwright smoke test for dashboard shell (Closes #821) - #1149

Open
waterWang wants to merge 1 commit into
Stellopay:mainfrom
waterWang:feat/rtl-dashboard-smoke-test
Open

test: add dir="rtl" Playwright smoke test for dashboard shell (Closes #821)#1149
waterWang wants to merge 1 commit into
Stellopay:mainfrom
waterWang:feat/rtl-dashboard-smoke-test

Conversation

@waterWang

Copy link
Copy Markdown

Summary

Closes #821 — add a Playwright smoke test that forces dir="rtl" on the root <html> element and loads the /dashboard route.

What it checks

  1. No page-level horizontal overflow — asserts document.documentElement.scrollWidth <= clientWidth. When RTL breaks a layout, the document grows wider than the viewport and a horizontal scrollbar appears.
  2. No child element pokes past the viewport edges — iterates every visible element and fails if any getBoundingClientRect() extends beyond the viewport width (the classic RTL clipping signal). Hidden / off-screen / zero-size elements are skipped to avoid false positives.
  3. Screenshot artifact — captures a full-page screenshot to __screenshots__/rtl-dashboard.png for manual visual review by the team.

Why this helps

RTL readiness currently has zero automated coverage — regressions in overflow, misaligned icons, or clipped text would only be caught manually. This test gives us a deterministic guard ahead of eventual locale support.

Test file

  • e2e/rtl-dashboard.spec.ts — new Playwright spec (91 lines)

How to run

npx playwright test e2e/rtl-dashboard.spec.ts

The test uses page.addInitScript to set dir="rtl" before the app boots, so the assertion runs against a genuinely RTL document.

@vercel

vercel Bot commented Aug 10, 2026

Copy link
Copy Markdown
Contributor

@waterWang is attempting to deploy a commit to the Jagadeesh B's projects Team on Vercel.

A member of the Team first needs to authorize it.

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.

Add a dir="rtl" Playwright smoke test rendering the dashboard shell without clipped content

1 participant