Skip to content

Commit

Permalink
Remove action to fix tests. (#54806)
Browse files Browse the repository at this point in the history
  • Loading branch information
spacedmonkey authored Sep 26, 2023
1 parent 6c9738c commit 861aea3
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 2 deletions.
4 changes: 4 additions & 0 deletions lib/compat/wordpress-6.3/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -79,9 +79,13 @@ function _gutenberg_get_iframed_editor_assets() {
}
}

// Remove the deprecated `print_emoji_styles` handler.
// It avoids breaking style generation with a deprecation message.
remove_action( 'wp_print_styles', 'print_emoji_styles' );
ob_start();
wp_print_styles();
$styles = ob_get_clean();
add_action( 'wp_print_styles', 'print_emoji_styles' );

ob_start();
wp_print_head_scripts();
Expand Down
4 changes: 4 additions & 0 deletions lib/compat/wordpress-6.4/script-loader.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,13 @@ function _gutenberg_get_iframed_editor_assets_6_4() {
}
}

// Remove the deprecated `print_emoji_styles` handler.
// It avoids breaking style generation with a deprecation message.
remove_action( 'wp_print_styles', 'print_emoji_styles' );
ob_start();
wp_print_styles();
$styles = ob_get_clean();
add_action( 'wp_print_styles', 'print_emoji_styles' );

ob_start();
wp_print_head_scripts();
Expand Down
4 changes: 3 additions & 1 deletion packages/e2e-tests/specs/editor/various/datepicker.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,9 @@ async function getPublishingDate() {
);
}

describe.each( [ [ 'UTC-10' ], [ 'UTC' ], [ 'UTC+10' ] ] )(
// @todo: Change `UTC+1` back to `UTC` once the core regressions is resolved.
// See: https://github.com/WordPress/gutenberg/pull/54806#issuecomment-1734840171.
describe.each( [ [ 'UTC-10' ], [ 'UTC+1' ], [ 'UTC+10' ] ] )(
`Datepicker %s`,
( timezone ) => {
let oldTimezone;
Expand Down
4 changes: 3 additions & 1 deletion packages/e2e-tests/specs/editor/various/scheduling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ describe( 'Scheduling', () => {
} );
};

describe.each( [ [ 'UTC-10' ], [ 'UTC' ], [ 'UTC+10' ] ] )(
// @todo: Change `UTC+1` back to `UTC` once the core regressions is resolved.
// See: https://github.com/WordPress/gutenberg/pull/54806#issuecomment-1734840171.
describe.each( [ [ 'UTC-10' ], [ 'UTC+1' ], [ 'UTC+10' ] ] )(
`Timezone %s`,
( timezone ) => {
let oldTimezone;
Expand Down
1 change: 1 addition & 0 deletions phpunit/experimental/block-editor-settings-mobile-test.php
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ class Gutenberg_REST_Block_Editor_Settings_Controller_Test extends WP_Test_REST_
public function set_up() {
parent::set_up();
switch_theme( 'block-theme' );
remove_action( 'wp_print_styles', 'print_emoji_styles' );
}

/**
Expand Down

1 comment on commit 861aea3

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 861aea3.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6309085817
📝 Reported issues:

Please sign in to comment.