- Create test event setup scripts for staging environment - Implement extended trainer journey test with improved error handling - Add test data creation script to generate 5 events with varying prices - Update trainer journey tests to handle different success scenarios - Improve test resilience with flexible success indicator checks Co-authored-by: Ben Reed <ben@tealmaker.com>
		
			
				
	
	
		
			32 lines
		
	
	
		
			No EOL
		
	
	
		
			956 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
			
		
		
	
	
			32 lines
		
	
	
		
			No EOL
		
	
	
		
			956 B
		
	
	
	
		
			Bash
		
	
	
	
	
	
| #!/bin/bash
 | |
| 
 | |
| # Deploy test files to staging
 | |
| echo "Deploying test files to staging..."
 | |
| 
 | |
| # Configuration
 | |
| STAGING_HOST="wordpress-974670-5399585.cloudwaysapps.com"
 | |
| SSH_USER="master"
 | |
| STAGING_PATH="/home/master/applications/uqlfiqglqg/public_html"
 | |
| LOCAL_PATH="/Users/ben/dev/upskill-event-manager/wordpress-dev"
 | |
| 
 | |
| # Deploy test setup script
 | |
| echo "Deploying setup-test-events.php..."
 | |
| scp $LOCAL_PATH/tests/setup-test-events.php $SSH_USER@$STAGING_HOST:$STAGING_PATH/wp-content/plugins/hvac-community-events/tests/
 | |
| 
 | |
| if [ $? -ne 0 ]; then
 | |
|     echo "Error: Failed to deploy test setup script."
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| echo "Test files deployed successfully!"
 | |
| 
 | |
| # Run the test setup script
 | |
| echo "Running test data setup..."
 | |
| ssh $SSH_USER@$STAGING_HOST "cd $STAGING_PATH && wp eval-file wp-content/plugins/hvac-community-events/tests/setup-test-events.php"
 | |
| 
 | |
| if [ $? -ne 0 ]; then
 | |
|     echo "Error: Failed to run test setup script."
 | |
|     exit 1
 | |
| fi
 | |
| 
 | |
| echo "Test data setup complete!" |