diff --git a/tests/performance/config/global-setup.js b/tests/performance/config/global-setup.js index 25e99a47d8457..0c8063cf1a5a5 100644 --- a/tests/performance/config/global-setup.js +++ b/tests/performance/config/global-setup.js @@ -30,7 +30,12 @@ async function globalSetup( config ) { await requestUtils.setupRest(); // Reset the test environment before running the tests. - await Promise.all( [ requestUtils.activateTheme( 'twentytwentyone' ) ] ); + await Promise.all( [ + requestUtils.activateTheme( 'twentytwentyone' ), + requestUtils.deleteAllPosts(), + requestUtils.deleteAllBlocks(), + requestUtils.resetPreferences(), + ] ); await requestContext.dispose(); } diff --git a/tests/performance/playwright.config.js b/tests/performance/playwright.config.js index c4df0e2872953..100521f642489 100644 --- a/tests/performance/playwright.config.js +++ b/tests/performance/playwright.config.js @@ -7,7 +7,7 @@ import { defineConfig } from '@playwright/test'; /** * WordPress dependencies */ -import baseConfig from '@wordpress/scripts/config/playwright.config'; +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( @@ -33,8 +33,8 @@ const config = defineConfig( { command: 'npm run env:start', }, use: { - ...baseConfig.use, video: 'off', + browserName: 'chromium', // Use only Chromium. }, } );