refactor(e2e): create editor helpers (#54701)

This commit is contained in:
Oliver Eyton-Williams
2024-05-08 20:21:56 +02:00
committed by GitHub
parent c7d3b1303e
commit ca4e5db8b1
10 changed files with 93 additions and 82 deletions
+4 -1
View File
@@ -1,4 +1,7 @@
import { test, expect } from '@playwright/test';
import { getEditors } from './utils/editor';
test.use({ storageState: 'playwright/.auth/certified-user.json' });
test.describe('Challenge with editor', function () {
test('the shortcut "Ctrl + S" saves the code', async ({ page }) => {
@@ -6,7 +9,7 @@ test.describe('Challenge with editor', function () {
'/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-2'
);
const editor = page.locator('textarea');
const editor = getEditors(page);
await editor.fill('Something funny');
await page.keyboard.down('Control');