diff --git a/packages/e2e-tests/specs/editor/blocks/__snapshots__/separator.test.js.snap b/packages/e2e-tests/specs/editor/blocks/__snapshots__/separator.test.js.snap deleted file mode 100644 index 9afc30c0e3271..0000000000000 --- a/packages/e2e-tests/specs/editor/blocks/__snapshots__/separator.test.js.snap +++ /dev/null @@ -1,7 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`Separator can be created by three dashes and enter 1`] = ` -" -
-" -`; diff --git a/packages/e2e-tests/specs/editor/blocks/separator.test.js b/packages/e2e-tests/specs/editor/blocks/separator.test.js deleted file mode 100644 index 1b24a7ec35716..0000000000000 --- a/packages/e2e-tests/specs/editor/blocks/separator.test.js +++ /dev/null @@ -1,22 +0,0 @@ -/** - * WordPress dependencies - */ -import { - clickBlockAppender, - getEditedPostContent, - createNewPost, -} from '@wordpress/e2e-test-utils'; - -describe( 'Separator', () => { - beforeEach( async () => { - await createNewPost(); - } ); - - it( 'can be created by three dashes and enter', async () => { - await clickBlockAppender(); - await page.keyboard.type( '---' ); - await page.keyboard.press( 'Enter' ); - - expect( await getEditedPostContent() ).toMatchSnapshot(); - } ); -} ); diff --git a/test/e2e/specs/editor/blocks/__snapshots__/Separator-can-be-created-by-three-dashes-and-enter-1-chromium.txt b/test/e2e/specs/editor/blocks/__snapshots__/Separator-can-be-created-by-three-dashes-and-enter-1-chromium.txt new file mode 100644 index 0000000000000..07b535a6be03c --- /dev/null +++ b/test/e2e/specs/editor/blocks/__snapshots__/Separator-can-be-created-by-three-dashes-and-enter-1-chromium.txt @@ -0,0 +1,3 @@ + +
+ \ No newline at end of file diff --git a/test/e2e/specs/editor/blocks/separator.spec.js b/test/e2e/specs/editor/blocks/separator.spec.js new file mode 100644 index 0000000000000..8f195392641c8 --- /dev/null +++ b/test/e2e/specs/editor/blocks/separator.spec.js @@ -0,0 +1,21 @@ +/** + * WordPress dependencies + */ +const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); + +test.describe( 'Separator', () => { + test.beforeEach( async ( { admin } ) => { + await admin.createNewPost(); + } ); + + test( 'can be created by three dashes and enter', async ( { + editor, + page, + } ) => { + await page.click( 'role=button[name="Add default block"i]' ); + await page.keyboard.type( '---' ); + await page.keyboard.press( 'Enter' ); + + expect( await editor.getEditedPostContent() ).toMatchSnapshot(); + } ); +} );