diff --git a/cypress/e2e/default/learn/common-components/editor.ts b/cypress/e2e/default/learn/common-components/editor.ts
deleted file mode 100644
index 9d1c6872371..00000000000
--- a/cypress/e2e/default/learn/common-components/editor.ts
+++ /dev/null
@@ -1,29 +0,0 @@
-const editorElement = {
- editor: '.monaco-editor'
-};
-
-describe('Editor Shortcuts', () => {
- it('Should handle Alt+Enter', () => {
- cy.visit(
- 'learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
- );
- cy.get(editorElement.editor, { timeout: 15000 })
- .first()
- .click()
- .focused()
- .type('{alt}{enter}')
- .should('have.value', '
Hello
\n');
- });
-
- it('Should ignore Ctrl+Enter', () => {
- cy.visit(
- 'learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
- );
- cy.get(editorElement.editor, { timeout: 15000 })
- .first()
- .click()
- .focused()
- .type('{ctrl}{enter}')
- .should('have.value', 'Hello
');
- });
-});
diff --git a/e2e/legacy-editor.spec.ts b/e2e/legacy-editor.spec.ts
new file mode 100644
index 00000000000..076a2b17bbd
--- /dev/null
+++ b/e2e/legacy-editor.spec.ts
@@ -0,0 +1,36 @@
+import { test, expect } from '@playwright/test';
+import { focusEditor } from './utils/editor';
+
+test.describe('Editor Shortcuts', () => {
+ test('Should add a new line if the user presses Alt+Enter', async ({
+ page,
+ isMobile
+ }) => {
+ await page.goto(
+ 'learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
+ );
+ await focusEditor({ page, isMobile });
+
+ await page.keyboard.press('Alt+Enter');
+ await expect(
+ page
+ .getByTestId('editor-container-indexhtml')
+ .getByText('Hello
\n')
+ ).toBeVisible();
+ });
+
+ test('Should not add a new line if the user presses Ctrl+Enter', async ({
+ page,
+ isMobile
+ }) => {
+ await page.goto(
+ 'learn/responsive-web-design/basic-html-and-html5/say-hello-to-html-elements'
+ );
+ await focusEditor({ page, isMobile });
+
+ await page.keyboard.press('Control+Enter');
+ await expect(
+ page.getByTestId('editor-container-indexhtml').getByText('Hello
')
+ ).toBeVisible();
+ });
+});