test: wait for Pagar to open instead of reading it once (CI run 356)
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 7m58s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m31s

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-11-26 12:16:10 -03:00
parent 6d8dbf24ff
commit 2fcec0b809

View File

@@ -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.