diff --git a/web/test/medium/app.ts b/web/test/medium/app.ts index 3fb5b137a..6b2351b8a 100644 --- a/web/test/medium/app.ts +++ b/web/test/medium/app.ts @@ -161,8 +161,8 @@ const createTimeline = (page: Page, data: MockData) => { goToDate: async (asset: AssetResponseDto) => { await grid.hover(); await page.keyboard.press('g'); - const value = DateTime.fromISO(asset.fileCreatedAt, { zone: 'utc' }).toFormat('MMddyyyy,hh:mm:ss.SSSa'); - await page.locator('#datetime').pressSequentially(value); + const value = DateTime.fromISO(asset.fileCreatedAt, { zone: 'utc' }).toFormat("yyyy-MM-dd'T'HH:mm"); + await page.locator('#datetime').fill(value); await page.getByRole('button', { name: 'confirm', exact: true }).click(); }, diff --git a/web/test/medium/fixtures.ts b/web/test/medium/fixtures.ts index 9742786d9..badeafeca 100644 --- a/web/test/medium/fixtures.ts +++ b/web/test/medium/fixtures.ts @@ -58,6 +58,7 @@ export const test = base.extend({ await context.addInitScript(() => { if (location.protocol.startsWith('http')) { localStorage.setItem('lang', 'dev'); + localStorage.setItem('locale', 'en-US'); } }); await use(context); @@ -80,6 +81,9 @@ export const test = base.extend({ const mock = new Mock(context); await mock.install(workerPage); await use(mock); + if (workerPage.url().startsWith(baseURL!)) { + await workerPage.evaluate(() => localStorage.clear()); + } await mock.uninstall(); await context.clearCookies(); // skipped for failed tests so the report shows the real failure instead of the requests it never reached