Skip to content

Commit

Permalink
use getblocks
Browse files Browse the repository at this point in the history
  • Loading branch information
scruffian committed Feb 13, 2023
1 parent a1eb36f commit 1d59818
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions test/e2e/specs/editor/blocks/navigation.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,14 @@ test.describe(

// Check the markup of the block is correct.
await editor.publishPost();
const content = await editor.getEditedPostContent();
const navigationMenus = await navBlockUtils.getNavigationMenus();
const latestNavigationMenu = navigationMenus[ 0 ];
expect( content ).toBe(
`<!-- wp:navigation {"ref":${ latestNavigationMenu.id }} /-->`
);
await expect.poll( editor.getBlocks ).toMatchObject( [
{
name: 'core/navigation',
attributes: { ref: latestNavigationMenu.id },
},
] );
} );

test( 'default to my only existing menu', async ( {
Expand Down

0 comments on commit 1d59818

Please sign in to comment.