Skip to content

Commit

Permalink
Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Nov 30, 2022
1 parent f8378bf commit 75c5e8b
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<!-- wp:list -->
<ul><!-- wp:list-item -->
<li>xy</li>
<!-- /wp:list-item --></ul>
<!-- /wp:list -->
15 changes: 15 additions & 0 deletions test/e2e/specs/editor/various/copy-cut-paste.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -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: '<pre>x</pre>',
} );
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();
} );
} );

0 comments on commit 75c5e8b

Please sign in to comment.