diff --git a/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterAtEnd.spec.mjs b/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterAtEnd.spec.mjs
index c5539928406..5a15096e412 100644
--- a/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterAtEnd.spec.mjs
+++ b/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterAtEnd.spec.mjs
@@ -6,11 +6,6 @@
*
*/
-import {
- moveRight,
- moveToEditorBeginning,
- STANDARD_KEYPRESS_DELAY_MS,
-} from '../../keyboardShortcuts/index.mjs';
import {
assertHTML,
click,
@@ -20,10 +15,10 @@ import {
test,
} from '../../utils/index.mjs';
-test(`Headings - stays as a heading when you press enter in the middle of a heading`, async ({
+test('Headings - changes to a paragraph when you press enter at the end of a heading', async ({
page,
- isCollab,
isPlainText,
+ isCollab,
}) => {
test.skip(isPlainText);
await initialize({isCollab, page});
@@ -45,10 +40,6 @@ test(`Headings - stays as a heading when you press enter in the middle of a head
`,
);
- await moveToEditorBeginning(page);
-
- await moveRight(page, 5, STANDARD_KEYPRESS_DELAY_MS);
-
await page.keyboard.press('Enter');
await assertHTML(
@@ -57,13 +48,9 @@ test(`Headings - stays as a heading when you press enter in the middle of a head
- Welco
-
-
- me to the playground
+ Welcome to the playground
+
`,
);
});
diff --git a/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterInMiddle.spec.mjs b/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterInMiddle.spec.mjs
index 5a15096e412..c5539928406 100644
--- a/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterInMiddle.spec.mjs
+++ b/packages/lexical-playground/__tests__/e2e/Headings/HeadingsEnterInMiddle.spec.mjs
@@ -6,6 +6,11 @@
*
*/
+import {
+ moveRight,
+ moveToEditorBeginning,
+ STANDARD_KEYPRESS_DELAY_MS,
+} from '../../keyboardShortcuts/index.mjs';
import {
assertHTML,
click,
@@ -15,10 +20,10 @@ import {
test,
} from '../../utils/index.mjs';
-test('Headings - changes to a paragraph when you press enter at the end of a heading', async ({
+test(`Headings - stays as a heading when you press enter in the middle of a heading`, async ({
page,
- isPlainText,
isCollab,
+ isPlainText,
}) => {
test.skip(isPlainText);
await initialize({isCollab, page});
@@ -40,6 +45,10 @@ test('Headings - changes to a paragraph when you press enter at the end of a hea
`,
);
+ await moveToEditorBeginning(page);
+
+ await moveRight(page, 5, STANDARD_KEYPRESS_DELAY_MS);
+
await page.keyboard.press('Enter');
await assertHTML(
@@ -48,9 +57,13 @@ test('Headings - changes to a paragraph when you press enter at the end of a hea
- Welcome to the playground
+ Welco
+
+
+ me to the playground
-
`,
);
});