F5 · Android 0.13.0 de prueba y compatibilidad de familias

Integra el corte Android F5 validado por CI, con artifact 0.13.0-debug y compatibilidad correcta de familias Otro / no catalogado en Inventario de campo.
This commit is contained in:
2026-09-09 06:50:06 -03:00
committed by GitHub
parent 35d4630581
commit 2b87e07fd2
4 changed files with 43 additions and 9 deletions
@@ -44,6 +44,8 @@ const STRUCTURAL_CHILD: Record<string, string | undefined> = {
instalacion: 'subinstalacion',
};
const OTHER_FAMILY_SQL = "source_reference LIKE 'SYSTEM:F3.1:OTHER%' OR source_reference LIKE 'F5:SYSTEM:OTHER:%'";
@Injectable()
export class F3FieldInventoryStructureService {
constructor(
@@ -202,10 +204,10 @@ export class F3FieldInventoryStructureService {
return this.dataSource.query(`
SELECT id,code,name,level,information_labels AS "informationLabels",
source_reference AS "sourceReference",
(source_reference LIKE 'SYSTEM:F3.1:OTHER%') AS "isOther"
(${OTHER_FAMILY_SQL}) AS "isOther"
FROM inventory_families
WHERE level='INSTALLATION' AND is_active=true
ORDER BY (source_reference LIKE 'SYSTEM:F3.1:OTHER%') ASC,name,code
ORDER BY (${OTHER_FAMILY_SQL}) ASC,name,code
`) as Promise<FamilyRow[]>;
}
if (expectedTypeCode === 'subinstalacion') {
@@ -219,13 +221,13 @@ export class F3FieldInventoryStructureService {
SELECT family.id,family.code,family.name,family.level,
family.information_labels AS "informationLabels",
family.source_reference AS "sourceReference",
(family.source_reference LIKE 'SYSTEM:F3.1:OTHER%') AS "isOther"
(family.source_reference LIKE 'SYSTEM:F3.1:OTHER%' OR family.source_reference LIKE 'F5:SYSTEM:OTHER:%') AS "isOther"
FROM inventory_family_parent_rules rule
JOIN inventory_families family ON family.id=rule.child_family_id
WHERE rule.parent_family_id=$1::uuid
AND family.level='SUBINSTALLATION'
AND family.is_active=true
ORDER BY (family.source_reference LIKE 'SYSTEM:F3.1:OTHER%') ASC,family.name,family.code
ORDER BY (family.source_reference LIKE 'SYSTEM:F3.1:OTHER%' OR family.source_reference LIKE 'F5:SYSTEM:OTHER:%') ASC,family.name,family.code
`, [parent.inventoryFamilyId]) as Promise<FamilyRow[]>;
}
return [];
@@ -0,0 +1,28 @@
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('F5 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 = 20/);
assert.match(gradle, /versionName = "0\.13\.0"/);
assert.match(gradle, /https:\/\/dhv2\.korexlabs\.com\/api\/v3\//);
assert.match(gradle, /applicationIdSuffix = "\.debug"/);
});
test('F5 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/);
});