fix: align proof, treatment, metrics and site videos with PDF
All checks were successful
Build and deploy / Validate source (push) Successful in 11s
Build and deploy / Integration suite on a real stack (push) Successful in 5m44s
Build and deploy / Secret scan and release gate (push) Successful in 6s
Build and deploy / Publish images (push) Successful in 1m22s

This commit is contained in:
Cauê Faleiros
2026-11-06 15:27:48 -03:00
parent f4cd1842ca
commit a712c69aca
30 changed files with 631 additions and 110 deletions

View File

@@ -304,6 +304,29 @@ def run():
assert final['created_by'] == 'Prumo' and 'prova' in final['note'].lower(), final
print('PASS: Prova OK turns Prumo\'s full file into the parent final and queues it')
# A CDR cannot be decoded by the worker. The designer prepares the full
# parent PNG, then the worker automatically cuts the child's proof from it.
manual_source = upload_bytes(client, b'LOCAL PRINT TEST - NOT AN IMAGE', name='MANUAL-PROOF.cdr')
manual_parent = paid_order(client, loose_item(manual_source, copies=1))
with db.connect() as c:
c.execute("UPDATE dtf_local.orders SET snapshot=jsonb_set(snapshot,'{proof}','true') WHERE id=%s",
(manual_parent['id'],))
manual_child = client.call('/operator/orders/' + manual_parent['id'] + '/proof-card', {}, operator=True)
wait_print(client, manual_child['id'], 'manual')
retry = client.call('/operator/orders/' + manual_child['id'] + '/print-files', {}, operator=True, expected=409)
assert 'pedido pai' in retry['detail'], retry
prepared = upload_bytes(client, artwork(), name='MANUAL-PROOF-FINAL.png', order_id=manual_parent['id'])
client.call('/operator/orders/' + manual_parent['id'] + '/final-files',
{'version': manual_parent['version'],
'files': [{'item_index': 0, 'upload_id': prepared}],
'note': 'PNG completo para a prova'}, operator=True)
client.call('/operator/orders/' + manual_child['id'] + '/print-files', {}, operator=True)
wait_print(client, manual_child['id'], 'ready')
proof_card = next(o for o in client.call('/operator/board', operator=True)['orders']
if o['id'] == manual_child['id'])
assert proof_card['final_items'] == [0], proof_card
print('PASS: manual parent PNG produces the child proof automatically')
# A customer cannot see or reuse another order's generated file.
other = Client()
other.call('/session')