Skip to content
This repository has been archived by the owner on Feb 23, 2024. It is now read-only.

Commit

Permalink
Select paragraph block before inserting another block using slash
Browse files Browse the repository at this point in the history
  • Loading branch information
Aljullu committed Mar 31, 2023
1 parent 8384cab commit 0666043
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions tests/utils/insert-block-using-slash.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
* External dependencies
*/
import { canvas, insertBlock } from '@wordpress/e2e-test-utils';
import { selectBlockByName } from '@woocommerce/blocks-test-utils';

/**
* Internal dependencies
Expand All @@ -10,6 +11,7 @@ import SELECTORS from './selectors';

export const insertBlockUsingSlash = async ( blockTitle: string ) => {
await insertBlock( 'Paragraph' );
await selectBlockByName( 'core/paragraph' );
await canvas().keyboard.type( `/${ blockTitle }` );
await canvas().waitForSelector( SELECTORS.popover );
await canvas().keyboard.press( 'Enter' );
Expand Down

0 comments on commit 0666043

Please sign in to comment.