Skip to content

Commit

Permalink
Merge pull request #1 from Sidsector9/pr-62304-fixes
Browse files Browse the repository at this point in the history
Adding fixes for failing tests
  • Loading branch information
Sidsector9 authored Jul 30, 2024
2 parents 3496d55 + a27c07e commit ac9556d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
1 change: 1 addition & 0 deletions lib/compat/wordpress-6.7/post.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ function gutenberg_post_type_default_rendering_mode( $args, $post_type ) {

// Make sure the post type supports the block editor.
if (
wp_is_block_theme() &&
( isset( $args['show_in_rest'] ) && $args['show_in_rest'] ) &&
( isset( $args['supports'] ) && in_array( 'editor', $args['supports'], true ) )
) {
Expand Down
11 changes: 11 additions & 0 deletions test/e2e/specs/site-editor/command-center.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,17 @@ test.describe( 'Site editor command palette', () => {
await expect( page ).toHaveURL(
'/wp-admin/post-new.php?post_type=page'
);
await page.evaluate( () => {
window.wp.data
.dispatch( 'core/preferences' )
.set( 'core/edit-post', 'welcomeGuide', false );
}, false );
await page.getByLabel( 'Template options' ).click();

await page
.getByRole( 'menuitemcheckbox', { name: 'Show template' } )
.click();

await expect(
editor.canvas.getByRole( 'textbox', { name: 'Add title' } )
).toBeVisible();
Expand Down

0 comments on commit ac9556d

Please sign in to comment.