From a3a63c111aad8cc7be2cf77c6cb525fe6e0d7baa Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Tue, 30 May 2023 08:37:02 +0100 Subject: [PATCH] E2e tests: Add an assertion to confirm that the URL changed (#50835) --- test/e2e/specs/site-editor/command-center.spec.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/test/e2e/specs/site-editor/command-center.spec.js b/test/e2e/specs/site-editor/command-center.spec.js index 9661a91a6abc7..57b07faf4d9b4 100644 --- a/test/e2e/specs/site-editor/command-center.spec.js +++ b/test/e2e/specs/site-editor/command-center.spec.js @@ -28,6 +28,9 @@ test.describe( 'Site editor command center', () => { await page.getByRole( 'option', { name: 'Add new page' } ).click(); await page.waitForSelector( 'iframe[name="editor-canvas"]' ); const frame = page.frame( 'editor-canvas' ); + await expect( page ).toHaveURL( + '/wp-admin/post-new.php?post_type=page' + ); await expect( frame.getByRole( 'textbox', { name: 'Add title' } ) ).toBeVisible();