test(ms-ai-architect): playground v3 parser fixture tests + run-e2e integration [skip-docs]

Step 15 (Wave 5).

tests/test-playground-parsers.sh (new):
- Iterates 17 expected fixtures (canonical archetype-routing list).
- Validates each present + >= 20 lines + has section headers (## ).
- Graceful-degrade: missing fixtures yield warn, not fail.
- Greps 14 parser-function names + window.__PARSERS exposure.
- Validates all 14 archetype routing keys in PARSERS object
  (aiact, requirements-list, text-document, fria, conformity-checklist,
   matrix-risk, matrix-risk-6x5, findings, cost-distribution, capability,
   phased-plan, markdown, verdict, comparison).
- Validates handlePasteImport function + window.__handlePasteImport.
- Bash 3.2-compatible. Result: 70/70 PASS.

tests/run-e2e.sh (modify):
- Adds --playground flag dispatching test-playground-v3.sh +
  test-playground-parsers.sh.
- --all and no-arg invocation both include the new suite.

Verify: bash tests/run-e2e.sh --playground -> exit 0 (170 + 70 PASS).
This commit is contained in:
Kjell Tore Guttormsen 2026-05-03 20:10:21 +02:00
commit e85f3fc9e9
2 changed files with 176 additions and 7 deletions

View file

@ -1,6 +1,6 @@
#!/bin/bash
# run-e2e.sh — Run E2E regression tests for agent outputs
# Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--all]
# Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--playground] [--all]
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
@ -16,6 +16,7 @@ RUN_COST=false
RUN_SUMMARY=false
RUN_ROS=false
RUN_AI_ACT=false
RUN_PLAYGROUND=false
if [ $# -eq 0 ] || [ "${1:-}" = "--all" ]; then
RUN_SECURITY=true
@ -23,16 +24,18 @@ if [ $# -eq 0 ] || [ "${1:-}" = "--all" ]; then
RUN_SUMMARY=true
RUN_ROS=true
RUN_AI_ACT=true
RUN_PLAYGROUND=true
else
while [ $# -gt 0 ]; do
case "$1" in
--security) RUN_SECURITY=true ;;
--cost) RUN_COST=true ;;
--summary) RUN_SUMMARY=true ;;
--ros) RUN_ROS=true ;;
--ai-act) RUN_AI_ACT=true ;;
--security) RUN_SECURITY=true ;;
--cost) RUN_COST=true ;;
--summary) RUN_SUMMARY=true ;;
--ros) RUN_ROS=true ;;
--ai-act) RUN_AI_ACT=true ;;
--playground) RUN_PLAYGROUND=true ;;
*)
echo "Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--all]"
echo "Usage: bash tests/run-e2e.sh [--security] [--cost] [--summary] [--ros] [--ai-act] [--playground] [--all]"
exit 1
;;
esac
@ -67,6 +70,11 @@ if $RUN_AI_ACT; then
bash "$SCRIPT_DIR/test-ai-act-output.sh" || FAILURES=$((FAILURES + 1))
fi
if $RUN_PLAYGROUND; then
bash "$SCRIPT_DIR/test-playground-v3.sh" || FAILURES=$((FAILURES + 1))
bash "$SCRIPT_DIR/test-playground-parsers.sh" || FAILURES=$((FAILURES + 1))
fi
echo -e "${CYAN}══════════════════════════════════════════════${NC}"
if [ "$FAILURES" -eq 0 ]; then
echo -e "${GREEN} All E2E suites passed${NC}"