test: the folder check waits for the round to end before looking for half files
All checks were successful
Build and deploy / Validate source (push) Successful in 16s
Build and deploy / Integration suite on a real stack (push) Successful in 4m22s
Build and deploy / Secret scan and release gate (push) Successful in 12s
Build and deploy / Publish images (push) Successful in 1m23s

In CI the browser test failed on "no .baixando file left": the earlier
suites leave other orders in the print queue, and the folder was still
downloading one of them when the test's own file had arrived. The check now
waits until the folder's round is over, which is what it means to assert.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Cauê Faleiros
2026-10-15 15:25:29 -03:00
parent a747d9a968
commit 37246917b9

View File

@@ -206,6 +206,9 @@ try{
// Entering the queue saves its final file there, whole and named after the order.
const prefix='pedido-'+await kanban.eval(`board.orders.find(o=>o.id==='${oid}').number`)+'-item-1';
await waitFor(async()=>(await savedFiles()).some(n=>n.startsWith(prefix)&&!n.endsWith('.baixando')),'final file saved in the folder',45000);
// Other orders the earlier suites left in the queue may still be coming
// down: only once the round ends must no half-written file be left.
await waitFor(()=>kanban.eval('!FOLDER.busy'),'folder round finished',60000);
assert.equal((await savedFiles()).some(n=>n.endsWith('.baixando')),false);
}
}