Skip to content

Commit

Permalink
Fix up e2e tests following changes from rebase
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed Dec 17, 2021
1 parent b4a7621 commit 8676d2a
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions packages/e2e-tests/specs/editor/blocks/navigation.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -809,7 +809,7 @@ describe( 'Navigation', () => {
'You do not have permission to create Navigation Menus.';
// Switch to a Contributor role user - they should not have
// permission to update Navigations.
await loginUser( username, contribUserPassword );
await loginUser( contributorUsername, contributorPassword );

await createNewPost();
await insertBlock( 'Navigation' );
Expand All @@ -818,13 +818,6 @@ describe( 'Navigation', () => {
await page.waitForXPath(
`//*[contains(@class, 'components-snackbar__content')][ text()="${ noticeText }" ]`
);

// Expect a console 403 for request to Navigation Areas for lower permisison users.
// This is because reading requires the `edit_theme_options` capability
// which the Contributor level user does not have.
// See: https://github.com/WordPress/gutenberg/blob/4cedaf0c4abb0aeac4bfd4289d63e9889efe9733/lib/class-wp-rest-block-navigation-areas-controller.php#L81-L91.
// Todo: removed once Nav Areas are removed from the Gutenberg Plugin.
expect( console ).toHaveErrored();
} );
} );
} );

0 comments on commit 8676d2a

Please sign in to comment.