test(stalker): wait for category rows and retain settled playback

This commit is contained in:
4gray committed 2026-09-06 08:26:53 +02:00
1 parent a81a2f8f57
commit e983461b66
2 files changed
+8 -2

No files matched your search

@@ -14,7 +14,8 @@ export async function verifyStalkerCategorySearch(page: Page): Promise<void> {
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();
+6 -1
View File
@@ -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()