feat: the customer may accept printing a ready sheet's residue dots (Dropstar's third round, item 5)
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 3m53s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m8s
All checks were successful
Build and deploy / Validate source (push) Successful in 8s
Build and deploy / Integration suite on a real stack (push) Successful in 3m53s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m8s
A sheet with dots under 2 mm still stops the order, now with a box under the warning: "Esta arte tem N pontos menores que 2 mm. Estou ciente e aceito imprimir assim — eles podem se perder no recorte." Ticked, the sheet goes on, and the item carries how many dots were accepted (residue_accepted), kept through the review and shown on the Kanban card, order panel and quote. A solid background still stops it, with no box. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -334,6 +334,13 @@ try{
|
||||
await waitFor(()=>evaluate(`$('aoVivo').textContent.includes('ponto de recorte') && itemAtual===null`),'residue stops the order');
|
||||
assert.equal(await evaluate(`$('lista').textContent.includes('Sobrou 1 ponto de recorte na sua folha')`),true);
|
||||
await waitFor(()=>evaluate(`folhas[0].previewSrc.startsWith('data:image/webp')`),'residue circled on the preview');
|
||||
// Unless the customer accepts printing the dot (Dropstar, 2026-10-29): ticked,
|
||||
// the sheet goes on and the item says how many dots were accepted.
|
||||
assert.equal(await evaluate(`$('lista').textContent.includes('Esta arte tem 1 ponto menor que 2 mm. Estou ciente e aceito imprimir assim')`),true);
|
||||
await click('[data-residuo="0"]');
|
||||
await waitFor(()=>evaluate(`itemAtual?.residueAccepted===1 && !$('lista').textContent.includes('Sobrou 1 ponto')`),'accepted residue lets the sheet go on');
|
||||
await click('[data-residuo="0"]');
|
||||
await waitFor(()=>evaluate(`itemAtual===null && $('aoVivo').textContent.includes('ponto de recorte')`),'unticked, the residue stops it again');
|
||||
await evaluate(`folhas=[];pintaFolha()`);
|
||||
await evaluate('sendSheet({fundo:true})');
|
||||
await waitFor(()=>evaluate(`folhas[0]?.an?.fundoChapado===true && itemAtual===null && $('aoVivo').textContent.includes('fundo transparente')`),'solid background stops the order');
|
||||
|
||||
@@ -181,6 +181,9 @@ def run():
|
||||
altered={**items[0],'production':{**items[0]['production'],
|
||||
'sources':[{**items[0]['production']['sources'][0],'measurement':'file'}]}}
|
||||
client.call('/operator/quotes/'+qid+'/approve',{'items':[altered,*items[1:]]},operator=True,expected=422)
|
||||
# Nor does the review change the residue the customer accepted (Dropstar, 2026-10-29).
|
||||
client.call('/operator/quotes/'+qid+'/approve',{'items':[{**items[0],'residue_accepted':2},*items[1:]]},
|
||||
operator=True,expected=422)
|
||||
# Reviewer corrects a browser-supplied grade and length. Browser values are proposals.
|
||||
# One price per product (2026-10-23): the grade is kept, the price ignores it.
|
||||
corrected=[{**items[0],'metres':'1.01','grade':0},*items[1:]]
|
||||
@@ -205,6 +208,12 @@ def run():
|
||||
assert seen['approved']['total_cents']==6132+int(os.environ.get('MOCK_FREIGHT_CENTS','1500'))
|
||||
assert client.call('/quotes',small)['status']=='approved'
|
||||
client.call('/operator/quotes/'+auto['id']+'/approve',{'items':small['items']},operator=True,expected=409)
|
||||
# The residue dots the customer accepted printing stay with the item.
|
||||
accepted={**small,'request_key':str(uuid4()),'items':[{**item_spec('avulsa','2.75',90,graded),'residue_accepted':3}]}
|
||||
client.call('/quotes',{**accepted,'items':[{**accepted['items'][0],'residue_accepted':-1}]},expected=422)
|
||||
kept=client.call('/quotes',accepted)
|
||||
assert kept['status']=='approved'
|
||||
assert client.call('/quotes/'+kept['id'])['approved']['items'][0]['residue_accepted']==3
|
||||
# The Site grades only art it analysed. A grade on art it did not analyse
|
||||
# is checked against the file like any other, and this one cannot be.
|
||||
claimed={**item_spec('avulsa','2.75',0,uid),'grade':90}
|
||||
|
||||
Reference in New Issue
Block a user