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:
counterweight 2025-12-26 11:38:17 +01:00
parent d2fc7d8850
commit e35e79e84d
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
19 changed files with 146 additions and 50 deletions

View file

@ -40,7 +40,10 @@ async function createInvite(request: APIRequestContext): Promise<string> {
}
test.describe("Authentication Flow", () => {
test.beforeEach(async ({ page }) => {
test.beforeEach(async ({ context, page }) => {
await context.addInitScript(() => {
window.localStorage.setItem("arbret-locale", "en");
});
await clearAuth(page);
});
@ -76,7 +79,10 @@ test.describe("Authentication Flow", () => {
});
test.describe("Signup with Invite", () => {
test.beforeEach(async ({ page }) => {
test.beforeEach(async ({ context, page }) => {
await context.addInitScript(() => {
window.localStorage.setItem("arbret-locale", "en");
});
await clearAuth(page);
});
@ -177,7 +183,10 @@ test.describe("Login", () => {
});
});
test.beforeEach(async ({ page }) => {
test.beforeEach(async ({ context, page }) => {
await context.addInitScript(() => {
window.localStorage.setItem("arbret-locale", "en");
});
await clearAuth(page);
});
@ -214,6 +223,12 @@ test.describe("Login", () => {
});
test.describe("Logout", () => {
test.beforeEach(async ({ context }) => {
await context.addInitScript(() => {
window.localStorage.setItem("arbret-locale", "en");
});
});
test("can logout and cannot access protected pages after logout", async ({ page, request }) => {
const email = uniqueEmail();
const inviteCode = await createInvite(request);
@ -241,6 +256,12 @@ test.describe("Logout", () => {
});
test.describe("Session Persistence", () => {
test.beforeEach(async ({ context }) => {
await context.addInitScript(() => {
window.localStorage.setItem("arbret-locale", "en");
});
});
test("session persists after page reload and cookies are managed correctly", async ({
page,
request,