- Add HVAC_Test_User_Factory class with: * User creation with specific roles * Multiple role support * Persona management system * Account cleanup integration - Create comprehensive test suite in HVAC_Test_User_Factory_Test.php - Update testing improvement plan documentation - Add implementation decisions to project memory bank - Restructure .gitignore with: * Whitelist approach for better file management * Explicit backup exclusions * Specific bin directory inclusions Part of the Account Management component from the testing framework improvement plan.
107 lines
3.1 KiB
TypeScript
107 lines
3.1 KiB
TypeScript
import { defineConfig, devices } from '@playwright/test';
|
|
import { config as dotenvConfig } from 'dotenv';
|
|
import path from 'path';
|
|
import { VerbosityController, VerbosityLevel, parseVerbosityArgs } from './tests/e2e/utils/VerbosityController';
|
|
import { createCustomReporter } from './tests/e2e/reporters/reporterFactory';
|
|
|
|
// Load environment variables
|
|
dotenvConfig();
|
|
|
|
// Set minimal verbosity
|
|
const verbosity = VerbosityController.getInstance();
|
|
verbosity.setLevel(VerbosityLevel.MINIMAL);
|
|
|
|
// Staging server configuration
|
|
export const STAGING_CONFIG = {
|
|
url: 'wordpress-974670-5399585.cloudwaysapps.com',
|
|
ip: '146.190.76.204',
|
|
sshUser: 'roodev',
|
|
path: '/home/974670.cloudwaysapps.com/uberrxmprk/public_html'
|
|
} as const;
|
|
|
|
export default defineConfig({
|
|
testDir: './tests/e2e',
|
|
timeout: 30000,
|
|
fullyParallel: true,
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 0,
|
|
workers: process.env.CI ? 1 : undefined,
|
|
|
|
// Minimal reporting configuration
|
|
reporter: [
|
|
['dot'], // Most minimal reporter - just shows dots for passes and brief failure messages
|
|
],
|
|
|
|
// Global test configuration
|
|
use: {
|
|
baseURL: `https://${STAGING_CONFIG.url}`,
|
|
trace: 'retain-on-failure',
|
|
|
|
// Screenshot configuration based on verbosity
|
|
screenshot: {
|
|
mode: 'only-on-failure',
|
|
fullPage: true
|
|
},
|
|
|
|
// Video configuration based on verbosity
|
|
video: {
|
|
mode: 'retain-on-failure',
|
|
size: { width: 1280, height: 720 }
|
|
},
|
|
|
|
// Minimal logging configuration
|
|
contextOptions: {
|
|
logger: {
|
|
isEnabled: (name, severity) => severity === 'error', // Only enable error logging
|
|
log: (name, severity, message) => {
|
|
if (severity === 'error') {
|
|
console.error(`[${name}] ${message}`);
|
|
}
|
|
}
|
|
}
|
|
}
|
|
},
|
|
|
|
// Test projects configuration
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: {
|
|
...devices['Desktop Chrome'],
|
|
viewport: { width: 1920, height: 1080 }
|
|
},
|
|
},
|
|
{
|
|
name: 'firefox',
|
|
use: {
|
|
...devices['Desktop Firefox'],
|
|
viewport: { width: 1920, height: 1080 }
|
|
},
|
|
},
|
|
{
|
|
name: 'webkit',
|
|
use: {
|
|
...devices['Desktop Safari'],
|
|
viewport: { width: 1920, height: 1080 }
|
|
},
|
|
},
|
|
{
|
|
name: 'Mobile Chrome',
|
|
use: {
|
|
...devices['Pixel 5'],
|
|
deviceScaleFactor: 2
|
|
},
|
|
},
|
|
{
|
|
name: 'Mobile Safari',
|
|
use: {
|
|
...devices['iPhone 12'],
|
|
deviceScaleFactor: 2
|
|
},
|
|
},
|
|
],
|
|
|
|
// Global setup configuration
|
|
globalSetup: require.resolve('./tests/e2e/global-setup'),
|
|
globalTeardown: require.resolve('./tests/e2e/global-teardown'),
|
|
});
|