import { expect, test } from '@playwright/test'; /** * Verifies the language picker in `/account` round-trips: switch from * Spanish to English, the page reloads to the `/en/` bundle and the * "Apply" button is visible (it reads "Aplicar" in es); switch back and * the URL returns to `/es/`. This guards the i18n subpath wiring (the * `window.location.assign('/' + newPrefix + ...)` in AuthService) and the * server-side persistence of `User.PreferredLanguage` together. * * Resets the user back to `es-ES` before exiting so the rest of the suite * (which assumes Spanish copy) keeps working on subsequent runs. */ test('language picker switches bundles and persists', async ({ page }) => { // The