diff --git a/tests/browser_test.mjs b/tests/browser_test.mjs index 4a4b421..4e9eef0 100644 --- a/tests/browser_test.mjs +++ b/tests/browser_test.mjs @@ -142,7 +142,9 @@ try{ await site.click('[data-sel="0"]'); assert.equal(await site.eval('pedido[0].marcado===true && itensAPagar().length===1'),true); assert.equal(await site.eval(`Math.abs(pedido[0].total-${total})<0.005`),true); - assert.equal(await site.eval('document.getElementById("bPagar").disabled'),false); + // The freight quote and the customer checks arrive on their own time: wait + // for Pagar to open instead of reading it once (CI run 356). + await waitFor(()=>site.eval('!document.getElementById("bPagar").disabled'),'Pagar enabled'); await site.click('#bPagar'); try{ // A cart the Site can price is approved at once: the customer pays now.