From 922e1330130faf69800bed445224f46cc23aea8a Mon Sep 17 00:00:00 2001 From: Huyen Nguyen <25715018+huyenltnguyen@users.noreply.github.com> Date: Fri, 20 Mar 2026 09:59:57 +0700 Subject: [PATCH] fix(e2e): stabilize editor test (#66565) --- e2e/editor.spec.ts | 15 +++++++-------- 1 file changed, 7 insertions(+), 8 deletions(-) diff --git a/e2e/editor.spec.ts b/e2e/editor.spec.ts index 22bc0109e21..b002d0faa40 100644 --- a/e2e/editor.spec.ts +++ b/e2e/editor.spec.ts @@ -17,7 +17,7 @@ const setTheme = async ( }); const testPage = - '/learn/2022/responsive-web-design/learn-html-by-building-a-cat-photo-app/step-3'; + '/learn/responsive-web-design-v9/workshop-cat-photo-app/step-3'; test.describe('Editor Component', () => { test('should allow the user to insert text', async ({ page, isMobile }) => { @@ -36,9 +36,7 @@ test.describe('Python Terminal', () => { browserName, isMobile }) => { - await page.goto( - 'learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-2' - ); + await page.goto('/learn/python-v9/workshop-caesar-cipher/step-2'); // First enter code that does not generate output await focusEditor({ page, isMobile }); @@ -72,9 +70,7 @@ test.describe('Python Terminal', () => { isMobile, browserName }) => { - await page.goto( - 'learn/scientific-computing-with-python/learn-string-manipulation-by-building-a-cipher/step-2' - ); + await page.goto('learn/python-v9/workshop-caesar-cipher/step-2'); await focusEditor({ page, isMobile }); await clearEditor({ page, browserName, isMobile }); @@ -173,7 +169,10 @@ test.describe('Editor theme if the system theme is light', () => { await setTheme(request, 'default'); await page.goto(testPage); // Open the nav menu and toggle the theme - await page.getByRole('button', { name: 'Menu' }).click(); + const menuButton = page.getByRole('button', { name: 'Menu' }); + await menuButton.click(); + const menu = page.getByRole('list', { name: 'Menu' }); + await expect(menu).toBeVisible(); const toggle = page.getByRole('button', { name: 'Night Mode' }); await expect(toggle).toBeVisible();