feat: a real progress bar per file while it uploads (Dropstar's third round, item 6)
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 3m42s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 56s
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 3m42s
Build and deploy / Secret scan and release gate (push) Successful in 5s
Build and deploy / Publish images (push) Successful in 56s
A file starts uploading as soon as it is on the product page, not once the item is in the cart. Under the uploader, each file has its row: "Enviando NOME · 62% · 1,2 MB de 2,0 MB", then the security check, then "enviado"; a failure says why, with "Tentar de novo". Each part goes through XMLHttpRequest, so the bytes move while a part is on its way instead of once per 8 MB part. A file taken off the page, and in no cart item, stops uploading. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -288,6 +288,12 @@ try{
|
||||
await click('#bVoltar');await click('[data-modo="file"]');
|
||||
await evaluate('sendSheet()');
|
||||
await waitFor(()=>evaluate('folhas.length===1 && !!folhas[0].previewSrc && metros===0.342'),'ready-sheet image');
|
||||
// On its way at once, with its own row under the uploader (Dropstar,
|
||||
// 2026-10-29). There is no storage here, so it fails, and says so with a
|
||||
// way to try again; tests/browser_test.mjs sends it for real.
|
||||
await waitFor(()=>evaluate(`!!dtfEnvio.estado(folhas[0].f)`),'the sheet starts uploading at once');
|
||||
await waitFor(()=>evaluate(`$('envios').textContent.includes('Não foi possível enviar folha-montada.png') &&
|
||||
!!$('envios').querySelector('[data-envio]')`),'a failed upload says so under the uploader');
|
||||
assert.deepEqual(await evaluate(`({mode:modo,art:artes.length,title:$('montcabTit').textContent,rate:precoMetro()})`),{mode:'file',art:0,title:'Sua folha',rate:19.9});
|
||||
// One price per product (Dropstar, 2026-10-23): the sheet is graded, and the
|
||||
// grade is shown, but the metre costs the same as for any other grade.
|
||||
|
||||
@@ -73,6 +73,10 @@ try{
|
||||
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')]});
|
||||
await waitFor(()=>site.eval('!!document.querySelector("[data-comp]")'),'manual length field');
|
||||
// On its way from the product page already, with its own row under the
|
||||
// uploader (Dropstar, 2026-10-29).
|
||||
await waitFor(()=>site.eval(`$('envios').textContent.includes('local-test.cdr') && !$('envios').textContent.includes('Não foi possível')`),
|
||||
'the file uploads from the product page',45000);
|
||||
await site.fill('[data-comp]','1.01','change');
|
||||
await waitFor(()=>site.eval('!!itemAtual'),'cart calculation');
|
||||
// A CDR is opened by hand: the full price, plus the per-metre charge when
|
||||
|
||||
Reference in New Issue
Block a user