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');