From 9bbfa42cd4d2da703463c0858f489a61cd71ef41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cau=C3=AA=20Faleiros?= Date: Wed, 18 Nov 2026 12:09:20 -0300 Subject: [PATCH] test: the ready sheet's two copies count twice its trimmed metres MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The artwork browser test still expected 2 × 0,342 m for the test sheet with 19 cm empty at the bottom; with the empty strips cut (2d8d7c7) each copy is the trimmed height. Co-Authored-By: Claude Opus 5.5 (1M context) --- tests/artwork_browser_test.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/artwork_browser_test.mjs b/tests/artwork_browser_test.mjs index befc2bf..4333df4 100644 --- a/tests/artwork_browser_test.mjs +++ b/tests/artwork_browser_test.mjs @@ -347,7 +347,7 @@ try{ // With a sheet loaded the declaration is locked; it cannot flip under the customer. assert.equal(await evaluate(`document.querySelector('#tipoEnvio .cam[data-tipo="avulsa"]').disabled`),true); await evaluate(`(()=>{const el=$('lista').querySelector('[data-repf]');el.value=2;el.dispatchEvent(new Event('change',{bubbles:true}));})()`); - await waitFor(()=>evaluate('metros===0.684'),'ready-sheet repetitions'); + await waitFor(()=>evaluate('Math.abs(metros-2*folhas[0].m)<0.0001 && folhas[0].m<0.2'),'ready-sheet repetitions'); assert.equal(await evaluate(`document.querySelectorAll('.folhaPrevia').length`),1); await evaluate(`(()=>{folhas.push({f:new File(['manual'],'manual.cdr'),med:null,rep:1,m:1,an:null});pintaFolha();})()`); await waitFor(()=>evaluate(`itemAtual?.nota===0 && itemAtual?.unit===PRECO[modo]+TAXA_MANUAL`),'mixed analyzed and manual sheets: the price plus the manual charge');