Skip to content

Commit

Permalink
Resolved the typecheck errors caused by "browserName"
Browse files Browse the repository at this point in the history
  • Loading branch information
swarupn17 committed Jun 20, 2024
1 parent ee26d43 commit 9c7b507
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions e2e/editor.spec.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { APIRequestContext, expect, test } from '@playwright/test';

import { clearEditor, focusEditor } from './utils/editor';
import { authedRequest } from './utils/request';

Expand All @@ -22,12 +21,11 @@ const testPage =
test.describe('Editor Component', () => {
test('should allow the user to insert text', async ({
page,
isMobile,
browserName
isMobile
}) => {
await page.goto(testPage);

await focusEditor({ page, isMobile, browserName });
await focusEditor({ page, isMobile });
await page.keyboard.insertText('<h2>FreeCodeCamp</h2>');
const text = page.getByText('<h2>FreeCodeCamp</h2>');
await expect(text).toBeVisible();
Expand All @@ -37,15 +35,14 @@ test.describe('Editor Component', () => {
test.describe('Python Terminal', () => {
test('should display error message when the user enters invalid code', async ({
page,
isMobile,
browserName
isMobile
}) => {
await page.goto(
'learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-2'
);

await focusEditor({ page, isMobile });
await clearEditor({ page, browserName });
await clearEditor({ page });
// Then enter invalid code
await page.keyboard.insertText('def');
const preview = page.getByTestId('preview-pane');
Expand Down

0 comments on commit 9c7b507

Please sign in to comment.