Fix date/time formatting to use es-ES locale
- Update all date/time formatting functions to use 'es-ES' locale instead of 'en-US' or 'de-DE' - Update utility functions in utils/date.ts and utils/exchange.ts - Update all component files that use date formatting - Update e2e test helper to match new Spanish date format - All formatting now uses Spanish locale regardless of selected language as per PR requirements
This commit is contained in:
parent
d2fc7d8850
commit
e35e79e84d
19 changed files with 146 additions and 50 deletions
|
|
@ -30,10 +30,23 @@ export async function clearAuth(page: Page) {
|
|||
await page.context().clearCookies();
|
||||
}
|
||||
|
||||
export async function setEnglishLanguage(page: Page) {
|
||||
// Set English language in localStorage
|
||||
await page.evaluate(() => {
|
||||
window.localStorage.setItem("arbret-locale", "en");
|
||||
});
|
||||
}
|
||||
|
||||
export async function loginUser(page: Page, email: string, password: string) {
|
||||
await page.goto("/login");
|
||||
// Set language after navigation to ensure localStorage is available
|
||||
await setEnglishLanguage(page);
|
||||
// Reload to apply language setting
|
||||
await page.reload();
|
||||
await page.fill('input[type="email"]', email);
|
||||
await page.fill('input[type="password"]', password);
|
||||
await page.click('button[type="submit"]');
|
||||
await page.waitForURL((url) => !url.pathname.includes("/login"), { timeout: 10000 });
|
||||
// Set language again after navigation to new page
|
||||
await setEnglishLanguage(page);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue