diff --git a/packages/block-library/src/quote/transforms.js b/packages/block-library/src/quote/transforms.js index 8ccc4ac01b899..f8977bd997492 100644 --- a/packages/block-library/src/quote/transforms.js +++ b/packages/block-library/src/quote/transforms.js @@ -17,7 +17,7 @@ const transforms = { fontSize, style, }, - createBlock( 'core/paragraph', { content: value } ) + [ createBlock( 'core/paragraph', { content: value } ) ] ); }, }, diff --git a/packages/e2e-tests/specs/editor/blocks/pullquote.test.js b/packages/e2e-tests/specs/editor/blocks/pullquote.test.js new file mode 100644 index 0000000000000..9c9b9f4513fae --- /dev/null +++ b/packages/e2e-tests/specs/editor/blocks/pullquote.test.js @@ -0,0 +1,47 @@ +/** + * WordPress dependencies + */ +import { + clickBlockAppender, + getEditedPostContent, + createNewPost, + transformBlockTo, +} from '@wordpress/e2e-test-utils'; + +describe( 'Quote', () => { + beforeEach( async () => { + await createNewPost(); + } ); + + it( 'can be created by converting a quote and converted back to quote', async () => { + await clickBlockAppender(); + await page.keyboard.type( 'test' ); + await transformBlockTo( 'Quote' ); + + expect( await getEditedPostContent() ).toMatchInlineSnapshot( ` + " +
+

test

+
+ " + ` ); + + await transformBlockTo( 'Pullquote' ); + + expect( await getEditedPostContent() ).toMatchInlineSnapshot( ` + " +

test

+ " + ` ); + + await transformBlockTo( 'Quote' ); + + expect( await getEditedPostContent() ).toMatchInlineSnapshot( ` + " +
+

test

+
+ " + ` ); + } ); +} );