From 187acdfdaee0b147f76672474765d8c134175b9d Mon Sep 17 00:00:00 2001 From: Bart Kalisz Date: Thu, 20 Jun 2024 17:08:20 +0200 Subject: [PATCH] restore global setup for pre-auth --- test/e2e/config/global-setup.ts | 13 ------------- test/e2e/playwright.config.ts | 4 +++- 2 files changed, 3 insertions(+), 14 deletions(-) diff --git a/test/e2e/config/global-setup.ts b/test/e2e/config/global-setup.ts index 787488ac72fca..10f2822fdfe1a 100644 --- a/test/e2e/config/global-setup.ts +++ b/test/e2e/config/global-setup.ts @@ -25,19 +25,6 @@ async function globalSetup( config: FullConfig ) { // Authenticate and save the storageState to disk. await requestUtils.setupRest(); - // Reset the test environment before running the tests. - await Promise.all( [ - requestUtils.activateTheme( 'twentytwentyone' ), - // Disable this test plugin as it's conflicting with some of the tests. - // We already have reduced motion enabled and Playwright will wait for most of the animations anyway. - requestUtils.deactivatePlugin( - 'gutenberg-test-plugin-disables-the-css-animations' - ), - requestUtils.deleteAllPosts(), - requestUtils.deleteAllBlocks(), - requestUtils.resetPreferences(), - ] ); - await requestContext.dispose(); } diff --git a/test/e2e/playwright.config.ts b/test/e2e/playwright.config.ts index 30ecdada114c4..df1480a5dda4f 100644 --- a/test/e2e/playwright.config.ts +++ b/test/e2e/playwright.config.ts @@ -17,7 +17,9 @@ const config = defineConfig( { : 'list', workers: 1, webServer: undefined, - globalSetup: undefined, + globalSetup: fileURLToPath( + new URL( './config/global-setup.ts', 'file:' + __filename ).href + ), projects: [ { name: 'chromium',