Skip to content

Commit

Permalink
Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
t-hamano committed Jul 22, 2024
1 parent ebdc1c2 commit 92d5699
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,3 @@
<!-- wp:paragraph -->
<p><strong>testtest</strong></p>
<!-- /wp:paragraph -->
17 changes: 17 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 @@ -478,6 +478,23 @@ test.describe( 'Copy/cut/paste', () => {
).toBe( 'axyb' );
} );

test( 'should paste formatted text into focusable element', async ( {
page,
pageUtils,
editor,
} ) => {
await editor.canvas
.locator( 'role=button[name="Add default block"i]' )
.click();
await page.keyboard.type( 'test' );
await pageUtils.pressKeys( 'primary+a' );
await pageUtils.pressKeys( 'primary+b' );
await pageUtils.pressKeys( 'primary+c' );
await page.keyboard.press( 'ArrowRight' );
await pageUtils.pressKeys( 'primary+v' );
expect( await editor.getEditedPostContent() ).toMatchSnapshot();
} );

test( 'should paste preformatted in list', async ( {
page,
pageUtils,
Expand Down

0 comments on commit 92d5699

Please sign in to comment.