From 007033e48fc228a78d99c1b7daeb5fddb4238ef1 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Fri, 11 Sep 2026 11:38:31 -0300 Subject: [PATCH] =?UTF-8?q?test(api):=20fijar=20planificaci=C3=B3n=20web?= =?UTF-8?q?=20y=20ejecuci=C3=B3n=20m=C3=B3vil=20asignada?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../unit/f6-1-findings-mobile-open.test.ts | 22 +++++++++---------- 1 file changed, 10 insertions(+), 12 deletions(-) diff --git a/api-v3/test/unit/f6-1-findings-mobile-open.test.ts b/api-v3/test/unit/f6-1-findings-mobile-open.test.ts index 0fe7347..2c026a3 100644 --- a/api-v3/test/unit/f6-1-findings-mobile-open.test.ts +++ b/api-v3/test/unit/f6-1-findings-mobile-open.test.ts @@ -35,7 +35,7 @@ test('F6.1 uses contextual type catalog for Yacimiento and keeps OTROS/add-anoth assert.match(androidFinding, /También podés registrar otro Hallazgo sobre el mismo Inventario/); }); -test('F6.1 exposes mobile planning context and opens an inspection self-assigned to the current inspector', () => { +test('legacy mobile-open endpoints remain available without becoming the active Android workflow', () => { const controller = source('src/inspection-visits/inspection-visits.controller.ts'); const dto = source('src/inspection-visits/dto/open-mobile-inspection.dto.ts'); @@ -45,23 +45,21 @@ test('F6.1 exposes mobile planning context and opens an inspection self-assigned assert.match(controller, /@RequirePermissions\('inspections\.execute'\)/); assert.match(controller, /assertMobileInspector\(principal\)/); assert.match(controller, /leadInspectorUserId: principal\.userId/); - assert.match(controller, /plannedStartAt: new Date\(\)\.toISOString\(\)/); - assert.match(controller, /this\.lifecycle\.plan\(created\.id/); - assert.match(controller, /this\.lifecycle\.start\(created\.id/); assert.match(dto, /operationalAreaId!: string/); assert.match(dto, /operatorCompanyId!: string/); }); -test('F6.1 Android lets the inspector choose Area and current Operator and open the inspection now', () => { - const client = source('../android-app/app/src/main/java/com/korexlabs/dhinspeccion/data/MobileInspectionOpen.kt'); +test('Android lists inspections assigned from office and starts them only from the visit screen', () => { const home = source('../android-app/app/src/main/java/com/korexlabs/dhinspeccion/ui/MobileHomeScreen.kt'); + const visit = source('../android-app/app/src/main/java/com/korexlabs/dhinspeccion/ui/ModernVisitRoot.kt'); const gate = source('../android-app/app/src/main/java/com/korexlabs/dhinspeccion/ui/LoginGate.kt'); - assert.match(client, /inspection-visits\/mobile\/planning-context\/areas/); - assert.match(client, /inspection-visits\/mobile\/open/); - assert.match(home, /Abrir inspección/); - assert.match(home, /Abrir inspección ahora/); - assert.match(home, /Operadora vigente/); - assert.match(home, /model\.openVisit\(opened\.id\)/); + assert.match(home, /Trabajo planificado desde oficina/); + assert.match(home, /inspecciones asignadas desde el tablero/); + assert.doesNotMatch(home, /Abrir inspección ahora/); + assert.doesNotMatch(home, /Operadora vigente/); + assert.match(home, /model\.openVisit\(visit\.id\)/); + assert.match(visit, /Iniciar inspección/); + assert.match(visit, /model\.startVisit\(\)/); assert.match(gate, /else -> MobileHomeScreen\(model\)/); });