Skip to content

Commit

Permalink
Migrate paragraph test to Playwright (#40779)
Browse files Browse the repository at this point in the history
  • Loading branch information
miminari authored May 3, 2022
1 parent d8eb4c5 commit 58a43c0
Showing 1 changed file with 11 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,15 +1,20 @@
/**
* WordPress dependencies
*/
import { createNewPost, insertBlock } from '@wordpress/e2e-test-utils';
const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' );

describe( 'Paragraph', () => {
beforeEach( async () => {
await createNewPost();
test.describe( 'Paragraph', () => {
test.beforeEach( async ( { pageUtils } ) => {
await pageUtils.createNewPost();
} );

it( 'should output unwrapped editable paragraph', async () => {
await insertBlock( 'Paragraph' );
test( 'should output unwrapped editable paragraph', async ( {
page,
pageUtils,
} ) => {
await pageUtils.insertBlock( {
name: 'core/paragraph',
} );
await page.keyboard.type( '1' );

const firstBlockTagName = await page.evaluate( () => {
Expand Down

0 comments on commit 58a43c0

Please sign in to comment.