-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
e2e test: verify that user can type right after inserting the quote b…
…lock (#40466)
- Loading branch information
Showing
1 changed file
with
29 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* WordPress dependencies | ||
*/ | ||
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); | ||
|
||
test.describe( 'adding a quote', () => { | ||
test( 'should allow the user to type right away', async ( { | ||
page, | ||
pageUtils, | ||
} ) => { | ||
await pageUtils.createNewPost(); | ||
|
||
// Inserting a quote block | ||
await pageUtils.insertBlock( { | ||
name: 'core/quote', | ||
} ); | ||
|
||
// Type content right after. | ||
await page.keyboard.type( 'Quote content' ); | ||
|
||
// Check the content | ||
const content = await pageUtils.getEditedPostContent(); | ||
expect( content ).toBe( | ||
`<!-- wp:quote --> | ||
<blockquote class="wp-block-quote"><p>Quote content</p></blockquote> | ||
<!-- /wp:quote -->` | ||
); | ||
} ); | ||
} ); |