Some checks are pending
HVAC Plugin CI/CD Pipeline / Security Analysis (push) Waiting to run
HVAC Plugin CI/CD Pipeline / Code Quality & Standards (push) Waiting to run
HVAC Plugin CI/CD Pipeline / Unit Tests (push) Waiting to run
HVAC Plugin CI/CD Pipeline / Integration Tests (push) Waiting to run
HVAC Plugin CI/CD Pipeline / Deploy to Staging (push) Blocked by required conditions
HVAC Plugin CI/CD Pipeline / Deploy to Production (push) Blocked by required conditions
HVAC Plugin CI/CD Pipeline / Notification (push) Blocked by required conditions
Security Monitoring & Compliance / Dependency Vulnerability Scan (push) Waiting to run
Security Monitoring & Compliance / Secrets & Credential Scan (push) Waiting to run
Security Monitoring & Compliance / WordPress Security Analysis (push) Waiting to run
Security Monitoring & Compliance / Static Code Security Analysis (push) Waiting to run
Security Monitoring & Compliance / Security Compliance Validation (push) Waiting to run
Security Monitoring & Compliance / Security Summary Report (push) Blocked by required conditions
Security Monitoring & Compliance / Security Team Notification (push) Blocked by required conditions
- Add 90+ test files including E2E, unit, and integration tests - Implement Page Object Model (POM) architecture - Add Docker testing environment with comprehensive services - Include modernized test framework with error recovery - Add specialized test suites for master trainer and trainer workflows - Update .gitignore to properly track test infrastructure 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
187 lines
No EOL
5.4 KiB
JavaScript
187 lines
No EOL
5.4 KiB
JavaScript
/**
|
|
* Production Environment Configuration
|
|
* CRITICAL: Read-only testing on production - no data modifications allowed
|
|
*/
|
|
|
|
module.exports = {
|
|
// Environment identification
|
|
name: 'production',
|
|
displayName: 'Production Environment (READ-ONLY)',
|
|
|
|
// Base URL and endpoints
|
|
baseUrl: 'https://upskill.measurequick.com',
|
|
adminUrl: 'https://upskill.measurequick.com/wp-admin',
|
|
apiUrl: 'https://upskill.measurequick.com/wp-json',
|
|
|
|
// Authentication endpoints
|
|
loginPath: '/community-login/',
|
|
logoutPath: '/wp-login.php?action=logout',
|
|
|
|
// Browser configuration - more conservative for production
|
|
browser: {
|
|
type: 'chromium',
|
|
headless: true, // Always headless in production
|
|
slowMo: 1000, // Slower for production
|
|
timeout: 45000, // Longer timeout for production
|
|
viewport: { width: 1280, height: 720 },
|
|
video: false, // No video recording in production
|
|
screenshot: 'only-on-failure'
|
|
},
|
|
|
|
// Test execution settings - very conservative
|
|
test: {
|
|
timeout: 90000, // Longer timeout for production
|
|
retries: 1, // Fewer retries to avoid spam
|
|
workers: 1, // Single worker only
|
|
parallel: false, // No parallel execution
|
|
screenshotOnFailure: true,
|
|
videoOnFailure: false
|
|
},
|
|
|
|
// WordPress specific settings
|
|
wordpress: {
|
|
adminUser: {
|
|
// Production admin credentials from environment variables only
|
|
username: process.env.PROD_WP_ADMIN_USERNAME,
|
|
password: process.env.PROD_WP_ADMIN_PASSWORD
|
|
},
|
|
database: {
|
|
// Read-only database access if needed
|
|
host: process.env.PROD_DB_HOST,
|
|
name: process.env.PROD_DB_NAME,
|
|
user: process.env.PROD_DB_READ_USER,
|
|
password: process.env.PROD_DB_READ_PASSWORD
|
|
}
|
|
},
|
|
|
|
// Test accounts - production accounts only
|
|
accounts: {
|
|
masterTrainer: {
|
|
username: process.env.PROD_MASTER_USERNAME,
|
|
password: process.env.PROD_MASTER_PASSWORD,
|
|
email: process.env.PROD_MASTER_EMAIL,
|
|
role: 'master_trainer'
|
|
},
|
|
trainer: {
|
|
username: process.env.PROD_TRAINER_USERNAME,
|
|
password: process.env.PROD_TRAINER_PASSWORD,
|
|
email: process.env.PROD_TRAINER_EMAIL,
|
|
role: 'hvac_trainer'
|
|
}
|
|
},
|
|
|
|
// Security settings - strict for production
|
|
security: {
|
|
allowInsecureCertificates: false,
|
|
ignoreHttpsErrors: false,
|
|
skipCsrfValidation: false
|
|
},
|
|
|
|
// Performance settings - minimal impact
|
|
performance: {
|
|
slowNetworkSimulation: false,
|
|
resourceBlocking: {
|
|
images: false,
|
|
fonts: false,
|
|
stylesheets: false
|
|
}
|
|
},
|
|
|
|
// Evidence collection - minimal for production
|
|
evidence: {
|
|
screenshots: {
|
|
enabled: true,
|
|
onFailure: true,
|
|
onSuccess: false,
|
|
fullPage: false // Faster screenshots
|
|
},
|
|
videos: {
|
|
enabled: false, // No videos in production
|
|
onFailure: false,
|
|
onSuccess: false
|
|
},
|
|
logs: {
|
|
enabled: true,
|
|
level: 'warn', // Only warnings and errors
|
|
includeNetwork: false,
|
|
includeConsole: false
|
|
}
|
|
},
|
|
|
|
// Test data - READ-ONLY mode
|
|
testData: {
|
|
events: {
|
|
// Use existing production data only
|
|
readOnly: true,
|
|
createTestData: false,
|
|
modifyData: false
|
|
},
|
|
announcements: {
|
|
readOnly: true,
|
|
createTestData: false,
|
|
modifyData: false
|
|
}
|
|
},
|
|
|
|
// Protected URLs - production URLs
|
|
protectedUrls: [
|
|
'/trainer/dashboard/',
|
|
'/trainer/venue/list/',
|
|
'/trainer/venue/manage/',
|
|
'/trainer/organizer/manage/',
|
|
'/trainer/profile/training-leads/',
|
|
'/master-trainer/master-dashboard/',
|
|
'/master-trainer/events/',
|
|
'/master-trainer/google-sheets/',
|
|
'/master-trainer/announcements/',
|
|
'/master-trainer/pending-approvals/',
|
|
'/master-trainer/trainers/',
|
|
'/master-trainer/communication-templates/'
|
|
],
|
|
|
|
// Expected response codes
|
|
expectedResponseCodes: {
|
|
authenticated: 200,
|
|
unauthenticated: 302,
|
|
forbidden: 403,
|
|
notFound: 404
|
|
},
|
|
|
|
// Cleanup settings - NO CLEANUP in production
|
|
cleanup: {
|
|
deleteTestData: false,
|
|
resetUserSessions: false,
|
|
clearCache: false
|
|
},
|
|
|
|
// Production-specific warnings and validations
|
|
productionSafeguards: {
|
|
requireEnvironmentVariables: true,
|
|
confirmReadOnlyMode: true,
|
|
maxTestDuration: 300000, // 5 minutes max
|
|
allowedTestTypes: ['smoke', 'read-only', 'monitoring'],
|
|
forbiddenOperations: [
|
|
'create',
|
|
'update',
|
|
'delete',
|
|
'modify',
|
|
'seed',
|
|
'cleanup',
|
|
'database-write'
|
|
]
|
|
},
|
|
|
|
// Monitoring and alerting
|
|
monitoring: {
|
|
enabled: true,
|
|
alertOnFailures: true,
|
|
alertThreshold: 1, // Alert on any failure
|
|
healthCheckInterval: 300000, // 5 minutes
|
|
endpoints: [
|
|
'/',
|
|
'/community-login/',
|
|
'/trainer/dashboard/',
|
|
'/master-trainer/master-dashboard/'
|
|
]
|
|
}
|
|
}; |