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