From 37246917b961bfe6ccc79655481c897a41a05946 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Thu, 15 Oct 2026 15:25:29 -0300 Subject: [PATCH] test: the folder check waits for the round to end before looking for half files 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 --- tests/browser_test.mjs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/browser_test.mjs b/tests/browser_test.mjs index aedc480..98d521f 100644 --- a/tests/browser_test.mjs +++ b/tests/browser_test.mjs @@ -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); } }