From 2fcec0b809f3163e9697219f454d8c8c0e9d29dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Thu, 26 Nov 2026 12:16:10 -0300 Subject: [PATCH] test: wait for Pagar to open instead of reading it once (CI run 356) Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/browser_test.mjs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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.