diff --git a/packages/e2e-tests/specs/editor/blocks/__snapshots__/heading.test.js.snap b/packages/e2e-tests/specs/editor/blocks/__snapshots__/heading.test.js.snap
deleted file mode 100644
index 68fd617f7d40c0..00000000000000
--- a/packages/e2e-tests/specs/editor/blocks/__snapshots__/heading.test.js.snap
+++ /dev/null
@@ -1,51 +0,0 @@
-// Jest Snapshot v1, https://goo.gl/fbAQLP
-
-exports[`Heading can be created by prefixing existing content with number signs and a space 1`] = `
-"
-
4
-"
-`;
-
-exports[`Heading can be created by prefixing number sign and a space 1`] = `
-"
-3
-"
-`;
-
-exports[`Heading should correctly apply named colors 1`] = `
-"
-Heading
-"
-`;
-
-exports[`Heading should create a paragraph block above when pressing enter at the start 1`] = `
-"
-
-
-
-
-a
-"
-`;
-
-exports[`Heading should create a paragraph block below when pressing enter at the end 1`] = `
-"
-a
-
-
-
-
-"
-`;
-
-exports[`Heading should not work with the list input rule 1`] = `
-"
-1. H
-"
-`;
-
-exports[`Heading should work with the format input rules 1`] = `
-"
-code
-"
-`;
diff --git a/packages/e2e-tests/specs/editor/blocks/heading.test.js b/packages/e2e-tests/specs/editor/blocks/heading.test.js
deleted file mode 100644
index fb89bed12accc6..00000000000000
--- a/packages/e2e-tests/specs/editor/blocks/heading.test.js
+++ /dev/null
@@ -1,113 +0,0 @@
-/**
- * WordPress dependencies
- */
-import {
- clickBlockAppender,
- createNewPost,
- getEditedPostContent,
- pressKeyWithModifier,
-} from '@wordpress/e2e-test-utils';
-
-describe( 'Heading', () => {
- const COLOR_ITEM_SELECTOR =
- '.block-editor-panel-color-gradient-settings__dropdown';
- const CUSTOM_COLOR_BUTTON_X_SELECTOR = `.components-color-palette__custom-color`;
- const COLOR_INPUT_FIELD_SELECTOR =
- '.components-color-picker .components-input-control__input';
-
- beforeEach( async () => {
- await createNewPost();
- } );
-
- it( 'can be created by prefixing number sign and a space', async () => {
- await clickBlockAppender();
- await page.keyboard.type( '### 3' );
-
- expect( await getEditedPostContent() ).toMatchSnapshot();
- } );
-
- it( 'can be created by prefixing existing content with number signs and a space', async () => {
- await clickBlockAppender();
- await page.keyboard.type( '4' );
- await page.keyboard.press( 'ArrowLeft' );
- await page.keyboard.type( '#### ' );
-
- expect( await getEditedPostContent() ).toMatchSnapshot();
- } );
-
- it( 'should not work with the list input rule', async () => {
- await clickBlockAppender();
- await page.keyboard.type( '## 1. H' );
-
- expect( await getEditedPostContent() ).toMatchSnapshot();
- } );
-
- it( 'should work with the format input rules', async () => {
- await clickBlockAppender();
- await page.keyboard.type( '## `code`' );
-
- expect( await getEditedPostContent() ).toMatchSnapshot();
- } );
-
- it( 'should create a paragraph block above when pressing enter at the start', async () => {
- await page.keyboard.press( 'Enter' );
- await page.keyboard.type( '## a' );
- await page.keyboard.press( 'ArrowLeft' );
- await page.keyboard.press( 'Enter' );
-
- expect( await getEditedPostContent() ).toMatchSnapshot();
- } );
-
- it( 'should create a paragraph block below when pressing enter at the end', async () => {
- await page.keyboard.press( 'Enter' );
- await page.keyboard.type( '## a' );
- await page.keyboard.press( 'Enter' );
-
- expect( await getEditedPostContent() ).toMatchSnapshot();
- } );
-
- it( 'should correctly apply custom colors', async () => {
- await clickBlockAppender();
- await page.keyboard.type( '### Heading' );
-
- const textColorButton = await page.waitForSelector(
- COLOR_ITEM_SELECTOR
- );
- await textColorButton.click();
-
- const customTextColorButton = await page.waitForSelector(
- CUSTOM_COLOR_BUTTON_X_SELECTOR
- );
-
- await customTextColorButton.click();
- await page.waitForSelector( COLOR_INPUT_FIELD_SELECTOR );
- await page.click( COLOR_INPUT_FIELD_SELECTOR );
- await pressKeyWithModifier( 'primary', 'A' );
- await page.keyboard.type( '4b7f4d' );
- await page.keyboard.press( 'Enter' );
- expect( await getEditedPostContent() ).toMatchInlineSnapshot( `
- "
- Heading
- "
- ` );
- } );
-
- it( 'should correctly apply named colors', async () => {
- await clickBlockAppender();
- await page.keyboard.type( '## Heading' );
-
- const textColorButton = await page.waitForSelector(
- COLOR_ITEM_SELECTOR
- );
- await textColorButton.click();
-
- const colorButtonSelector = `//button[@aria-label='Color: Luminous vivid orange']`;
- const [ colorButton ] = await page.$x( colorButtonSelector );
- await colorButton.click();
- await page.waitForXPath(
- `${ colorButtonSelector }[@aria-pressed='true']`
- );
- await page.click( 'h2[data-type="core/heading"]' );
- expect( await getEditedPostContent() ).toMatchSnapshot();
- } );
-} );
diff --git a/test/e2e/specs/editor/blocks/heading.spec.js b/test/e2e/specs/editor/blocks/heading.spec.js
new file mode 100644
index 00000000000000..56154f3e668e07
--- /dev/null
+++ b/test/e2e/specs/editor/blocks/heading.spec.js
@@ -0,0 +1,182 @@
+/**
+ * WordPress dependencies
+ */
+const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' );
+
+test.describe( 'Heading', () => {
+ test.beforeEach( async ( { admin } ) => {
+ await admin.createNewPost();
+ } );
+
+ test( 'can be created by prefixing number sign and a space', async ( {
+ editor,
+ page,
+ } ) => {
+ await page.click( 'role=button[name="Add default block"i]' );
+ await page.keyboard.type( '### 3' );
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/heading',
+ attributes: { content: '3', level: 3 },
+ },
+ ] );
+ } );
+
+ test( 'can be created by prefixing existing content with number signs and a space', async ( {
+ editor,
+ page,
+ } ) => {
+ await page.click( 'role=button[name="Add default block"i]' );
+ await page.keyboard.type( '4' );
+ await page.keyboard.press( 'ArrowLeft' );
+ await page.keyboard.type( '#### ' );
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/heading',
+ attributes: { content: '4', level: 4 },
+ },
+ ] );
+ } );
+
+ test( 'should not work with the list input rule', async ( {
+ editor,
+ page,
+ } ) => {
+ await page.click( 'role=button[name="Add default block"i]' );
+ await page.keyboard.type( '## 1. H' );
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/heading',
+ attributes: { content: '1. H', level: 2 },
+ },
+ ] );
+ } );
+
+ test( 'should work with the format input rules', async ( {
+ editor,
+ page,
+ } ) => {
+ await page.click( 'role=button[name="Add default block"i]' );
+ await page.keyboard.type( '## `code`' );
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/heading',
+ attributes: { content: 'code', level: 2 },
+ },
+ ] );
+ } );
+
+ test( 'should create a paragraph block above when pressing enter at the start', async ( {
+ editor,
+ page,
+ } ) => {
+ await page.keyboard.press( 'Enter' );
+ await page.keyboard.type( '## a' );
+ await page.keyboard.press( 'ArrowLeft' );
+ await page.keyboard.press( 'Enter' );
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/paragraph',
+ attributes: { content: '' },
+ },
+ {
+ name: 'core/heading',
+ attributes: { content: 'a', level: 2 },
+ },
+ ] );
+ } );
+
+ test( 'should create a paragraph block below when pressing enter at the end', async ( {
+ editor,
+ page,
+ } ) => {
+ await page.keyboard.press( 'Enter' );
+ await page.keyboard.type( '## a' );
+ await page.keyboard.press( 'Enter' );
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/heading',
+ attributes: { content: 'a', level: 2 },
+ },
+ {
+ name: 'core/paragraph',
+ attributes: { content: '' },
+ },
+ ] );
+ } );
+
+ test( 'should correctly apply custom colors', async ( {
+ editor,
+ page,
+ } ) => {
+ await page.click( 'role=button[name="Add default block"i]' );
+ await page.keyboard.type( '### Heading' );
+ await editor.openDocumentSettingsSidebar();
+
+ const textColor = page
+ .getByRole( 'region', {
+ name: 'Editor settings',
+ } )
+ .getByRole( 'button', { name: 'Text' } );
+
+ await textColor.click();
+ await page
+ .getByRole( 'button', { name: /Custom color picker./i } )
+ .click();
+
+ await page
+ .getByRole( 'textbox', { name: 'Hex color' } )
+ .fill( '4b7f4d' );
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/heading',
+ attributes: {
+ content: 'Heading',
+ level: 3,
+ style: { color: { text: '#4b7f4d' } },
+ },
+ },
+ ] );
+ } );
+
+ test( 'should correctly apply named colors', async ( { editor, page } ) => {
+ await page.click( 'role=button[name="Add default block"i]' );
+ await page.keyboard.type( '## Heading' );
+ await editor.openDocumentSettingsSidebar();
+
+ const textColor = page
+ .getByRole( 'region', {
+ name: 'Editor settings',
+ } )
+ .getByRole( 'button', { name: 'Text' } );
+
+ await textColor.click();
+
+ await page
+ .getByRole( 'button', {
+ name: 'Color: Luminous vivid orange',
+ } )
+ .click();
+
+ // Close the popover.
+ await textColor.click();
+
+ await expect.poll( editor.getBlocks ).toMatchObject( [
+ {
+ name: 'core/heading',
+ attributes: {
+ content: 'Heading',
+ level: 2,
+ textColor: 'luminous-vivid-orange',
+ },
+ },
+ ] );
+ } );
+} );