(app-desk) add luxon to display date

Add luxon to display date in the team description.
The date are internationalized and formatted as the
mockup requested.
This commit is contained in:
Anthony LC
2024-02-19 16:02:44 +01:00
committed by Anthony LC
parent f21740e5e5
commit b307b373bb
5 changed files with 42 additions and 4 deletions

View File

@@ -33,7 +33,15 @@ test.describe('Team', () => {
await expect(page.getByText(`1 member`)).toBeVisible();
await expect(page.getByText(`Created at 06/02/2024`)).toBeVisible();
await expect(page.getByText(`Last update at 07/02/2024`)).toBeVisible();
const today = new Date(Date.now());
const todayFormated = today.toLocaleDateString('en', {
month: '2-digit',
day: '2-digit',
year: 'numeric',
});
await expect(page.getByText(`Created at ${todayFormated}`)).toBeVisible();
await expect(
page.getByText(`Last update at ${todayFormated}`),
).toBeVisible();
});
});