From 47965815325afa34d99d78d4078ec3d2e1cc4753 Mon Sep 17 00:00:00 2001 From: enlineawork Date: Mon, 7 Sep 2026 15:47:16 -0300 Subject: [PATCH] F3.1 hotfix: mover contrato visual a CI WEB --- scripts/check-f3-1-web-contract.sh | 37 ++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 scripts/check-f3-1-web-contract.sh diff --git a/scripts/check-f3-1-web-contract.sh b/scripts/check-f3-1-web-contract.sh new file mode 100644 index 0000000..83acb70 --- /dev/null +++ b/scripts/check-f3-1-web-contract.sh @@ -0,0 +1,37 @@ +#!/usr/bin/env bash +set -Eeuo pipefail + +ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" +LAYOUT="$ROOT/web-v2/src/layout/AppLayout.tsx" +APP="$ROOT/web-v2/src/app/App.tsx" +PAGE="$ROOT/web-v2/src/pages/InventoryCreatePage.tsx" + +for file in "$LAYOUT" "$APP" "$PAGE"; do + test -f "$file" || { + echo "F3.1 WEB contract: falta $file" + exit 1 + } +done + +if grep -Fq "label: 'Relevamientos'" "$LAYOUT"; then + echo "F3.1 WEB contract: Relevamientos no debe volver al menĂº principal" + exit 1 +fi + +grep -Fq 'path="/relevamiento/*"' "$APP" +grep -Fq 'Navigate to="/inventarios" replace' "$APP" +grep -Fq 'path="/inventarios/nuevo"' "$APP" +grep -Fq 'InventoryCreatePage' "$APP" + +for kind in AREA YACIMIENTO INSTALACION SUBINSTALACION; do + grep -Fq "kind: '$kind'" "$PAGE" +done + +if grep -Fq "kind: 'EQUIPO'" "$PAGE"; then + echo "F3.1 WEB contract: el alta guiada no debe restaurar EQUIPO como quinto nivel estructural" + exit 1 +fi + +grep -Fq 'getInventoryFamilyFindings' "$PAGE" + +echo 'F3.1 WEB contract: OK'