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 <noreply@anthropic.com>
This commit is contained in:
4grayandClaude Opus 5.5 committed 2026-10-03 09:12:59 +02:00
1 parent 23a1860119
commit ee0db89be8
1 file changed
+7 -9
+7 -9
View File
@@ -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();