Skip to content

Commit

Permalink
Add frontend test
Browse files Browse the repository at this point in the history
  • Loading branch information
ockham committed Feb 11, 2025
1 parent 4baadee commit 36c829d
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/e2e/specs/editor/plugins/block-hooks.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,17 @@ This block was inserted by the Block Hooks API in the <code>${ relativePosition
await requestUtils.deleteAllPosts();
} );

test( 'should insert hooked block as last child of Post Content block on frontend', async ( {
page,
} ) => {
await page.goto( `/?p=${ post.id }` );
await expect(
page.locator(
getHookedBlockClassName( 'last_child', 'core/post-content' )
)
).toHaveCount( 1 );
} );

test( 'should insert hooked block as last child of Post Content block in editor', async ( {
admin,
editor,
Expand Down

0 comments on commit 36c829d

Please sign in to comment.