mirror of
git://develop.git.wordpress.org/
synced 2025-02-23 08:03:41 +01:00
Adds new tests for localized sites as well as the dashboard. Also amends Server-Timing output to measure memory usage in all scenarios. Props swissspidy, joemcgill, flixos90, mukesh27, mamaduka. See #59656. Fixes #59815. git-svn-id: https://develop.svn.wordpress.org/trunk@57083 602fd350-edb4-49c9-b593-d223f7449a82
41 lines
1019 B
JavaScript
41 lines
1019 B
JavaScript
/**
|
|
* External dependencies
|
|
*/
|
|
import path from 'node:path';
|
|
import { defineConfig } from '@playwright/test';
|
|
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
import baseConfig from '@wordpress/scripts/config/playwright.config';
|
|
|
|
process.env.WP_ARTIFACTS_PATH ??= path.join( process.cwd(), 'artifacts' );
|
|
process.env.STORAGE_STATE_PATH ??= path.join(
|
|
process.env.WP_ARTIFACTS_PATH,
|
|
'storage-states/admin.json'
|
|
);
|
|
process.env.TEST_RUNS ??= '20';
|
|
|
|
const config = defineConfig( {
|
|
...baseConfig,
|
|
globalSetup: require.resolve( './config/global-setup.js' ),
|
|
reporter: [ [ 'list' ], [ './config/performance-reporter.js' ] ],
|
|
forbidOnly: !! process.env.CI,
|
|
workers: 1,
|
|
retries: 0,
|
|
timeout: parseInt( process.env.TIMEOUT || '', 10 ) || 600_000, // Defaults to 10 minutes.
|
|
// Don't report slow test "files", as we will be running our tests in serial.
|
|
reportSlowTests: null,
|
|
webServer: {
|
|
...baseConfig.webServer,
|
|
command: 'npm run env:start',
|
|
},
|
|
use: {
|
|
...baseConfig.use,
|
|
video: 'off',
|
|
},
|
|
} );
|
|
|
|
export default config;
|
|
|