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

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:
Cauê Faleiros
2026-10-29 18:18:56 -03:00
parent 95e7c64501
commit a5417d200e
8 changed files with 104 additions and 15 deletions

View File

@@ -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