From 011597d02dc0e999bd617b5bf02f96b0a2f3af64 Mon Sep 17 00:00:00 2001 From: Jerry Jones Date: Fri, 6 Dec 2024 11:36:42 -0600 Subject: [PATCH] Normalize preload test by resetting preferences before the test starts This test kept failing for me, and I isolated it to if a test before it had run await admin.visitSiteEditor(), then the preload test would fail because the user had previously visited the site editor. By resetting preferences before the test runs, it allows a cleaner enviroment and the test has consistent results. --- test/e2e/specs/site-editor/preload.spec.js | 1 + 1 file changed, 1 insertion(+) diff --git a/test/e2e/specs/site-editor/preload.spec.js b/test/e2e/specs/site-editor/preload.spec.js index 2cd61283fbd9e8..e731e932e30523 100644 --- a/test/e2e/specs/site-editor/preload.spec.js +++ b/test/e2e/specs/site-editor/preload.spec.js @@ -6,6 +6,7 @@ const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); test.describe( 'Preload', () => { test.beforeAll( async ( { requestUtils } ) => { await requestUtils.activateTheme( 'emptytheme' ); + await requestUtils.resetPreferences(); } ); test.afterAll( async ( { requestUtils } ) => {