#!/bin/bash # BDD Test Runner Script # Runs all BDD tests and fails if there are undefined, pending, or skipped steps set -e echo "๐Ÿงช Running BDD Tests..." cd /Users/gabrielradureau/Work/Vibe/DanceLessonsCoach # Run the BDD tests test_output=$(go test ./features/... -v 2>&1) test_exit_code=$? echo "$test_output" # Check for undefined steps if echo "$test_output" | grep -q "undefined"; then echo "โŒ FAILED: Found undefined steps" exit 1 fi # Check for pending steps if echo "$test_output" | grep -q "pending"; then echo "โŒ FAILED: Found pending steps" exit 1 fi # Check for skipped steps if echo "$test_output" | grep -q "skipped"; then echo "โŒ FAILED: Found skipped steps" exit 1 fi # Check if tests passed if [ $test_exit_code -eq 0 ]; then echo "โœ… All BDD tests passed successfully!" exit 0 else echo "โŒ BDD tests failed" exit 1 fi