test: align F4 sealing contract with documented absence

This commit is contained in:
2026-09-08 15:10:01 -03:00
parent fcd64d5f43
commit 2121df0b55
@@ -80,13 +80,13 @@ test('F4 field finding flow only targets a draft act of the same in-progress ins
assert.match(draftGuard, /WHERE visit_id = \$1::uuid[\s\S]*AND status = 'DRAFT'/);
});
test('F4 sealing requires inspector signature and exactly one resolved company manifestation', () => {
test('F4 sealing requires inspector signature and exactly one terminal company outcome', () => {
const closeBody = closing.slice(closing.indexOf(' async close('), closing.indexOf(' async signatureContent('));
assert.match(closeBody, /INSPECTION_ACT_INSPECTOR_SIGNATURE_REQUIRED/);
assert.match(closeBody, /companyOutcomes\.length !== 1/);
assert.match(closeBody, /INSPECTION_ACT_COMPANY_OUTCOME_REQUIRED/);
assert.match(closeBody, /InspectionActSignatureStatus\.ABSENT/);
assert.match(closeBody, /INSPECTION_ACT_COMPANY_MANIFESTATION_PENDING/);
assert.match(closeBody, /ausencia documentada/);
assert.doesNotMatch(closeBody, /INSPECTION_ACT_COMPANY_MANIFESTATION_PENDING/);
assert.match(closeBody, /status='SEALED'/);
});