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>
219 lines
No EOL
6.9 KiB
JavaScript
219 lines
No EOL
6.9 KiB
JavaScript
/**
|
|
* Staging Environment Configuration for HVAC Testing Framework
|
|
*
|
|
* Configuration specific to the staging environment at upskill-staging.measurequick.com
|
|
*
|
|
* @package HVAC_Community_Events
|
|
* @version 2.0.0
|
|
* @created 2025-08-27
|
|
*/
|
|
|
|
module.exports = {
|
|
// Application Settings
|
|
app: {
|
|
baseUrl: 'https://upskill-staging.measurequick.com',
|
|
environment: 'staging',
|
|
debug: true
|
|
},
|
|
|
|
// Test User Configurations
|
|
environments: {
|
|
users: {
|
|
trainer: {
|
|
username: 'test_trainer',
|
|
email: 'test_trainer@example.com',
|
|
password: 'TestTrainer123!',
|
|
role: 'hvac_trainer',
|
|
defaultPage: '/trainer/dashboard/'
|
|
},
|
|
masterTrainer: {
|
|
username: 'test_master',
|
|
email: 'test_master@example.com',
|
|
password: 'TestMaster123!',
|
|
role: 'hvac_master_trainer',
|
|
defaultPage: '/master-trainer/master-dashboard/'
|
|
},
|
|
admin: {
|
|
username: 'admin',
|
|
email: 'admin@upskill-staging.measurequick.com',
|
|
password: process.env.STAGING_ADMIN_PASSWORD || 'AdminPassword123!',
|
|
role: 'administrator',
|
|
defaultPage: '/wp-admin/'
|
|
},
|
|
// Alternative master trainer account
|
|
masterTrainerAlt: {
|
|
username: 'JoeMedosch@gmail.com',
|
|
email: 'JoeMedosch@gmail.com',
|
|
password: 'JoeTrainer2025@',
|
|
role: 'hvac_master_trainer',
|
|
defaultPage: '/master-trainer/master-dashboard/'
|
|
}
|
|
}
|
|
},
|
|
|
|
// Database Configuration (for direct access if needed)
|
|
database: {
|
|
host: process.env.STAGING_DB_HOST || 'localhost',
|
|
name: process.env.STAGING_DB_NAME || 'upskill_staging',
|
|
user: process.env.STAGING_DB_USER || 'staging_user',
|
|
password: process.env.STAGING_DB_PASSWORD || '',
|
|
prefix: 'wp_',
|
|
charset: 'utf8mb4',
|
|
isolation: true // Use transactions for test isolation
|
|
},
|
|
|
|
// WordPress-specific settings
|
|
wordpress: {
|
|
cliPath: 'wp',
|
|
adminPath: '/wp-admin/',
|
|
loginPath: '/wp-login.php',
|
|
customLoginPath: '/training-login/',
|
|
apiPath: '/wp-json/',
|
|
databaseIsolation: false, // Don't modify staging database
|
|
flushRewriteRules: false, // Don't flush rules on staging
|
|
clearCache: false // Don't clear cache on staging
|
|
},
|
|
|
|
// Browser settings optimized for staging
|
|
browser: {
|
|
headless: process.env.CI === 'true' || process.env.HEADLESS === 'true',
|
|
slowMo: process.env.CI === 'true' ? 0 : 200,
|
|
viewport: {
|
|
width: 1280,
|
|
height: 720
|
|
},
|
|
args: [
|
|
'--disable-dev-shm-usage',
|
|
'--no-sandbox',
|
|
'--disable-setuid-sandbox',
|
|
'--ignore-certificate-errors', // For staging SSL
|
|
'--ignore-ssl-errors',
|
|
'--disable-web-security'
|
|
]
|
|
},
|
|
|
|
// Test execution parameters
|
|
framework: {
|
|
timeout: 45000, // Longer timeout for staging
|
|
retries: 3, // More retries for staging network issues
|
|
parallel: true,
|
|
maxWorkers: 2, // Fewer workers for staging
|
|
testDataIsolation: false, // Don't modify staging data
|
|
screenshotsOnFailure: true,
|
|
videosOnFailure: true
|
|
},
|
|
|
|
// Staging-specific test data
|
|
testData: {
|
|
seedData: false, // Don't seed data on staging
|
|
cleanupAfterTests: false, // Don't cleanup staging data
|
|
isolateTransactions: false,
|
|
backupDatabase: false,
|
|
fixtures: {
|
|
users: './fixtures/staging-users.json',
|
|
events: './fixtures/staging-events.json',
|
|
venues: './fixtures/staging-venues.json'
|
|
}
|
|
},
|
|
|
|
// Features available in staging
|
|
features: {
|
|
trainerRegistration: true,
|
|
eventCreation: true,
|
|
profileManagement: true,
|
|
announcements: true,
|
|
masterTrainerTools: true,
|
|
importExport: true,
|
|
communicationTemplates: true,
|
|
trainingLeads: true,
|
|
certificates: true,
|
|
geocoding: true,
|
|
mobileResponsive: true
|
|
},
|
|
|
|
// Staging-specific selectors (may differ from production)
|
|
selectors: {
|
|
dataTestIdAttribute: 'data-testid',
|
|
roleAttribute: 'data-role',
|
|
pageAttribute: 'data-page',
|
|
formAttribute: 'data-form',
|
|
buttonAttribute: 'data-action'
|
|
},
|
|
|
|
// Media settings for staging
|
|
media: {
|
|
screenshotDir: './test-results/screenshots/staging',
|
|
videoDir: './test-results/videos/staging',
|
|
screenshotMode: 'only-on-failure',
|
|
videoMode: 'retain-on-failure',
|
|
quality: 80,
|
|
fullPage: false
|
|
},
|
|
|
|
// Reporting configuration
|
|
reporting: {
|
|
outputDir: './test-results/reports/staging',
|
|
formats: ['html', 'json'],
|
|
includeScreenshots: true,
|
|
includeTimings: true,
|
|
groupByCategory: true,
|
|
stagingSpecificMetadata: {
|
|
environment: 'staging',
|
|
baseUrl: 'https://upskill-staging.measurequick.com',
|
|
testRunId: process.env.TEST_RUN_ID || Date.now().toString()
|
|
}
|
|
},
|
|
|
|
// Network and security settings for staging
|
|
network: {
|
|
timeout: 30000,
|
|
ignoreHTTPSErrors: true,
|
|
bypassCSP: false,
|
|
userAgent: 'HVAC-Testing-Framework/2.0 Playwright (Staging)'
|
|
},
|
|
|
|
// Expected staging-specific URLs and endpoints
|
|
urls: {
|
|
login: '/training-login/',
|
|
wpLogin: '/wp-login.php',
|
|
trainerDashboard: '/trainer/dashboard/',
|
|
masterDashboard: '/master-trainer/master-dashboard/',
|
|
createEvent: '/trainer/create-event/',
|
|
manageEvents: '/trainer/events/',
|
|
profile: '/trainer/profile/',
|
|
findTrainer: '/find-trainer/',
|
|
registration: '/trainer-registration/'
|
|
},
|
|
|
|
// Expected staging content and messages
|
|
expectedContent: {
|
|
loginPageTitle: 'Training Login',
|
|
dashboardTitle: 'HVAC Trainer Dashboard',
|
|
masterDashboardTitle: 'Master Trainer Dashboard',
|
|
welcomeMessage: 'Welcome to HVAC Training',
|
|
noAccessMessage: 'You do not have permission to access this page'
|
|
},
|
|
|
|
// Known staging issues or workarounds
|
|
stagingSpecific: {
|
|
// SSL certificate issues
|
|
ignoreSSLErrors: true,
|
|
|
|
// Known slow endpoints
|
|
slowEndpoints: [
|
|
'/master-trainer/events/',
|
|
'/trainer/create-event/',
|
|
'/find-trainer/'
|
|
],
|
|
|
|
// Features that might be unstable
|
|
unstableFeatures: [
|
|
'geocoding',
|
|
'csv-import'
|
|
],
|
|
|
|
// Cache behavior
|
|
cacheEnabled: true,
|
|
cacheTTL: 3600
|
|
}
|
|
}; |