From 4e7c5c24e12948a960f7b614846f5cf55fc091c9 Mon Sep 17 00:00:00 2001 From: Said Turksever Date: Thu, 15 Oct 2026 16:06:30 +0100 Subject: [PATCH] test(street-level): settle coverage before reading the ON/OFF pill The pill step read #sl-status straight after the credit wait. Tiles requested while Cesium painted the credit can flip it back to LOADING, which failed CI on PR #1038 (actual 'BUTTON:LOADING:true'). Wait for coverage to settle and the pill to read ON before asserting. Co-Authored-By: Claude Opus 5.5 --- scripts/qa-street-level.mjs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/qa-street-level.mjs b/scripts/qa-street-level.mjs index c47a3f9f8..2c394d473 100644 --- a/scripts/qa-street-level.mjs +++ b/scripts/qa-street-level.mjs @@ -1321,6 +1321,13 @@ async function main() { await step( 'the header ON/OFF pill switches the layer off and on', async () => { + // Tiles requested while the credit painted can flip the pill back + // to LOADING, so let coverage settle before reading it. + await waitForCoverage(page); + await settle( + page, + () => document.getElementById('sl-status').textContent === 'ON', + ); assert.equal( await page.$eval('#sl-status', (node) => [