From db2b06a74cdf0860bbdcbdbe938790e062ebf771 Mon Sep 17 00:00:00 2001 From: 4gray Date: Wed, 14 Oct 2026 02:33:44 +0200 Subject: [PATCH] test(e2e): find a finished programme for the phone dialog after UTC midnight The Xtream mock lays its 30-minute EPG slots out relative to now, and the list view shows the programmes that overlap the selected day. In the first half hour after midnight (the spec pins TZ=UTC) today holds only the programme on air, so 'stacks the programme dialog actions on a phone' found no data-when=past row and failed every retry on #1929's Windows shard (00:18-00:23 UTC). The spec now waits for the list, and steps back a day when today has no finished programme yet. Co-Authored-By: Claude Opus 5.5 --- .../src/epg-timeline-interaction.e2e.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/apps/electron-backend-e2e/src/epg-timeline-interaction.e2e.ts b/apps/electron-backend-e2e/src/epg-timeline-interaction.e2e.ts index e50145ea3..8b1fc7488 100644 --- a/apps/electron-backend-e2e/src/epg-timeline-interaction.e2e.ts +++ b/apps/electron-backend-e2e/src/epg-timeline-interaction.e2e.ts @@ -331,6 +331,7 @@ test('@epg @xtream @electron stacks the programme dialog actions on a phone', as ) as { WORKSPACE: { SHELL: { RAIL_LIVE: string } }; EPG: { + PREVIOUS_DAY: string; PROGRAM_DIALOG: { SHOW_PROGRAM_DETAILS: string }; TIMELINE: { WATCH_FROM_START: string }; }; @@ -365,6 +366,15 @@ test('@epg @xtream @electron stacks the programme dialog actions on a phone', as .first() .click(); const guide = app.mainWindow.locator('app-epg-list-view'); + await expect(guide.locator('[data-when="now"]').first()).toBeVisible(); + // The mock's 30-minute slots run relative to now, so in the first half + // hour after UTC midnight today holds only the programme on air: step + // back a day for a finished one. + if ((await guide.locator('[data-when="past"]').count()) === 0) { + await guide + .getByRole('button', { name: fr.EPG.PREVIOUS_DAY }) + .click(); + } await expect(guide.locator('[data-when="past"]').first()).toBeVisible(); // The window cannot shrink below its desktop minimum, so emulate a