chore: import upstream snapshot with attribution
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
i18n - Build Validation / Validate i18n Builds (24) (push) Has been cancelled
CI - Node.js / Lint (24) (push) Has been cancelled
CI - Node.js / Build (24) (push) Has been cancelled
CI - Node.js / Test (24) (push) Has been cancelled
CI - Node.js / Test - Upcoming Changes (24) (push) Has been cancelled
CI - Node.js / Test - i18n (italian, 24) (push) Has been cancelled
CI - Node.js / Test - i18n (portuguese, 24) (push) Has been cancelled
CD - Docker - GHCR Images / Build and Push Images (push) Has been cancelled
This commit is contained in:
@@ -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('<h1>Hello</h1>\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('<h1>Hello</h1>')
|
||||
).toBeVisible();
|
||||
});
|
||||
});
|
||||
Reference in New Issue
Block a user