commit compras3 2711
tests / ci (push) Waiting to run

This commit is contained in:
2026-11-27 18:56:24 +02:00
parent 930064269e
commit 9cf9764710
87 changed files with 2856 additions and 195 deletions
+43
View File
@@ -87,3 +87,46 @@ test('approved requisitions display the preserved source independently of availa
expect(frozen).toContain('<script>QA</script>');
expect(renderToStaticMarkup(<CapitalAssignmentSummary />)).toBe('');
});
test('capital lineage distinguishes the original receipt from current returns and reversal', () => {
const html = render(CapitalRegister, {
records: page([source]),
history: page([source]),
departments: [],
equipment: [],
canManage: false,
actorId: 1,
tenantId: 1,
trace: {
orders: page([
{
id: 7,
description: 'Synthetic item',
quantity: '2.000',
unit: 'un',
order_id: 8,
order_number: 'OC-QA',
},
]),
receipts: page([
{
id: 9,
description: 'Synthetic item',
unit: 'un',
receipt_id: 10,
order_id: 8,
received_on: '2026-11-27',
quality_status: 'compliant',
accepted_quantity: '2.000',
reversed: true,
returned_quantity: '1.000',
},
]),
},
});
expect(html).toContain('Aceite no original: 2.000');
expect(html).toContain('Devolução ao fornecedor: 1.000');
expect(html).toContain('Recepção estornada');
expect(html).toContain('/ordens/8');
expect(html).not.toContain('<form');
});