chore: import DH V2 D5.6.4 production baseline

This commit is contained in:
DH V2
2026-09-05 10:12:35 -03:00
commit 82213e72f5
757 changed files with 84218 additions and 0 deletions
@@ -0,0 +1,31 @@
import assert from 'node:assert/strict';
import { readFile } from 'node:fs/promises';
import { resolve } from 'node:path';
import test from 'node:test';
async function source(relativePath: string): Promise<string> {
return readFile(resolve(process.cwd(), 'src', relativePath), 'utf8');
}
test('D5.3.4 adds a bounded hierarchy query without changing physical parent semantics', async () => {
const controller = await source('asset-master/assets.controller.ts');
const service = await source('asset-master/assets.service.ts');
const dto = await source('asset-master/dto/list-asset-tree-query.dto.ts');
assert.match(controller, /@Get\('tree'\)/);
assert.match(controller, /@RequirePermissions\('assets\.read'\)/);
assert.match(service, /WITH RECURSIVE matched AS/);
assert.match(service, /JOIN visible current/);
assert.match(service, /rows\.length > 5000/);
assert.match(service, /asset_external_identifiers external_id/);
assert.match(dto, /needsValidation\?: boolean/);
assert.match(dto, /hasGeometry\?: boolean/);
});
test('D5.3.4 exposes operational dashboard counts before technical administration metrics', async () => {
const dashboard = await source('dashboard/dashboard.service.ts');
assert.match(dashboard, /"plannedInspections"/);
assert.match(dashboard, /"assetsNeedValidation"/);
assert.match(dashboard, /"assetsWithoutGeometry"/);
assert.match(dashboard, /information_status NOT IN \('VALIDATED','INACTIVE'\)/);
});