Skip to content

Commit

Permalink
Try: Fix e2e tests 'visitSiteEditor' helper (WordPress#68534)
Browse files Browse the repository at this point in the history
Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
  • Loading branch information
Mamaduka and Mamaduka authored Jan 8, 2025
1 parent ef7afef commit ad4da87
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,15 @@ export async function visitSiteEditor(

await this.visitAdminPage( 'site-editor.php', query.toString() );

if ( ! options.showWelcomeGuide ) {
await this.editor.setPreferences( 'core/edit-site', {
welcomeGuide: false,
welcomeGuideStyles: false,
welcomeGuidePage: false,
welcomeGuideTemplate: false,
} );
}

/**
* @todo This is a workaround for the fact that the editor canvas is seen as
* ready and visible before the loading spinner is hidden. Ideally, the
Expand All @@ -63,13 +72,4 @@ export async function visitSiteEditor(
timeout: 60_000,
} );
}

if ( ! options.showWelcomeGuide ) {
await this.editor.setPreferences( 'core/edit-site', {
welcomeGuide: false,
welcomeGuideStyles: false,
welcomeGuidePage: false,
welcomeGuideTemplate: false,
} );
}
}

0 comments on commit ad4da87

Please sign in to comment.