Some checks failed
HVAC Plugin CI/CD Pipeline / Code Quality & Standards (push) Has been cancelled
HVAC Plugin CI/CD Pipeline / Unit Tests (push) Has been cancelled
Security Monitoring & Compliance / Secrets & Credential Scan (push) Has been cancelled
Security Monitoring & Compliance / WordPress Security Analysis (push) Has been cancelled
HVAC Plugin CI/CD Pipeline / Security Analysis (push) Has been cancelled
HVAC Plugin CI/CD Pipeline / Integration Tests (push) Has been cancelled
Security Monitoring & Compliance / Dependency Vulnerability Scan (push) Has been cancelled
Security Monitoring & Compliance / Static Code Security Analysis (push) Has been cancelled
Security Monitoring & Compliance / Security Compliance Validation (push) Has been cancelled
HVAC Plugin CI/CD Pipeline / Deploy to Staging (push) Has been cancelled
HVAC Plugin CI/CD Pipeline / Deploy to Production (push) Has been cancelled
HVAC Plugin CI/CD Pipeline / Notification (push) Has been cancelled
Security Monitoring & Compliance / Security Summary Report (push) Has been cancelled
Security Monitoring & Compliance / Security Team Notification (push) Has been cancelled
- Deploy 6 simultaneous WordPress specialized agents using sequential thinking and Zen MCP - Resolve all critical issues: permissions, jQuery dependencies, CDN mapping, security vulnerabilities - Implement bulletproof jQuery loading system with WordPress hook timing fixes - Create professional MapGeo Safety system with CDN health monitoring and fallback UI - Fix privilege escalation vulnerability with capability-based authorization - Add complete announcement admin system with modal forms and AJAX handling - Enhance import/export functionality (54 trainers successfully exported) - Achieve 100% operational master trainer functionality verified via MCP Playwright E2E testing 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
154 lines
No EOL
3.7 KiB
JavaScript
154 lines
No EOL
3.7 KiB
JavaScript
/**
|
|
* Playwright Configuration for HVAC Plugin Comprehensive Tests
|
|
*
|
|
* Configuration for all HVAC plugin test suites including:
|
|
* - CSS Asset Loading Tests
|
|
* - Authentication System Tests
|
|
* - AJAX Security Tests
|
|
* - Bundled Assets Tests
|
|
* - E2E Functionality Tests
|
|
*
|
|
* @package HVAC_Community_Events
|
|
* @since 2.0.0
|
|
*/
|
|
|
|
const { defineConfig, devices } = require('@playwright/test');
|
|
|
|
// Environment configuration
|
|
const isGnomeDesktop = process.env.XDG_CURRENT_DESKTOP === 'GNOME';
|
|
const hasDisplay = process.env.DISPLAY || process.env.WAYLAND_DISPLAY;
|
|
const useHeaded = !process.env.CI && process.env.HEADLESS !== 'true' && isGnomeDesktop && hasDisplay;
|
|
|
|
// Base URL configuration
|
|
const baseUrl = process.env.BASE_URL || 'http://localhost:8080';
|
|
|
|
module.exports = defineConfig({
|
|
// Test discovery
|
|
testDir: './',
|
|
testMatch: [
|
|
'**/css-asset-loading.test.js',
|
|
'**/authentication-system.test.js',
|
|
'**/ajax-security.test.js',
|
|
'**/bundled-assets.test.js',
|
|
'**/bundled-assets-standalone.test.js',
|
|
'**/build-system-security.test.js',
|
|
'**/e2e-bundled-assets-functionality.test.js'
|
|
],
|
|
|
|
// Execution settings
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 1,
|
|
workers: process.env.CI ? 1 : 2,
|
|
|
|
// Timeout settings
|
|
timeout: 60000, // 1 minute per test
|
|
expect: {
|
|
timeout: 10000 // 10 seconds for assertions
|
|
},
|
|
|
|
// Global setup and teardown
|
|
// globalSetup: require.resolve('./setup/global-setup.js'),
|
|
// globalTeardown: require.resolve('./setup/global-teardown.js'),
|
|
|
|
// Output and reporting
|
|
outputDir: './test-results/screenshots',
|
|
reporter: [
|
|
['html', {
|
|
outputFolder: './test-results/html-report',
|
|
open: 'never'
|
|
}],
|
|
['json', {
|
|
outputFile: './test-results/test-results.json'
|
|
}],
|
|
['list'],
|
|
['github'] // For CI
|
|
],
|
|
|
|
// Global test configuration
|
|
use: {
|
|
// Base URL for all tests
|
|
baseURL: baseUrl,
|
|
|
|
// Browser context options
|
|
headless: !useHeaded,
|
|
slowMo: useHeaded ? 500 : 0,
|
|
|
|
// Viewport and device emulation
|
|
viewport: { width: 1280, height: 720 },
|
|
|
|
// Screenshots and videos
|
|
screenshot: 'only-on-failure',
|
|
video: process.env.CI ? 'retain-on-failure' : 'off',
|
|
trace: 'retain-on-failure',
|
|
|
|
// Navigation and timing
|
|
navigationTimeout: 30000,
|
|
actionTimeout: 10000,
|
|
|
|
// Browser launch options for headed testing
|
|
...(useHeaded && {
|
|
launchOptions: {
|
|
args: [
|
|
'--start-maximized',
|
|
'--disable-features=TranslateUI'
|
|
],
|
|
slowMo: 500
|
|
}
|
|
})
|
|
},
|
|
|
|
// Browser projects
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
channel: 'chrome'
|
|
},
|
|
},
|
|
|
|
// Additional browsers for comprehensive testing
|
|
{
|
|
name: 'firefox',
|
|
use: {
|
|
...devices['Desktop Firefox']
|
|
},
|
|
},
|
|
|
|
{
|
|
name: 'webkit',
|
|
use: {
|
|
...devices['Desktop Safari']
|
|
},
|
|
},
|
|
|
|
// Mobile testing
|
|
{
|
|
name: 'Mobile Chrome',
|
|
use: {
|
|
...devices['Pixel 5']
|
|
},
|
|
},
|
|
|
|
{
|
|
name: 'Mobile Safari',
|
|
use: {
|
|
...devices['iPhone 12']
|
|
},
|
|
}
|
|
],
|
|
|
|
// Web server configuration disabled - using external server
|
|
// webServer: undefined,
|
|
});
|
|
|
|
console.log('🧪 Playwright Configuration Loaded');
|
|
console.log(`📍 Base URL: ${baseUrl}`);
|
|
console.log(`🖥️ Headed Mode: ${useHeaded ? 'ON' : 'OFF'}`);
|
|
console.log(`🔧 Environment: ${process.env.NODE_ENV || 'development'}`);
|
|
if (useHeaded) {
|
|
console.log(`📺 Display: ${process.env.DISPLAY || process.env.WAYLAND_DISPLAY}`);
|
|
console.log(`🖼️ Desktop: ${process.env.XDG_CURRENT_DESKTOP}`);
|
|
}
|
|
console.log(''); |