From 1706ef77aa24e65616acb64dede0c4a8e7568986 Mon Sep 17 00:00:00 2001 From: yogeshbhutkar Date: Thu, 9 Jan 2025 17:44:46 +0530 Subject: [PATCH] Test Cases: Fix failing tests --- .../e2e/specs/editor/blocks/navigation-list-view.spec.js | 2 +- test/e2e/specs/site-editor/navigation-editor.spec.js | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/test/e2e/specs/editor/blocks/navigation-list-view.spec.js b/test/e2e/specs/editor/blocks/navigation-list-view.spec.js index 2f9963169a5230..70f2fa4d26eab3 100644 --- a/test/e2e/specs/editor/blocks/navigation-list-view.spec.js +++ b/test/e2e/specs/editor/blocks/navigation-list-view.spec.js @@ -555,7 +555,7 @@ test.describe( 'Navigation block - List view editing', () => { await editor.openDocumentSettingsSidebar(); - await page.getByLabel( 'Test Menu' ).click(); + await page.getByLabel( 'Test Menu', { exact: true } ).click(); await page.keyboard.press( 'ArrowUp' ); diff --git a/test/e2e/specs/site-editor/navigation-editor.spec.js b/test/e2e/specs/site-editor/navigation-editor.spec.js index 64a80e814d6298..9810854d0c11bc 100644 --- a/test/e2e/specs/site-editor/navigation-editor.spec.js +++ b/test/e2e/specs/site-editor/navigation-editor.spec.js @@ -40,6 +40,13 @@ test.describe( 'Editing Navigation Menus', () => { canvas: 'edit', } ); + // Wait for the toggle to be visible. + await expect( + page.locator( + '.editor-document-tools__document-overview-toggle' + ) + ).toBeVisible(); + // Open List View. await pageUtils.pressKeys( 'access+o' ); @@ -54,7 +61,7 @@ test.describe( 'Editing Navigation Menus', () => { await expect( listView ).toBeVisible(); const navBlockNode = listView.getByRole( 'link', { - name: 'Navigation', + name: 'Navigation (Primary Menu)', exact: true, } );