From 83b9fbc02128a9f990e54240b2147f574323439f Mon Sep 17 00:00:00 2001 From: Andrew Serong <14988353+andrewserong@users.noreply.github.com> Date: Mon, 6 Jun 2022 16:58:58 +1000 Subject: [PATCH] Testing: Remove snapshot from Post Editor Template Mode test and target expected string instead --- ...templates-in-classic-themes-1-chromium.txt | 22 ------------------- .../various/post-editor-template-mode.spec.js | 10 ++++----- 2 files changed, 5 insertions(+), 27 deletions(-) delete mode 100644 test/e2e/specs/editor/various/__snapshots__/Post-Editor-Template-mode-Allow-creating-custom-block-templates-in-classic-themes-1-chromium.txt diff --git a/test/e2e/specs/editor/various/__snapshots__/Post-Editor-Template-mode-Allow-creating-custom-block-templates-in-classic-themes-1-chromium.txt b/test/e2e/specs/editor/various/__snapshots__/Post-Editor-Template-mode-Allow-creating-custom-block-templates-in-classic-themes-1-chromium.txt deleted file mode 100644 index 85ba6f8f650989..00000000000000 --- a/test/e2e/specs/editor/various/__snapshots__/Post-Editor-Template-mode-Allow-creating-custom-block-templates-in-classic-themes-1-chromium.txt +++ /dev/null @@ -1,22 +0,0 @@ - -

gutenberg

- -

Just another WordPress site

- - - -
- - - -
-

Just an FSE Post

- - -
-

Hello World

-
- - - -

Just a random paragraph added to the template

diff --git a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js index 50eb276fe8af0a..483211d85528fb 100644 --- a/test/e2e/specs/editor/various/post-editor-template-mode.spec.js +++ b/test/e2e/specs/editor/various/post-editor-template-mode.spec.js @@ -94,12 +94,12 @@ test.describe( 'Post Editor Template mode', () => { // Preview changes. const previewPage = await editor.openPreviewPage(); - const siteBlocks = await previewPage.waitForSelector( - '.wp-site-blocks' - ); - const content = await siteBlocks.innerHTML(); - expect( content ).toMatchSnapshot(); + await expect( + previewPage.locator( + 'text="Just a random paragraph added to the template"' + ) + ).toBeVisible(); } ); test.describe( 'Delete Post Template Confirmation Dialog', () => {