diff --git a/scripts/verify-full.js b/scripts/verify-full.js index 36f7f39..66f9ea9 100644 --- a/scripts/verify-full.js +++ b/scripts/verify-full.js @@ -37,7 +37,14 @@ try { await page.locator("#layer").fill("300"); await page.locator("#slow-layer").click(); const previous = await page.locator("#timeline").inputValue(); - await page.waitForTimeout(800); + const previousPosition = await page.locator('#command-position').textContent(); + await page.waitForFunction( + ({ previous, previousPosition }) => + document.querySelector('#timeline').value !== previous && + document.querySelector('#command-position').textContent !== previousPosition, + { previous, previousPosition }, + { timeout: 15000 }, + ); assert.notEqual(await page.locator("#timeline").inputValue(), previous); await page.locator('[data-technology="nozzle"]').click(); await page.locator("#disassemble").click();