- Translate LoadingState and EmptyState components (common namespace) - Translate Header navigation labels (navigation namespace) - Translate StatusBadge trade status labels (exchange namespace) - Create navigation.json translation files for es, en, ca - Create exchange.json translation files for status/direction/transfer labels - Update IntlProvider to load navigation and exchange namespaces - Update frontend tests to expect Spanish translations (default language) - Configure Playwright to use English language for e2e tests via storageState - Fix test expectations to match translated strings All frontend and e2e tests passing.
12 lines
362 B
TypeScript
12 lines
362 B
TypeScript
import { Page } from "@playwright/test";
|
|
|
|
/**
|
|
* Set language to English for e2e tests.
|
|
* E2E tests should only test in English according to requirements.
|
|
* Call this in beforeEach hooks in test files.
|
|
*/
|
|
export async function setEnglishLanguage(page: Page) {
|
|
await page.addInitScript(() => {
|
|
window.localStorage.setItem("arbret-locale", "en");
|
|
});
|
|
}
|