feat(inventory): add function catalog and act data
DH V2 CI / WEB · typecheck, build (push) Successful in 45s
Production dependency audit / API · production dependencies (push) Successful in 27s
DH V2 CI / API · typecheck, tests, build (push) Successful in 1m15s
Production dependency audit / WEB · production dependencies (push) Successful in 15s
DH V2 CI / Docker / migrations / production images (push) Successful in 2m21s
DH V2 CI / Promote verified main to deploy (push) Successful in 9s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Failing after 6m25s
DH V2 CI / WEB · typecheck, build (push) Successful in 45s
Production dependency audit / API · production dependencies (push) Successful in 27s
DH V2 CI / API · typecheck, tests, build (push) Successful in 1m15s
Production dependency audit / WEB · production dependencies (push) Successful in 15s
DH V2 CI / Docker / migrations / production images (push) Successful in 2m21s
DH V2 CI / Promote verified main to deploy (push) Successful in 9s
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Failing after 6m25s
This commit is contained in:
@@ -60,7 +60,7 @@ test('Acta PDF explains each Hallazgo with frozen territorial, technical and rec
|
||||
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, /DH-ACT-LIFECYCLE-V6/);
|
||||
assert.match(closing, /AS department/);
|
||||
assert.match(closing, /AS "leadInspector"/);
|
||||
assert.match(closing, /AS "installationTypeName"/);
|
||||
|
||||
@@ -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.17 release', () => {
|
||||
assert.equal(API_PHASE, 'F6.17');
|
||||
test('health metadata reports the current F6.18 release', () => {
|
||||
assert.equal(API_PHASE, 'F6.18');
|
||||
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-17');
|
||||
assert.equal(API_VERSION, '0.29.0-18');
|
||||
});
|
||||
|
||||
@@ -10,8 +10,8 @@ function mountedRepoFile(path: string): string {
|
||||
test('F6.3 Android test cut targets production API and has a distinct installable debug version', () => {
|
||||
const gradle = mountedRepoFile('android-app/app/build.gradle.kts');
|
||||
|
||||
assert.match(gradle, /versionCode = 41/);
|
||||
assert.match(gradle, /versionName = "0\.19\.13"/);
|
||||
assert.match(gradle, /versionCode = 42/);
|
||||
assert.match(gradle, /versionName = "0\.19\.14"/);
|
||||
assert.match(gradle, /https:\/\/dhv2\.korexlabs\.com\/api\/v3\//);
|
||||
assert.match(gradle, /applicationIdSuffix = "\.debug"/);
|
||||
});
|
||||
|
||||
@@ -6,7 +6,7 @@ import { MODULE_METADATA } from '@nestjs/common/constants';
|
||||
import { AssetMasterModule } from '../../src/asset-master/asset-master.module';
|
||||
import { InventoryFunctionService } from '../../src/asset-master/inventory-function.service';
|
||||
|
||||
test('F5 AssetMasterModule keeps dossier-only function dependency injectable without reopening its controller', () => {
|
||||
test('F5 dossier dependency remains injectable and F6.18 reopens the Function catalog controller', () => {
|
||||
const providers = (Reflect.getMetadata(MODULE_METADATA.PROVIDERS, AssetMasterModule) ?? []) as unknown[];
|
||||
const controllers = (Reflect.getMetadata(MODULE_METADATA.CONTROLLERS, AssetMasterModule) ?? []) as Array<{ name?: string }>;
|
||||
const dossierSource = readFileSync(
|
||||
@@ -25,7 +25,7 @@ test('F5 AssetMasterModule keeps dossier-only function dependency injectable wit
|
||||
);
|
||||
assert.equal(
|
||||
controllers.some((controller) => controller?.name === 'InventoryFunctionController'),
|
||||
false,
|
||||
'F5 must not reopen the retired Inventory Function controller',
|
||||
true,
|
||||
'F6.18 explicitly reopens InventoryFunctionController as the authoritative Function catalog',
|
||||
);
|
||||
});
|
||||
|
||||
@@ -13,7 +13,7 @@ test('F6.1 presentation metadata keeps the visible WEB version aligned with pack
|
||||
const visibleVersion = version.match(/APP_VERSION\s*=\s*'([^']+)'/)?.[1];
|
||||
|
||||
assert.equal(visibleVersion, pkg.version);
|
||||
assert.match(version, /APP_PHASE\s*=\s*'F6\.17/);
|
||||
assert.match(version, /APP_PHASE\s*=\s*'F6\.18/);
|
||||
});
|
||||
|
||||
test('F6.1 presentation keeps Relevamientos retired from WEB navigation and routes', () => {
|
||||
|
||||
@@ -0,0 +1,69 @@
|
||||
import assert from 'node:assert/strict';
|
||||
import { readFileSync } from 'node:fs';
|
||||
import { resolve } from 'node:path';
|
||||
import test from 'node:test';
|
||||
|
||||
const api = (path: string) => readFileSync(resolve(process.cwd(), path), 'utf8');
|
||||
const root = (path: string) => readFileSync(resolve(process.cwd(), '..', path), 'utf8');
|
||||
|
||||
test('F6.18 reuses one auditable Function catalog for Installation and Subinstallation', () => {
|
||||
const module = api('src/asset-master/asset-master.module.ts');
|
||||
const service = api('src/asset-master/inventory-function.service.ts');
|
||||
const migration = api('src/database/migrations/1790146200000-f6-18-function-catalog.ts');
|
||||
const app = root('web-v2/src/app/App.tsx');
|
||||
const nav = root('web-v2/src/layout/AppLayout.tsx');
|
||||
assert.match(module, /InventoryFunctionController/);
|
||||
assert.match(service, /value === 'instalacion' \|\| value === 'subinstalacion'/);
|
||||
assert.match(service, /newFunctionName/);
|
||||
assert.match(service, /FIELD_\$\{slug\}_\$\{digest\}/);
|
||||
assert.match(migration, /definition\.code='campo_funcion'/);
|
||||
assert.match(migration, /inventory_function_assignments/);
|
||||
assert.match(migration, /is_active=false,is_required=false/);
|
||||
assert.match(app, /admin\/inventory-functions/);
|
||||
assert.match(nav, /Catálogo de funciones/);
|
||||
});
|
||||
|
||||
test('F6.18 makes habitual name mandatory and technical name optional for technical Inventory', () => {
|
||||
const createDto = api('src/asset-master/dto/create-asset.dto.ts');
|
||||
const fieldDto = api('src/inspection-visits/dto/create-field-inventory.dto.ts');
|
||||
const service = api('src/asset-master/assets.service.ts');
|
||||
const editor = root('web-v2/src/pages/AssetEditorPage.tsx');
|
||||
const mobile = root('android-app/app/src/main/java/com/korexlabs/dhinspeccion/ui/ModernVisitRoot.kt');
|
||||
assert.match(createDto, /name\?: string \| null/);
|
||||
assert.match(fieldDto, /name\?: string \| null/);
|
||||
assert.match(service, /ASSET_COMMON_NAME_REQUIRED/);
|
||||
assert.match(service, /technicalName \|\| habitualName/);
|
||||
assert.match(editor, /Nombre habitual/);
|
||||
assert.match(editor, /Nombre técnico <em>opcional<\/em>/);
|
||||
assert.match(mobile, /Nombre habitual \*/);
|
||||
assert.match(mobile, /Nombre técnico \(opcional\)/);
|
||||
});
|
||||
|
||||
test('F6.18 APK can select a catalog Function or add Otro and keeps it in the offline queue', () => {
|
||||
const data = root('android-app/app/src/main/java/com/korexlabs/dhinspeccion/data/DhMobile.kt');
|
||||
const mobile = root('android-app/app/src/main/java/com/korexlabs/dhinspeccion/ui/ModernVisitRoot.kt');
|
||||
const queue = root('android-app/app/src/main/java/com/korexlabs/dhinspeccion/data/offline/OfflineQueue.kt');
|
||||
assert.match(data, /@GET\("inventory-functions"\)/);
|
||||
assert.match(data, /val functionId: String\? = null/);
|
||||
assert.match(data, /val newFunctionName: String\? = null/);
|
||||
assert.match(mobile, /Otro · agregar función/);
|
||||
assert.match(mobile, /Nueva función \*/);
|
||||
assert.match(queue, /put\("functionId", request\.functionId\)/);
|
||||
assert.match(queue, /put\("newFunctionName", request\.newFunctionName\)/);
|
||||
});
|
||||
|
||||
test('F6.18 freezes every completed technical datum except Inventory description into the Acta', () => {
|
||||
const closing = api('src/inspection-closing/inspection-closing.service.ts');
|
||||
const pdf = api('src/inspection-reports/inspection-act-pdf-builder.ts');
|
||||
assert.match(closing, /inventory_function_assignments/);
|
||||
assert.match(closing, /AS "function"/);
|
||||
assert.match(closing, /AS attributes/);
|
||||
assert.match(closing, /definition\.code<>'campo_funcion'/);
|
||||
assert.doesNotMatch(closing, /selected\.description/);
|
||||
assert.match(pdf, /label\('Nombre habitual'/);
|
||||
assert.match(pdf, /label\('Nombre técnico'/);
|
||||
assert.match(pdf, /label\('Código DH'/);
|
||||
assert.match(pdf, /label\('Función'/);
|
||||
assert.match(pdf, /technicalAttributes/);
|
||||
assert.doesNotMatch(pdf, /inventory\.description/);
|
||||
});
|
||||
Reference in New Issue
Block a user