feat(actas): render complete self-contained PDF
DH V2 CI / API · typecheck, tests, build (push) Successful in 43s
Production dependency audit / API · production dependencies (push) Successful in 15s
Production dependency audit / WEB · production dependencies (push) Successful in 14s
DH V2 CI / WEB · typecheck, build (push) Successful in 1m36s
DH V2 CI / Docker / migrations / production images (push) Successful in 2m45s
DH V2 CI / Promote verified main to deploy (push) Successful in 6s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 4m59s
DH V2 CI / API · typecheck, tests, build (push) Successful in 43s
Production dependency audit / API · production dependencies (push) Successful in 15s
Production dependency audit / WEB · production dependencies (push) Successful in 14s
DH V2 CI / WEB · typecheck, build (push) Successful in 1m36s
DH V2 CI / Docker / migrations / production images (push) Successful in 2m45s
DH V2 CI / Promote verified main to deploy (push) Successful in 6s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 4m59s
This commit is contained in:
@@ -8,7 +8,7 @@ const web = (path: string) => readFileSync(resolve(process.cwd(), '..', 'web-v2'
|
||||
|
||||
test('Acta PDF renders Hallazgos and finding evidence, never standalone Inventory or field photos', () => {
|
||||
const source = api('inspection-reports/inspection-act-pdf-builder.ts');
|
||||
assert.match(source, /heading\('Hallazgos y fotografías'\)/);
|
||||
assert.match(source, /section\('5\. Hallazgos'\)/);
|
||||
assert.match(source, /item\.findingId === text\(finding\.id\)/);
|
||||
assert.doesNotMatch(source, /Instalaciones inspeccionadas/);
|
||||
assert.doesNotMatch(source, /Otras instalaciones inspeccionadas/);
|
||||
@@ -46,3 +46,25 @@ test('Acta sealed snapshot excludes Inventory that has no Hallazgo and PDF skips
|
||||
assert.match(pdfService, /fieldImages\(actId, false\)/);
|
||||
assert.match(pdfService, /includeAssetPhotos \? await this\.dataSource\.query/);
|
||||
});
|
||||
|
||||
test('Acta PDF explains each Hallazgo with frozen territorial, technical and recurrence context', () => {
|
||||
const pdf = api('inspection-reports/inspection-act-pdf-builder.ts');
|
||||
const closing = api('inspection-closing/inspection-closing.service.ts');
|
||||
assert.match(pdf, /Contexto territorial y operativo/);
|
||||
assert.match(pdf, /Inspector\/a responsable/);
|
||||
assert.match(pdf, /Tipo de instalación/);
|
||||
assert.match(pdf, /Qué se constató/);
|
||||
assert.match(pdf, /Referencia de catálogo/);
|
||||
assert.match(pdf, /Normativa \/ Base legal/);
|
||||
assert.match(pdf, /Reincidencia/);
|
||||
assert.match(pdf, /Alcance de la inspección/);
|
||||
assert.match(pdf, /scopeTypeCode/);
|
||||
assert.match(pdf, /Antecedente relacionado/);
|
||||
assert.match(closing, /DH-ACT-LIFECYCLE-V5/);
|
||||
assert.match(closing, /AS department/);
|
||||
assert.match(closing, /AS "leadInspector"/);
|
||||
assert.match(closing, /AS "installationTypeName"/);
|
||||
assert.match(closing, /AS recurrence/);
|
||||
const service = api('inspection-reports/inspection-act-pdf.service.ts');
|
||||
assert.match(service, /yacimiento_from_findings/);
|
||||
});
|
||||
|
||||
@@ -4,9 +4,9 @@ import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import { API_PHASE, API_VERSION } from '../../src/version';
|
||||
|
||||
test('health metadata reports the current F6.9 release', () => {
|
||||
assert.equal(API_PHASE, 'F6.9');
|
||||
test('health metadata reports the current F6.10 release', () => {
|
||||
assert.equal(API_PHASE, 'F6.10');
|
||||
const pkg = JSON.parse(readFileSync(resolve(process.cwd(), 'package.json'), 'utf8')) as { version: string };
|
||||
assert.equal(API_VERSION, pkg.version);
|
||||
assert.equal(API_VERSION, '0.29.0-10');
|
||||
});
|
||||
assert.equal(API_VERSION, '0.29.0-11');
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user