Skip to content

Commit

Permalink
e2e test: verify that user can type right after inserting the quote b…
Browse files Browse the repository at this point in the history
…lock (#40466)
  • Loading branch information
oandregal authored Apr 20, 2022
1 parent caf7b7d commit 25b6f5c
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions test/e2e/specs/editor/blocks/quote.spec.js
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 -->`
);
} );
} );

0 comments on commit 25b6f5c

Please sign in to comment.