Skip to content

[Test] E2E suite for i18n locale switching + RTL hydration safety #663

Description

@nanaf6203-bit

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 enar

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions