mirror of
git://develop.git.wordpress.org/
synced 2025-02-06 07:28:49 +01:00
28 lines
625 B
JavaScript
28 lines
625 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: require.resolve( './config/global-setup.js' ),
|
||
|
webServer: {
|
||
|
...baseConfig.webServer,
|
||
|
command: 'npm run env:start',
|
||
|
},
|
||
|
} );
|
||
|
|
||
|
export default config;
|