Skip to content

Commit b02c0bd

Browse files
committed
Fix e2e test for block API / filtered blocks
1 parent 72b2b28 commit b02c0bd

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

test/e2e/specs/editor/plugins/block-api.spec.js

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,13 @@ test.describe( 'Using Block API', () => {
1515
test( 'Inserts the filtered hello world block even when filter added after block registration', async ( {
1616
admin,
1717
editor,
18+
page,
1819
} ) => {
1920
await admin.createNewPost();
2021

2122
await editor.insertBlock( { name: 'e2e-tests/hello-world' } );
2223

23-
const block = editor.canvas.locator(
24-
'[data-type="e2e-tests/hello-world"]'
25-
);
26-
await expect( block ).toHaveText( 'Hello Editor!' );
24+
const blockTitle = page.locator( '.block-editor-block-card__title' );
25+
await expect( blockTitle ).toHaveText( 'Filtered Hello World' );
2726
} );
2827
} );

0 commit comments

Comments
 (0)