Skip to content

Commit

Permalink
Handle upgrade screen
Browse files Browse the repository at this point in the history
  • Loading branch information
david-szabo97 authored and jeyip committed Feb 1, 2021
1 parent d0deff5 commit bd77454
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions packages/e2e-test-utils/src/visit-admin-page.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,14 @@ import { getPageError } from './get-page-error';
export async function visitAdminPage( adminPath, query ) {
await page.goto( createURL( join( 'wp-admin', adminPath ), query ) );

// Handle upgrade required screen
if ( isCurrentURL( 'wp-admin/upgrade.php' ) ) {
// Click update
await page.click( '.button.button-large.button-primary' );
// Click continue
await page.click( '.button.button-large' );
}

if ( isCurrentURL( 'wp-login.php' ) ) {
await loginUser();
await visitAdminPage( adminPath, query );
Expand Down

0 comments on commit bd77454

Please sign in to comment.