Skip to content

Commit

Permalink
Use specific selector to target pre-publish checks menu item
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Sep 19, 2018
1 parent 6637b7e commit d7c7151
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ import { withSelect, withDispatch } from '@wordpress/data';
const PublishSidebarToggle = function( { onToggle, isEnabled } ) {
return (
<MenuItem
className={ 'edit-post__pre-publish-checks' }
icon={ isEnabled && 'yes' }
isSelected={ isEnabled }
role="menuitemcheckbox"
Expand Down
2 changes: 1 addition & 1 deletion test/e2e/support/utils.js
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ export async function newPost( { postType, enableTips = false } = {} ) {
export async function togglePrePublishChecks( ) {
await page.click( '.edit-post-more-menu' );
await page.waitForSelector( '.components-popover__content' );
await page.click( '.components-popover__content > .components-menu-group:nth-child(3) button:nth-child(3)' );
await page.click( '.edit-post__pre-publish-checks' );
}

export async function arePrePublishChecksEnabled( ) {
Expand Down

0 comments on commit d7c7151

Please sign in to comment.