Skip to content

Commit

Permalink
Revert "Move page closing to beforeEach"
Browse files Browse the repository at this point in the history
This reverts commit 2b092e2.
  • Loading branch information
sgomes committed Feb 10, 2023
1 parent 383811d commit b863d42
Showing 1 changed file with 5 additions and 7 deletions.
12 changes: 5 additions & 7 deletions packages/e2e-tests/config/setup-performance-test.js
Original file line number Diff line number Diff line change
Expand Up @@ -35,19 +35,17 @@ beforeAll( async () => {
await trashAllPosts();
await trashAllPosts( 'wp_block' );
await clearLocalStorage();
await setupPage();
await activatePlugin( 'gutenberg-test-plugin-disables-the-css-animations' );
} );

beforeEach( async () => {
// Close the previous page entirely and create a new page, so that the test
afterEach( async () => {
// Clear localStorage between tests so that the next test starts clean.
await clearLocalStorage();
// Close the previous page entirely and create a new page, so that the next test
// isn't affected by page unload work.
await page.close();
page = await browser.newPage();
// Set up testing config on new page.
await setupPage();
} );

afterEach( async () => {
// Clear localStorage between tests so that the next test starts clean.
await clearLocalStorage();
} );

0 comments on commit b863d42

Please sign in to comment.