From ee0db89be8b2823331cb741dabbeea2f19d4fe3a Mon Sep 17 00:00:00 2001 From: 4gray Date: Sat, 3 Oct 2026 09:12:59 +0200 Subject: [PATCH] test(web-e2e): assert M3U movie metadata in the visible About block The recognized-movie spec checked TMDB metadata with `.first()`, which resolves to the hero copy. The shell mounts in watch state and its collapsed hero turns `visibility: hidden` 300ms later, so the assertion passed only when the routed TMDB lookup answered within that window. Under parallel workers the lookup sometimes takes 300-500ms and the test failed with "hidden". The race predates the recent master commits: adb4889b0 fails the same way, and a timing probe shows identical metadata/collapse timings there and on b6357da6a. Scope the assertions to the watch-state About block, the copy a watching user actually sees. Co-Authored-By: Claude Opus 5.5 --- apps/web-e2e/src/m3u-movie-details.e2e.ts | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/apps/web-e2e/src/m3u-movie-details.e2e.ts b/apps/web-e2e/src/m3u-movie-details.e2e.ts index 7c45b82ed..6849c5ef0 100644 --- a/apps/web-e2e/src/m3u-movie-details.e2e.ts +++ b/apps/web-e2e/src/m3u-movie-details.e2e.ts @@ -345,17 +345,15 @@ test('@web @m3u @tmdb recognized movies open the VOD detail view', async ({ ).toEqual(['app-html-video-player']); // Metadata patches the mounted view asynchronously. The shell stamps the - // host templates into BOTH the hero and the watch-state About block, so - // every metadata string legitimately resolves twice. + // host templates into BOTH the hero and the watch-state About block, but + // the collapsed hero turns `visibility: hidden` 300ms after mount, + // sometimes before TMDB answers. Assert the copy a watching user sees. + const about = detail(page).locator('app-content-about'); await expect( - detail(page).getByText('Paul Atreides arrives on Arrakis.').first() - ).toBeVisible(); - await expect( - detail(page).getByText('Denis Villeneuve').first() - ).toBeVisible(); - await expect( - detail(page).getByText('Science Fiction').first() + about.getByText('Paul Atreides arrives on Arrakis.') ).toBeVisible(); + await expect(about.getByText('Denis Villeneuve')).toBeVisible(); + await expect(about.getByText('Science Fiction')).toBeVisible(); // A live channel keeps the classic layout. await sidebarEntry(page, 'Live One').click();