Skip to content

Commit

Permalink
E2E (Atomic): Skip the editor exit check if in mobile classic (wp-adm…
Browse files Browse the repository at this point in the history
…in) view (#70982)
  • Loading branch information
WunderBart authored and ivan-ottinger committed Dec 21, 2022
1 parent d1ff1a7 commit f5c807c
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion test/e2e/specs/editor/editor__navbar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,15 @@ describe( DataHelper.createSuiteTitle( `Editor: Navbar` ), function () {
} );

it( 'Return to Calypso dashboard', async function () {
await editorPage.exitEditor();
const WPAdminBarLocator = page.locator( '#wpadminbar' );
const isMobileClassicView =
envVariables.VIEWPORT_NAME === 'mobile' && ( await WPAdminBarLocator.isVisible() );

// The classic WP Admin Bar on mobile viewport doesn't have the
// "return" button, so let's not fail this test if it's the case.
// See https://github.com/Automattic/wp-calypso/pull/70982
if ( ! isMobileClassicView ) {
await editorPage.exitEditor();
}
} );
} );

0 comments on commit f5c807c

Please sign in to comment.