From 8bee004d9014604d4b9ea6a2cc20634e507ccb14 Mon Sep 17 00:00:00 2001 From: George Mamadashvili Date: Thu, 15 Aug 2024 19:18:56 +0400 Subject: [PATCH] Fix flaky block template registration e2e test (#64541) Co-authored-by: Mamaduka --- test/e2e/specs/site-editor/template-registration.spec.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/test/e2e/specs/site-editor/template-registration.spec.js b/test/e2e/specs/site-editor/template-registration.spec.js index 132e3a8c49a902..3927623b2824dc 100644 --- a/test/e2e/specs/site-editor/template-registration.spec.js +++ b/test/e2e/specs/site-editor/template-registration.spec.js @@ -243,8 +243,13 @@ test.describe( 'Block template registration', () => { test( 'WP default templates can be overridden by plugins', async ( { page, + requestUtils, } ) => { - await page.goto( '?page_id=2' ); + const { id } = await requestUtils.createPage( { + title: 'Plugin override page', + status: 'publish', + } ); + await page.goto( `?page_id=${ id }` ); await expect( page.getByText( 'This is a plugin-registered page template.' ) ).toBeVisible();