Compare commits
5
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
b89fd7c4d6 | ||
|
|
4dce65d577 | ||
|
|
5c78aee5e9 | ||
|
|
a985fba96a | ||
|
|
d690040a10 |
@@ -1,9 +1,11 @@
|
|||||||
name: Android APK
|
name: Android APK
|
||||||
# F3.2: genera la APK debug verificable antes de promover la integración multi-Acta.
|
# F5: genera una APK debug verificable contra la API productiva F5.
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
- 'main'
|
||||||
|
- 'release/f5-android-test'
|
||||||
- 'feature/f2-2*'
|
- 'feature/f2-2*'
|
||||||
- 'feature/f2-3*'
|
- 'feature/f2-3*'
|
||||||
- 'feature/f2-4*'
|
- 'feature/f2-4*'
|
||||||
@@ -16,6 +18,8 @@ on:
|
|||||||
paths:
|
paths:
|
||||||
- 'android-app/**'
|
- 'android-app/**'
|
||||||
- 'api-v3/src/auth/**'
|
- 'api-v3/src/auth/**'
|
||||||
|
- 'api-v3/src/inspection-visits/**'
|
||||||
|
- 'api-v3/src/inspection-acts/**'
|
||||||
- '.github/workflows/android.yml'
|
- '.github/workflows/android.yml'
|
||||||
workflow_dispatch:
|
workflow_dispatch:
|
||||||
|
|
||||||
@@ -58,7 +62,7 @@ jobs:
|
|||||||
- name: Upload APK
|
- name: Upload APK
|
||||||
uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: DH-Inspeccion-F3.2-0.12.0-debug
|
name: DH-Inspeccion-F5-0.13.0-debug
|
||||||
path: android-app/app/build/outputs/apk/debug/app-debug.apk
|
path: android-app/app/build/outputs/apk/debug/app-debug.apk
|
||||||
if-no-files-found: error
|
if-no-files-found: error
|
||||||
retention-days: 14
|
retention-days: 30
|
||||||
|
|||||||
@@ -12,8 +12,8 @@ android {
|
|||||||
applicationId = "com.korexlabs.dhinspeccion"
|
applicationId = "com.korexlabs.dhinspeccion"
|
||||||
minSdk = 26
|
minSdk = 26
|
||||||
targetSdk = 36
|
targetSdk = 36
|
||||||
versionCode = 19
|
versionCode = 20
|
||||||
versionName = "0.12.0"
|
versionName = "0.13.0"
|
||||||
|
|
||||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||||
vectorDrawables.useSupportLibrary = true
|
vectorDrawables.useSupportLibrary = true
|
||||||
|
|||||||
@@ -44,6 +44,8 @@ const STRUCTURAL_CHILD: Record<string, string | undefined> = {
|
|||||||
instalacion: 'subinstalacion',
|
instalacion: 'subinstalacion',
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const OTHER_FAMILY_SQL = "source_reference LIKE 'SYSTEM:F3.1:OTHER%' OR source_reference LIKE 'F5:SYSTEM:OTHER:%'";
|
||||||
|
|
||||||
@Injectable()
|
@Injectable()
|
||||||
export class F3FieldInventoryStructureService {
|
export class F3FieldInventoryStructureService {
|
||||||
constructor(
|
constructor(
|
||||||
@@ -202,10 +204,10 @@ export class F3FieldInventoryStructureService {
|
|||||||
return this.dataSource.query(`
|
return this.dataSource.query(`
|
||||||
SELECT id,code,name,level,information_labels AS "informationLabels",
|
SELECT id,code,name,level,information_labels AS "informationLabels",
|
||||||
source_reference AS "sourceReference",
|
source_reference AS "sourceReference",
|
||||||
(source_reference LIKE 'SYSTEM:F3.1:OTHER%') AS "isOther"
|
(${OTHER_FAMILY_SQL}) AS "isOther"
|
||||||
FROM inventory_families
|
FROM inventory_families
|
||||||
WHERE level='INSTALLATION' AND is_active=true
|
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[]>;
|
`) as Promise<FamilyRow[]>;
|
||||||
}
|
}
|
||||||
if (expectedTypeCode === 'subinstalacion') {
|
if (expectedTypeCode === 'subinstalacion') {
|
||||||
@@ -219,13 +221,13 @@ export class F3FieldInventoryStructureService {
|
|||||||
SELECT family.id,family.code,family.name,family.level,
|
SELECT family.id,family.code,family.name,family.level,
|
||||||
family.information_labels AS "informationLabels",
|
family.information_labels AS "informationLabels",
|
||||||
family.source_reference AS "sourceReference",
|
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
|
FROM inventory_family_parent_rules rule
|
||||||
JOIN inventory_families family ON family.id=rule.child_family_id
|
JOIN inventory_families family ON family.id=rule.child_family_id
|
||||||
WHERE rule.parent_family_id=$1::uuid
|
WHERE rule.parent_family_id=$1::uuid
|
||||||
AND family.level='SUBINSTALLATION'
|
AND family.level='SUBINSTALLATION'
|
||||||
AND family.is_active=true
|
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[]>;
|
`, [parent.inventoryFamilyId]) as Promise<FamilyRow[]>;
|
||||||
}
|
}
|
||||||
return [];
|
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/);
|
||||||
|
});
|
||||||
Reference in New Issue
Block a user