Skip to content

Commit

Permalink
Do setup before entering editor
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Dec 14, 2023
1 parent f87167c commit d750629
Showing 1 changed file with 14 additions and 14 deletions.
28 changes: 14 additions & 14 deletions test/e2e/specs/site-editor/navigation-editor.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,20 +20,6 @@ test.describe( 'Editing Navigation Menus', () => {
editor,
} ) => {
await test.step( 'Manually browse to focus mode for a Navigation Menu', async () => {
// We could Navigate directly to editing the Navigation Menu but we intentionally do not do this.
//
// Why? To provide coverage for a bug that caused the Navigation Editor behaviours to fail
// only when navigating through the editor screens (rather than going directly to the editor by URL).
// See: https://github.com/WordPress/gutenberg/pull/56856.
//
// Example (what we could do):
// await admin.visitSiteEditor( {
// postId: createdMenu?.id,
// postType: 'wp_navigation',
// } );
//
await admin.visitSiteEditor();

// create a Navigation Menu called "Test Menu" using the REST API helpers
const createdMenu = await requestUtils.createNavigationMenu( {
title: 'Primary Menu',
Expand All @@ -48,6 +34,20 @@ test.describe( 'Editing Navigation Menus', () => {
'<!-- wp:navigation-link {"label":"Another Item","type":"custom","url":"http://www.wordpress.org/","kind":"custom"} /-->',
} );

// We could Navigate directly to editing the Navigation Menu but we intentionally do not do this.
//
// Why? To provide coverage for a bug that caused the Navigation Editor behaviours to fail
// only when navigating through the editor screens (rather than going directly to the editor by URL).
// See: https://github.com/WordPress/gutenberg/pull/56856.
//
// Example (what we could do):
// await admin.visitSiteEditor( {
// postId: createdMenu?.id,
// postType: 'wp_navigation',
// } );
//
await admin.visitSiteEditor();

const editorSidebar = page.getByRole( 'region', {
name: 'Navigation',
} );
Expand Down

0 comments on commit d750629

Please sign in to comment.