diff --git a/test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-preformatted-in-list-1-chromium.txt b/test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-preformatted-in-list-1-chromium.txt new file mode 100644 index 0000000000000..002e7a1920028 --- /dev/null +++ b/test/e2e/specs/editor/various/__snapshots__/Copy-cut-paste-should-paste-preformatted-in-list-1-chromium.txt @@ -0,0 +1,5 @@ + + + \ No newline at end of file diff --git a/test/e2e/specs/editor/various/copy-cut-paste.spec.js b/test/e2e/specs/editor/various/copy-cut-paste.spec.js index c7041a8634e32..4b7fb267f87b7 100644 --- a/test/e2e/specs/editor/various/copy-cut-paste.spec.js +++ b/test/e2e/specs/editor/various/copy-cut-paste.spec.js @@ -433,4 +433,19 @@ test.describe( 'Copy/cut/paste', () => { await page.evaluate( () => document.activeElement.innerHTML ) ).toBe( 'axyb' ); } ); + + test( 'should paste preformatted in list', async ( { + page, + pageUtils, + editor, + } ) => { + await pageUtils.setClipboardData( { + html: '
x
', + } ); + await editor.insertBlock( { name: 'core/list' } ); + await pageUtils.pressKeyWithModifier( 'primary', 'v' ); + // Ensure the selection is correct. + await page.keyboard.type( 'y' ); + expect( await editor.getEditedPostContent() ).toMatchSnapshot(); + } ); } );