diff --git a/apps/web-e2e/src/stalker-category-search.fixture.ts b/apps/web-e2e/src/stalker-category-search.fixture.ts index 8b08548ba..166380797 100644 --- a/apps/web-e2e/src/stalker-category-search.fixture.ts +++ b/apps/web-e2e/src/stalker-category-search.fixture.ts @@ -14,7 +14,8 @@ export async function verifyStalkerCategorySearch(page: Page): Promise { const firstNames = await sidebarRows .locator('.channel-name') .allTextContents(); - await sidebarRows.first().click(); + // All Items already started playback earlier in this workflow. Retain that + // settled selection; clicking again would introduce a pending replacement. const player = page.locator('app-web-player-view'); await expect(player).toBeVisible(); const video = player.locator('video').first(); diff --git a/apps/web-e2e/src/stalker.e2e.ts b/apps/web-e2e/src/stalker.e2e.ts index fa75e188d..2cc2c0609 100644 --- a/apps/web-e2e/src/stalker.e2e.ts +++ b/apps/web-e2e/src/stalker.e2e.ts @@ -707,7 +707,7 @@ test('@stalker ITV full channel list loads via get_all_channels and search cover await categories.nth(1).click(); - const channels = page.locator('[data-test-id="channel-item"]'); + const channels = page.locator('#live-channels [data-test-id="channel-item"]'); await expect(channels.first()).toBeVisible({ timeout: 20_000 }); // Regression for "search only finds the first 14 loaded items": once the @@ -717,6 +717,7 @@ test('@stalker ITV full channel list loads via get_all_channels and search cover timeout: 20_000, }); await expect.poll(() => allChannelsRequests.length).toBeGreaterThan(0); + const firstCategoryNames = await channels.locator('.channel-name').allTextContents(); // Regression: switching to another category once the full list is cached // must serve that category from the cache, not get stuck on an empty @@ -739,6 +740,10 @@ test('@stalker ITV full channel list loads via get_all_channels and search cover timeout: 20_000, }); + // Counts are identical across categories; wait for the actual category + // rows before choosing a search term, or it may come from the previous one. + await expect(channels.locator('.channel-name')).toHaveText(firstCategoryNames); + // Search a channel from deep in the list (beyond the first 14 items). const deepChannelName = ( await channels.nth(30).locator('.channel-name').textContent()