- Create authoritative DEPRECATED-FILES.md documenting 27+ deprecated files - Add deprecation notices to legacy templates (page-create-event.php, page-manage-event.php, page-edit-event.php) - Mark deprecated JavaScript files (hvac-event-form-templates.js) with migration paths - Add deprecation notices to 8 legacy test files with comprehensive explanations - Update Status.md to reflect completion of comprehensive event creation system v3.2.0 - Automated deprecation script for consistent messaging across files All deprecated functionality has been replaced by: - page-tec-create-event.php with AI assistance and native TEC integration - Comprehensive E2E testing framework with Page Object Model - Integrated template system with enhanced user experience - Modern responsive design with role-based permissions Scheduled for removal in v3.3 after transition period 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
67 lines
No EOL
2.1 KiB
Bash
Executable file
67 lines
No EOL
2.1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
# Script to add deprecation notices to old test files
|
|
# Created: January 2025
|
|
|
|
echo "Adding deprecation notices to old test files..."
|
|
|
|
DEPRECATION_NOTICE="/**
|
|
* ⛔ DEPRECATED - January 2025
|
|
* This test file has been deprecated and replaced by comprehensive E2E testing framework
|
|
*
|
|
* Reasons for deprecation:
|
|
* - Tests old event creation/management forms that have been replaced
|
|
* - Individual test files replaced by comprehensive test suites
|
|
* - Page Object Model (POM) architecture provides better test organization
|
|
* - Modern test framework with better error handling and reporting
|
|
*
|
|
* Replacement: test-master-trainer-e2e.js + test-comprehensive-validation.js
|
|
* - Comprehensive E2E testing covering all event workflows
|
|
* - Page Object Model for maintainable tests
|
|
* - Better test organization and reporting
|
|
* - Docker-based testing environment
|
|
*
|
|
* See: DEPRECATED-FILES.md for full migration details
|
|
*/"
|
|
|
|
# List of test files to deprecate
|
|
TEST_FILES=(
|
|
"test-edit-event-debug.js"
|
|
"test-edit-event-page.js"
|
|
"test-manage-event-fixes.js"
|
|
"test-final-manage-event.js"
|
|
"test-create-and-edit-event.js"
|
|
"test-create-and-edit-events.js"
|
|
"test-create-event-after-fix.js"
|
|
"debug-create-event-404.js"
|
|
)
|
|
|
|
for file in "${TEST_FILES[@]}"; do
|
|
if [ -f "$file" ]; then
|
|
echo "Adding deprecation notice to $file"
|
|
|
|
# Create a temporary file with deprecation notice
|
|
echo "#!/usr/bin/env node" > "${file}.tmp"
|
|
echo "" >> "${file}.tmp"
|
|
echo "$DEPRECATION_NOTICE" >> "${file}.tmp"
|
|
echo "" >> "${file}.tmp"
|
|
|
|
# Add the rest of the original file (skip shebang if present)
|
|
if head -1 "$file" | grep -q "^#!"; then
|
|
tail -n +2 "$file" >> "${file}.tmp"
|
|
else
|
|
cat "$file" >> "${file}.tmp"
|
|
fi
|
|
|
|
# Replace the original file
|
|
mv "${file}.tmp" "$file"
|
|
|
|
echo "✅ Updated $file"
|
|
else
|
|
echo "⚠️ File not found: $file"
|
|
fi
|
|
done
|
|
|
|
echo ""
|
|
echo "Deprecation notices added to test files."
|
|
echo "All deprecated files are now marked for removal in v3.3" |