Problem Statement
i18n switching is lightly covered. tests/ has no Playwright spec that asserts:
- A user's locale choice persists in
localStorage['i18nextLng']
- Switching to
ar flips dir="rtl" on <html>
- Hydration does not mismatch when navigating
en → ar
Why It Matters
Wrong RND-layout hydration crashes are a known pain-point. Missing locale persistence hits SEO (search engines see stale content) and users waste time re-selecting.
Acceptance Criteria
- New spec asserts locale-switch round-trip
- Hydration warning capture via Playwright becomes zero on the i18n path
- RTL screenshots verified
Implementation Notes
Uses existing playwright.config.ts webServer setup. Use page.evaluate() to assert dir after click.
Files Likely Affected
tests/e2e/i18n.spec.ts (new)
src/components/LanguageSwitcher.tsx
Difficulty / Effort
- Difficulty: Easy
- Effort: T-Shirt M
Labels
test, priority:medium, area:i18n
Problem Statement
i18n switching is lightly covered.
tests/has no Playwright spec that asserts:localStorage['i18nextLng']arflipsdir="rtl"on<html>en→arWhy It Matters
Wrong RND-layout hydration crashes are a known pain-point. Missing locale persistence hits SEO (search engines see stale content) and users waste time re-selecting.
Acceptance Criteria
Implementation Notes
Uses existing
playwright.config.tswebServer setup. Usepage.evaluate()to assertdirafter click.Files Likely Affected
tests/e2e/i18n.spec.ts(new)src/components/LanguageSwitcher.tsxDifficulty / Effort
Labels
test,priority:medium,area:i18n