- Troubleshooted and fixed issues with the plugin deployment script (`deploy-plugin.sh`) to ensure all necessary plugin files, including the main plugin file, are correctly transferred to the staging environment. - Corrected a role name mismatch in the test user creation script (`setup-staging-test-users.sh`) to successfully create a test user with the `hvac_trainer` role on staging. - Updated the E2E test runner script (`run-tests.sh`) to replace deprecated Docker commands with SSH commands targeting the staging environment and explicitly pass the staging URL to Playwright. - Increased the global timeout and enabled retries in the Playwright configuration (`playwright.config.ts`) to aid in debugging test failures on the staging environment. - Updated documentation files (`docs/mvp-integration-testing-plan.md`, `wordpress-dev/README.md`, and `wordpress-dev/MIGRATION_GUIDE.md`) to include instructions on setting up the test user for the staging environment and corrected section numbering in the testing plan.
33 lines
No EOL
896 B
TypeScript
33 lines
No EOL
896 B
TypeScript
import type { PlaywrightTestConfig } from '@playwright/test';
|
|
|
|
import * as path from 'path';
|
|
|
|
const config: PlaywrightTestConfig = {
|
|
testDir: './tests',
|
|
globalSetup: require.resolve('./global-setup'), // Add global setup script
|
|
timeout: 60000, // Increased timeout for staging environment
|
|
forbidOnly: !!process.env.CI,
|
|
retries: process.env.CI ? 2 : 1, // Enabled retries for debugging
|
|
workers: process.env.CI ? 1 : undefined,
|
|
reporter: [
|
|
['list'],
|
|
['html', { open: 'never' }],
|
|
['junit', { outputFile: '../test-results/e2e-results.xml' }]
|
|
],
|
|
use: {
|
|
baseURL: process.env.UPSKILL_STAGING_URL, // Use staging URL from environment variable
|
|
trace: 'on-first-retry',
|
|
video: 'on-first-retry',
|
|
screenshot: 'only-on-failure'
|
|
},
|
|
projects: [
|
|
{
|
|
name: 'chromium',
|
|
use: {
|
|
browserName: 'chromium',
|
|
},
|
|
},
|
|
],
|
|
};
|
|
|
|
export default config; |