Desktop boot check: scroll live art tiles one by one and wait for each lazy thumbnail
This commit is contained in:
parent
011c2698a4
commit
2f25f76377
2 changed files with 3 additions and 1 deletions
|
|
@ -3,6 +3,8 @@
|
|||
|
||||
## Unreleased
|
||||
|
||||
- Desktop v2 ships (0.8.33 and 0.8.34 stopped at the desktop boot check, which still expected the old markup).
|
||||
|
||||
- Desktop v2 ships (0.8.33 stopped at the desktop boot check, which still expected the old markup).
|
||||
|
||||
## 0.8.33 · 2026-10-22
|
||||
|
|
|
|||
|
|
@ -1070,7 +1070,7 @@ async function runLiveArtCase(browser: Browser, sidecar: Sidecar): Promise<CaseR
|
|||
// nothing is read from the stores until asked (auto-read is off in the saved state)
|
||||
await page.locator('#live-art button', { hasText: 'Read the stores' }).click({ timeout: WAIT_MS }).catch(e => problems.push(`no "Read the stores" button: ${String(e).split('\n')[0]}`));
|
||||
// thumbnails load lazily when a tile comes into view, so scroll each one in like a person would
|
||||
await page.evaluate(() => document.querySelectorAll('#live-art [data-live-tile]').forEach(e => e.scrollIntoView({ block: 'center' })));
|
||||
for (const tile of await page.locator('#live-art [data-live-tile]').all()) { await tile.scrollIntoViewIfNeeded().catch(() => {}); await page.waitForFunction(el => !!el?.querySelector('img[src^="data:image/"]'), await tile.elementHandle(), { timeout: 3000, polling: 50 }).catch(() => {}); }
|
||||
const drawn = await page.waitForFunction(() => document.querySelectorAll('#live-art [data-live-tile] img[src^="data:image/"]').length >= 2, null, { timeout: WAIT_MS, polling: 50 }).then(() => true, () => false);
|
||||
if (!drawn) problems.push(`live thumbnails not drawn (${(await text('#live-art')).slice(0, 300)})`);
|
||||
const live = await text('#live-art');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue