diff --git a/test/e2e/specs/editor/various/block-switcher-test.spec.js b/test/e2e/specs/editor/various/block-switcher-test.spec.js index c7a98d3de09ff..de7eb9b167b29 100644 --- a/test/e2e/specs/editor/various/block-switcher-test.spec.js +++ b/test/e2e/specs/editor/various/block-switcher-test.spec.js @@ -25,28 +25,33 @@ test.describe( 'Block Switcher', () => { }, ], } ); - expect( await editor.getEditedPostContent() ).toBe( - ` -
-

1

-
-` - ); // Transform to `Stack` variation. await editor.clickBlockToolbarButton( 'Stack' ); - const variations = page.getByRole( 'menu', { name: 'Stack' } ) - .getByRole( 'group', { name: 'variations' } ); + const variations = page + .getByRole( 'menu', { name: 'Stack' } ) + .getByRole( 'group' ); await expect( variations.getByRole( 'menuitem', { name: 'Stack' } ) ).toBeHidden(); await variations.getByRole( 'menuitem', { name: 'Row' } ).click(); - expect( await editor.getEditedPostContent() ).toBe( - ` -
-

1

-
-` - ); + expect( await editor.getBlocks() ).toMatchObject( [ + { + name: 'core/group', + attributes: expect.objectContaining( { + layout: { + type: 'flex', + flexWrap: 'nowrap', + orientation: undefined, + }, + } ), + innerBlocks: [ + { + name: 'core/paragraph', + attributes: { content: '1' }, + }, + ], + }, + ] ); await editor.clickBlockToolbarButton( 'Row' ); await expect( page.locator( 'role=menuitem[name="Stack"i]' )