commit compras3 2911
tests / ci (push) Canceled after 0s

This commit is contained in:
2026-11-29 16:03:11 +02:00
parent 7da8d6c87a
commit 30bfb1a773
72 changed files with 10998 additions and 98 deletions
@@ -65,6 +65,59 @@ test('incomplete detail identifies the missing original and preserves documented
expect(html).not.toContain('Aprovações do valor final');
});
test.each([true, false, undefined])(
'complete order preserves its recorded development classification: %s',
(development) => {
const html = render(Show, {
order: {
...order,
subtotal_minor: 10000,
tax_minor: 0,
snapshot: {
...order.snapshot,
development_only: development,
budget_checked: true,
supplier: {
name: 'Synthetic supplier',
nuit: '000000000',
contact: '',
phone: '',
email: '',
address: '',
},
department: { name: 'Synthetic operations' },
cost_center: { code: 'SYN', name: 'Synthetic centre' },
requisition: { number: 'RQ-SYN' },
issuer: { name: 'Synthetic issuer' },
requester: { name: 'Synthetic requester' },
quotation: {
reference: 'PROP-SYN',
payment_terms: 'Synthetic documentary terms',
},
award: {
justification: 'Synthetic approved example',
delivery_date: '2026-11-29',
delivery_location: 'Synthetic location',
},
approval_rules: {
approval_includes_tax: true,
rules_provisional: false,
},
decision_matrix: [],
final_approvals: [],
},
},
history: [],
snapshotComplete: true,
});
expect(html.includes('Documento de desenvolvimento')).toBe(
development !== false,
);
expect(html).toContain('Controlo orçamental registado na emissão');
expect(html).toContain('RQ-SYN');
},
);
test.each([
{
state: 'issued',