forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Writing flow: fix paste for input fields (WordPress#61389)
Co-authored-by: ellatrix <ellatrix@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org> Co-authored-by: kevin940726 <kevin940726@git.wordpress.org> Co-authored-by: allilevine <firewatch@git.wordpress.org> Co-authored-by: afercia <afercia@git.wordpress.org> Co-authored-by: liviopv <liviopv@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org>
- Loading branch information
1 parent
c156fcd
commit ea0e120
Showing
3 changed files
with
66 additions
and
17 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); | ||
|
||
test.describe( 'RSS', () => { | ||
test.beforeEach( async ( { admin } ) => { | ||
await admin.createNewPost(); | ||
} ); | ||
|
||
// See: https://github.com/WordPress/gutenberg/pull/61389. | ||
test( 'should retain native copy/paste behavior for input fields', async ( { | ||
editor, | ||
pageUtils, | ||
} ) => { | ||
await editor.insertBlock( { name: 'core/rss' } ); | ||
pageUtils.setClipboardData( { | ||
plainText: 'https://developer.wordpress.org/news/feed/', | ||
} ); | ||
await pageUtils.pressKeys( 'primary+v' ); | ||
|
||
await expect.poll( editor.getBlocks ).toMatchObject( [ | ||
{ | ||
name: 'core/rss', | ||
attributes: { | ||
feedURL: 'https://developer.wordpress.org/news/feed/', | ||
}, | ||
}, | ||
] ); | ||
} ); | ||
} ); |