mirror of
git://develop.git.wordpress.org/
synced 2025-01-17 12:58:25 +01:00
5a838d1bb7
As per the migration plan shared last year, this migrates all browser-based tests in WordPress core to use Playwright. This includes end-to-end, performance, and visual regression tests. Props swissspidy, mamaduka, kevin940726, bartkalisz, desrosj, adamsilverstein. Fixes #59517. git-svn-id: https://develop.svn.wordpress.org/trunk@56926 602fd350-edb4-49c9-b593-d223f7449a82
28 lines
589 B
JavaScript
28 lines
589 B
JavaScript
/**
|
|
* External dependencies
|
|
*/
|
|
import path from 'node:path';
|
|
import { defineConfig } from '@playwright/test';
|
|
|
|
/**
|
|
* WordPress dependencies
|
|
*/
|
|
const baseConfig = require( '@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'
|
|
);
|
|
|
|
const config = defineConfig( {
|
|
...baseConfig,
|
|
globalSetup: undefined,
|
|
webServer: {
|
|
...baseConfig.webServer,
|
|
command: 'npm run env:start',
|
|
},
|
|
} );
|
|
|
|
export default config;
|