diff --git a/packages/e2e-tests/plugins/block-hooks.php b/packages/e2e-tests/plugins/block-hooks.php index 314dde800e043..0b3814cca0c44 100644 --- a/packages/e2e-tests/plugins/block-hooks.php +++ b/packages/e2e-tests/plugins/block-hooks.php @@ -33,11 +33,12 @@ function gutenberg_test_set_hooked_block_inner_html( $hooked_block, $hooked_bloc ( 'core/block' === $anchor_block['blockName'] && 'first_child' === $relative_position ) ) { $hooked_block['attrs'] = array( - 'backgroundColor' => 'accent', + 'className' => "hooked-block-${relative_position}-" . $anchor_block['blockName'], ); $hooked_block['innerContent'] = array( sprintf( - '

This block was inserted by the Block Hooks API in the %1$s position next to the %2$s anchor block.

', + '

This block was inserted by the Block Hooks API in the %2$s position next to the %3$s anchor block.

', + $hooked_block['attrs']['className'], $relative_position, $anchor_block['blockName'] ), diff --git a/test/e2e/specs/editor/plugins/block-hooks.spec.js b/test/e2e/specs/editor/plugins/block-hooks.spec.js index e175cad2d7c3d..84e324adfb46c 100644 --- a/test/e2e/specs/editor/plugins/block-hooks.spec.js +++ b/test/e2e/specs/editor/plugins/block-hooks.spec.js @@ -11,8 +11,8 @@ test.describe( 'Block Hooks API', () => { const getHookedBlockMarkup = ( relativePosition, anchorBlock - ) => ` -

+ ) => ` +

This block was inserted by the Block Hooks API in the ${ relativePosition } position next to the ${ anchorBlock } anchor block.

`;