diff --git a/tests/artwork_browser_test.mjs b/tests/artwork_browser_test.mjs
index 4149a72..a204844 100644
--- a/tests/artwork_browser_test.mjs
+++ b/tests/artwork_browser_test.mjs
@@ -615,6 +615,24 @@ try{
}finally{carregarPdfJs=realLoader;window.setTimeout=realTimer;temWorker=realWorker;}
})()`);
assert.deepEqual(timeoutCleanup,{timedOut:true,destroyed:true});
+ // Proof pop-up (Marcus, 2026-12-02): only above 10 m, not mandatory; closing
+ // it is going on without a proof, and the cart summary follows the answer.
+ assert.deepEqual(await evaluate(`[pedidoLongo([{cob:10}]),pedidoLongo([{cob:6},{cob:4.5}])]`),[false,true]);
+ assert.equal(await evaluate(`perguntaProva()`),false);
+ assert.equal(await evaluate(`$('provaDlg').open`),false);
+ await evaluate(`window.provaLongo=pedidoLongo; pedidoLongo=()=>true; window.provaResp=perguntaProva(); 1`);
+ await waitFor(()=>evaluate(`$('provaDlg').open && document.activeElement.id==='provaSim'`),'proof pop-up opens');
+ assert.equal(await evaluate(`perguntaProva()`),null);
+ await click('#provaSim');
+ assert.equal(await evaluate(`window.provaResp`),true);
+ assert.equal(await evaluate(`querProva && $('resLin').textContent.includes('Prova antes de imprimir')`),true);
+ await evaluate(`window.provaResp=perguntaProva(); 1`);
+ await click('#provaNao');
+ assert.equal(await evaluate(`window.provaResp`),false);
+ assert.equal(await evaluate(`$('resLin').textContent.includes('Prova antes de imprimir')`),false);
+ await evaluate(`window.provaResp=perguntaProva(); $('provaDlg').close(); 1`);
+ assert.equal(await evaluate(`window.provaResp`),false);
+ await evaluate(`pedidoLongo=window.provaLongo; 1`);
// Inspect the supplied local artwork, when requested, using the real file input.
if(process.env.ARTWORK_FILE){
await click('#bVoltar');await click('[data-modo="file"]');
@@ -629,6 +647,6 @@ try{
console.log('Supplied image:',JSON.stringify(layout));
}
assert.deepEqual(errors,[]);
- console.log('PASS: PNG upload and drop, JPG refused, packed copies, 5 mm gaps, aspect ratio, live width/quantity/rotation/mirror, metres, ready-sheet pricing/repeats, residue and solid background stop the order, UV, stale renders, strict inline CSP.');
+ console.log('PASS: PNG upload and drop, JPG refused, packed copies, 5 mm gaps, aspect ratio, live width/quantity/rotation/mirror, metres, ready-sheet pricing/repeats, residue and solid background stop the order, UV, proof pop-up above 10 m, stale renders, strict inline CSP.');
}catch(error){console.error(error);if(stderr)console.error(stderr.slice(-1200));process.exitCode=1;}
finally{ws?.close();chrome.kill();server.closeAllConnections();await new Promise(r=>server.close(r));}
diff --git a/web/checkout.js b/web/checkout.js
index 520225d..28b25a5 100644
--- a/web/checkout.js
+++ b/web/checkout.js
@@ -526,6 +526,8 @@
const totalArquivos=item=>(item.localFiles||[]).length+(item.savedFiles||[]).length;
if (semCap.some(item=>totalArquivos(item)>200))
return message('Este item tem mais de 200 arquivos. Divida em dois itens.','error');
+ // Above 10 m the pop-up asks for the proof; the answer is part of the order.
+ if ((await perguntaProva())===null || busy) return;
const initialCart=cartSnapshot();
busy = true;
$('bPagar').disabled = true;
@@ -576,8 +578,8 @@
...(cupom?{coupon:cupom}:{})};
const destination = destinoApi();
if (destination) content.destination = destination;
- // "Quero aprovar uma prova antes de imprimir": the order waits for the customer.
- if ($('fProva')?.checked) content.proof = true;
+ // "Quero aprovar uma prova", chosen in the pop-up: the order waits for the customer.
+ if (querProva) content.proof = true;
// Ajuste Fino: true for every art, or the [item, source] pairs chosen.
const treatment=tratamentoParaItens(sheets);
if (treatment) content.treatment = treatment;
diff --git a/web/index.html b/web/index.html
index 948a257..46e022b 100644
--- a/web/index.html
+++ b/web/index.html
@@ -1126,15 +1126,6 @@ h2 em{font-style:normal;color:var(--laranja)}
-
-
Prova antes de imprimir
-
-
A prova é para pedidos acima de 10 m.
-
-
Ajuste Fino
+
+
diff --git a/web/site-cart.js b/web/site-cart.js
index 3724563..2511dbf 100644
--- a/web/site-cart.js
+++ b/web/site-cart.js
@@ -224,6 +224,26 @@ function folhasEstreitas(it){
'Folha de '+n1(Number(s.width_cm))+' cm no tamanho real, centralizada no filme de '+
String(filme).replace('.',',')+' cm');
}
+// A prova é para pedidos acima de 10 m (Dropstar, 2026-10-28; o
+// PROOF_ABOVE_METRES do servidor) e não é obrigatória: no pagamento um pop-up
+// pergunta (Marcus, 2026-12-02). Fechar sem escolher é seguir sem prova.
+let querProva=false;
+function pedidoLongo(aPagar=itensAPagar()){
+ return aPagar.reduce((t,it)=>t+(it.cob||0),0)>10;
+}
+// Resolve com a escolha; null quando o pop-up já está aberto (clique repetido).
+function perguntaProva(){
+ const dlg=$('provaDlg');
+ if(dlg?.open) return Promise.resolve(null);
+ querProva=false;
+ if(!dlg || !pedidoLongo()){ pintaPedido(); return Promise.resolve(false); }
+ return new Promise(resolve=>{
+ dlg.returnValue='';
+ dlg.onclose=()=>{ dlg.onclose=null; querProva=dlg.returnValue==='sim'; pintaPedido(); resolve(querProva); };
+ dlg.showModal();
+ $('provaSim').focus();
+ });
+}
// O carrinho junta itens de produtos diferentes e cobra uma vez só.
function pintaPedido(){
const aPagar = itensAPagar();
@@ -309,7 +329,7 @@ function pintaPedido(){
' · +24 h'+rs(tratamento)+'':'')+
(redesenho?'