From 189daea3faff70f35447f02588fecec746485e54 Mon Sep 17 00:00:00 2001 From: 4gray Date: Fri, 22 May 2026 14:59:10 +0300 Subject: [PATCH] test(electron): align xtream epg schedule expectation --- .../src/xtream-epg.e2e.ts | 19 +------------------ 1 file changed, 1 insertion(+), 18 deletions(-) diff --git a/apps/electron-backend-e2e/src/xtream-epg.e2e.ts b/apps/electron-backend-e2e/src/xtream-epg.e2e.ts index 000d74894..6d2fb6506 100644 --- a/apps/electron-backend-e2e/src/xtream-epg.e2e.ts +++ b/apps/electron-backend-e2e/src/xtream-epg.e2e.ts @@ -12,7 +12,6 @@ import { } from './electron-test-fixtures'; import { fetchXtreamEpgFixture, - XtreamEpgFixture, XtreamNormalizedEpgListing, } from './portal-mock-fixtures'; @@ -87,7 +86,7 @@ for (const timeZone of ['UTC', 'Europe/Berlin'] as const) { }); const currentDateKey = formatDateKeyInZone(Date.now(), timeZone); - const currentDayTitles = visibleTitlesForCurrentDate( + const currentDayTitles = titlesForDate( fixture.fullEpg, currentDateKey, timeZone @@ -184,22 +183,6 @@ function titlesForDate( .map((listing) => listing.title); } -function visibleTitlesForCurrentDate( - listings: XtreamNormalizedEpgListing[], - currentDateKey: string, - timeZone: string -): string[] { - const nowSeconds = Math.floor(Date.now() / 1000); - - return listings - .filter( - (listing) => - formatDateKeyInZone(listing.startTimestamp * 1000, timeZone) === - currentDateKey && listing.stopTimestamp >= nowSeconds - ) - .map((listing) => listing.title); -} - function getFirstFutureDateKey( listings: XtreamNormalizedEpgListing[], currentDateKey: string,