mirror of
https://github.com/bilawalsidhu/gods-eye-view.git
synced 2026-11-04 10:24:02 +00:00
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 <[email protected]>
This commit is contained in:
1 parent
4d88dd29f5
commit
4e7c5c24e1
1 file changed
+7
@@ -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) =>
|
||||
[
|
||||
|
||||
Reference in new issue
Block a user