wordpress/tests/e2e/playwright.config.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
625 B
JavaScript
Raw Normal View History

/**
* 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;