diff --git a/playwright.config.mjs b/playwright.config.mjs index 68e9177..ed68f4d 100644 --- a/playwright.config.mjs +++ b/playwright.config.mjs @@ -4,6 +4,7 @@ export default defineConfig({ testDir: './tests/e2e', globalSetup: './tests/e2e/global-setup.mjs', fullyParallel: true, + workers: 2, forbidOnly: Boolean(process.env.CI), retries: process.env.CI ? 2 : 0, reporter: 'html', diff --git a/tests/smoke/e2e-harness.test.mjs b/tests/smoke/e2e-harness.test.mjs index 1e7bcb4..9308bb1 100644 --- a/tests/smoke/e2e-harness.test.mjs +++ b/tests/smoke/e2e-harness.test.mjs @@ -24,6 +24,12 @@ test( 'Playwright seeds deterministic local fixtures once outside browser worker assert.doesNotMatch( spec, /wp-env|execFileSync|beforeAll/ ); } ); +test( 'Playwright caps read-only browser concurrency for the local WordPress stack', async () => { + const { default: config } = await import( '../../playwright.config.mjs' ); + + assert.equal( config.workers, 2 ); +} ); + test( 'exactly two serial mutation projects run after every read-only browser', async () => { const config = await readFile( 'playwright.config.mjs', 'utf8' ); const files = await readdir( 'tests/e2e' );