File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -126,7 +126,13 @@ jobs:
126126 LANGFLOW_DEACTIVATE_TRACING : " true"
127127 run : |
128128 cd src/frontend
129- npx playwright test --grep @a11y --project=chromium --workers=1 --retries=2
129+ # Only specs that call runA11yScan produce reports; discover them
130+ # so new scan hosts are picked up without editing this workflow.
131+ SCAN_SPECS=$(grep -rl "runA11yScan(" tests --include="*.spec.ts" | sort)
132+ echo "Specs with a11y scans:"
133+ echo "$SCAN_SPECS"
134+ test -n "$SCAN_SPECS"
135+ npx playwright test $SCAN_SPECS --project=chromium --workers=1 --retries=2
130136
131137 - name : Build Aggregated A11y Summary
132138 if : always()
Original file line number Diff line number Diff line change 7878endif
7979
8080test_frontend_a11y_e2e: frontend_deps_check ## run non-blocking Playwright a11y scans and reports
81- @cd $(FRONTEND_DIR) && RUN_A11Y=true RUN_A11Y_ASSERT=false npx playwright test --grep @a11y --project=chromium --workers=1
81+ @cd $(FRONTEND_DIR) && SCAN_SPECS="$$(grep -rl "runA11yScan(" tests --include="*.spec.ts" | sort)" && echo "Specs with a11y scans:" && echo "$$SCAN_SPECS" && test -n "$$SCAN_SPECS" && RUN_A11Y=true RUN_A11Y_ASSERT=false npx playwright test $$SCAN_SPECS --project=chromium --workers=1
8282
8383test_frontend_a11y_e2e_blocking: frontend_deps_check ## run blocking Playwright a11y scans against baselines
84- @cd $(FRONTEND_DIR) && RUN_A11Y=true RUN_A11Y_ASSERT=true npx playwright test --grep @a11y --project=chromium --workers=1
84+ @cd $(FRONTEND_DIR) && SCAN_SPECS="$$(grep -rl "runA11yScan(" tests --include="*.spec.ts" | sort)" && echo "Specs with a11y scans:" && echo "$$SCAN_SPECS" && test -n "$$SCAN_SPECS" && RUN_A11Y=true RUN_A11Y_ASSERT=true npx playwright test $$SCAN_SPECS --project=chromium --workers=1
8585
8686test_frontend_a11y_e2e_update: frontend_deps_check ## refresh Playwright a11y reports used as baselines
87- @cd $(FRONTEND_DIR) && rm -rf coverage/accessibility-reports && RUN_A11Y=true RUN_A11Y_ASSERT=false npx playwright test --grep @a11y --project=chromium --workers=1
87+ @cd $(FRONTEND_DIR) && rm -rf coverage/accessibility-reports && SCAN_SPECS="$$(grep -rl "runA11yScan(" tests --include="*.spec.ts" | sort)" && echo "Specs with a11y scans:" && echo "$$SCAN_SPECS" && test -n "$$SCAN_SPECS" && RUN_A11Y=true RUN_A11Y_ASSERT=false npx playwright test $$SCAN_SPECS --project=chromium --workers=1
8888 @mkdir -p $(FRONTEND_DIR)/tests/baselines
8989 @cp $(FRONTEND_DIR)/coverage/accessibility-reports/chromium__*.json $(FRONTEND_DIR)/tests/baselines/
9090
You can’t perform that action at this time.
0 commit comments