feat: redesign the Montagem page, with thumbnails, check chips and a DPI price scale
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 2m31s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m0s
All checks were successful
Build and deploy / Validate source (push) Successful in 6s
Build and deploy / Integration suite on a real stack (push) Successful in 2m31s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m0s
The product page is rebuilt around mockup 1. The two ways to send are
cards under the title; the PNG/CDR route choice is gone (it never changed
the price, and the picker now takes every allowed format). Each file card
has a thumbnail, its size, check chips with a plain sentence for any
problem, a "Ver detalhes da conferência" link and a copies stepper; a CDR
file says "Conferência manual · preço cheio" and asks for the length. The
buy box shows the price scale in DPI with the customer's step, the metre
and 10 cm length, the total and what the resolution saved, and "Sai em N
partes" only above 20 m. Folha já montada gets "Ampliar" instead of zoom.
Pricing, grade and checks are unchanged.
Fixes on top: the card thumbnail is a small image made once, not the full
preview re-parsed on every repaint; sizes from 1 GB up read in GB; a failed
upload is shown with "Tentar de novo" instead of retrying silently on every
cart change. The browser suites wait for the product and the reloaded page
instead of racing them, and the artwork suite delays imagemDaArte, which
the packing now uses, fixing the CI failure of f4aacb5.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -115,7 +115,7 @@ try{
|
||||
await call('Runtime.enable');await call('Page.enable');
|
||||
await call('Emulation.setDeviceMetricsOverride',{width:1440,height:1100,deviceScaleFactor:1,mobile:false});
|
||||
await call('Page.navigate',{url:`http://127.0.0.1:${server.address().port}/`});
|
||||
await waitFor(()=>evaluate(`typeof sel==='function' && typeof AUTO!=='undefined'`),'Site scripts');
|
||||
await waitFor(()=>evaluate(`typeof sel==='function' && typeof pintaEntrega==='function'`),'Site scripts');
|
||||
// Observe the actual engine, without replacing its placement or rendering.
|
||||
await evaluate(`(()=>{
|
||||
const original=encaixar;
|
||||
@@ -149,6 +149,9 @@ try{
|
||||
// Navigation links must reach the chooser, never preselect a product.
|
||||
assert.equal(await evaluate(`document.querySelectorAll('[data-modo-cta]').length`),0);
|
||||
await click('[data-modo="file"]');
|
||||
// Opening a product paints on the next frame; on a busy runner the check
|
||||
// must wait for it rather than race it.
|
||||
await waitFor(()=>evaluate(`!$('tipoEnvio').hidden`),'by-metre product open');
|
||||
// By-metre opens declaring a mounted sheet; switching is explicit and priced.
|
||||
assert.deepEqual(await evaluate(`({shown:!$('tipoEnvio').hidden,
|
||||
on:[...document.querySelectorAll('#tipoEnvio .cam.on')].map(b=>b.dataset.tipo)})`),
|
||||
@@ -293,13 +296,14 @@ try{
|
||||
await fill('[data-cm]',10);await fill('[data-q]',4);await packed(4);
|
||||
}
|
||||
// An older image load must not overwrite a newer edit, even before debounce.
|
||||
await evaluate(`(()=>{window.realLoad=carregarImagem;window.delayed=[];
|
||||
carregarImagem=f=>new Promise(resolve=>delayed.push(()=>realLoad(f).then(resolve)));
|
||||
// The packing loads each artwork's image through imagemDaArte.
|
||||
await evaluate(`(()=>{window.realLoad=imagemDaArte;window.delayed=[];
|
||||
imagemDaArte=a=>new Promise(resolve=>delayed.push(()=>realLoad(a).then(resolve)));
|
||||
})()`);
|
||||
await fill('[data-q]',5);
|
||||
await waitFor(()=>evaluate('delayed.length===1'),'delayed preview');
|
||||
await fill('[data-q]',7);
|
||||
await evaluate(`carregarImagem=realLoad;delayed[0]()`);
|
||||
await evaluate(`imagemDaArte=realLoad;delayed[0]()`);
|
||||
await packed(7);
|
||||
const timeoutCleanup=await evaluate(`(async()=>{
|
||||
const realLoader=carregarPdfJs, realTimer=setTimeout, realWorker=temWorker;
|
||||
|
||||
@@ -62,12 +62,13 @@ try{
|
||||
await site.call('Page.setBypassCSP',{enabled:false});
|
||||
await site.call('Page.reload');
|
||||
await waitFor(()=>site.eval('typeof window.dtfCheckout === "function"'),'reload after security probe');
|
||||
// The check above can still pass on the page being replaced; wait for the new one's cards.
|
||||
await waitFor(()=>site.eval(`!!document.querySelector('[data-modo="file"]') && document.readyState==='complete'`),'product cards after reload');
|
||||
await site.click('[data-modo="file"]');
|
||||
// Each product has its own page; the home's parts are not on it.
|
||||
assert.deepEqual(await site.eval(`({path:location.pathname,page:document.documentElement.dataset.rota,
|
||||
cards:getComputedStyle($('cards')).display,cart:getComputedStyle($('carr')).display})`),
|
||||
{path:'/arquivo-por-metro',page:'produto',cards:'none',cart:'none'});
|
||||
await site.click('[data-cam="tabela"]');
|
||||
const root=await site.call('DOM.getDocument');
|
||||
const input=await site.call('DOM.querySelector',{nodeId:root.root.nodeId,selector:'#inp'});
|
||||
await site.call('DOM.setFileInputFiles',{nodeId:input.nodeId,files:[resolve('tests/fixtures/local-test.cdr')]});
|
||||
|
||||
Reference in New Issue
Block a user