fix(ci): actualizar guard de navegacion del catalogo tras PR #32 #33
+14
-11
@@ -214,22 +214,25 @@ jobs:
|
||||
exit 1
|
||||
}
|
||||
|
||||
grep -q 'currentCollection' "${NAVBAR_FILE}" || {
|
||||
echo "ERROR: navbar.tsx no calcula currentCollection."
|
||||
# Desde Etapa 2 sub-fase 2 (2026-08-25) el nav es data-driven
|
||||
# contra el arbol real de categorias de Medusa, no un array
|
||||
# hardcodeado -- esta version anterior del check no detectaba
|
||||
# que "category=Mochilas"/"collection=Marvel" eran strings
|
||||
# hardcodeadas que ya no correspondian a ningun dato real (rotas
|
||||
# en silencio desde que se elimino legacyProductMeta, PR #29).
|
||||
# "currentCollection" tampoco existe mas: las colecciones ya no
|
||||
# se usan para resaltar el item activo del menu de categorias.
|
||||
grep -q 'buildCategoryTree' "${NAVBAR_FILE}" || {
|
||||
echo "ERROR: navbar.tsx ya no arma el arbol de categorias desde datos reales."
|
||||
exit 1
|
||||
}
|
||||
|
||||
grep -q 'collection=Marvel' "${NAVBAR_FILE}" || {
|
||||
echo "ERROR: falta collection=Marvel en navbar.tsx."
|
||||
grep -q 'encodeURIComponent(root.name)' "${NAVBAR_FILE}" || {
|
||||
echo "ERROR: navbar.tsx ya no linkea por el nombre real de categoria."
|
||||
exit 1
|
||||
}
|
||||
|
||||
grep -q 'category=Mochilas' "${NAVBAR_FILE}" || {
|
||||
echo "ERROR: falta category=Mochilas en navbar.tsx."
|
||||
exit 1
|
||||
}
|
||||
|
||||
grep -q 'aria-current={active ? "page" : undefined}' "${NAVBAR_FILE}" || {
|
||||
grep -q 'aria-current={isActive(' "${NAVBAR_FILE}" || {
|
||||
echo "ERROR: navbar.tsx no expone correctamente el menú activo."
|
||||
exit 1
|
||||
}
|
||||
@@ -258,7 +261,7 @@ jobs:
|
||||
|
||||
echo "Validando remontaje por parámetros: ${PAGE_FILE}"
|
||||
|
||||
grep -q 'key={`${category}:${collection}:${query}:${section}`}' "${PAGE_FILE}" || {
|
||||
grep -q 'key={`${category}:${collection}:${query}`}' "${PAGE_FILE}" || {
|
||||
echo "ERROR: app/catalog/page.tsx no remonta CatalogClient al cambiar la URL."
|
||||
exit 1
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user