Files
dh-inspeccion-v2/api-v3/test/unit/f5-android-test-cut.test.ts
DH V2 23450bb6d0
Android CI / RC / Android · lint, tests, debug APK, release compile (push) Successful in 3m4s
DH V2 CI / API · typecheck, tests, build (push) Successful in 32s
DH V2 CI / WEB · typecheck, build (push) Successful in 18s
Production dependency audit / WEB · production dependencies (push) Successful in 9s
DH V2 CI / Docker / scripts contract (push) Successful in 1m0s
Production dependency audit / API · production dependencies (push) Successful in 9s
fix(field): repair installation creation and streamline mobile form
2026-09-14 19:25:20 -03:00

44 lines
1.6 KiB
TypeScript

import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import { resolve } from 'node:path';
import test from 'node:test';
function mountedRepoFile(path: string): string {
return readFileSync(resolve(process.cwd(), '..', path), 'utf8');
}
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 = 34/);
assert.match(gradle, /versionName = "0\.19\.6"/);
assert.match(gradle, /https:\/\/dhv2\.korexlabs\.com\/api\/v3\//);
assert.match(gradle, /applicationIdSuffix = "\.debug"/);
});
test('F5/F6.3 field inventory exposes Other families as reviewable choices to Android', () => {
const service = readFileSync(
resolve(process.cwd(), 'src/inspection-visits/f3-field-inventory-structure.service.ts'),
'utf8',
);
assert.match(service, /F5:SYSTEM:OTHER:%/);
assert.match(service, /AS "isOther"/);
assert.match(service, /isOtherFamily: family\.isOther/);
});
test('field inventory persists the validated Tipo de instalación in the initial asset insert', () => {
const fieldService = readFileSync(
resolve(process.cwd(), 'src/inspection-visits/field-inventory.service.ts'),
'utf8',
);
const assetsService = readFileSync(
resolve(process.cwd(), 'src/asset-master/assets.service.ts'),
'utf8',
);
assert.match(fieldService, /inventoryFamilyId: dto\.familyId \?\? null/);
assert.match(assetsService, /inventoryFamilyId: dto\.inventoryFamilyId \?\? null/);
});