Skip to content

Commit

Permalink
try fixing test
Browse files Browse the repository at this point in the history
  • Loading branch information
Sidsector9 committed Jun 9, 2023
1 parent e391a5c commit 7a4c786
Showing 1 changed file with 13 additions and 5 deletions.
18 changes: 13 additions & 5 deletions tests/cypress/e2e/insert-character-in-post.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,19 @@ describe( 'Insert character in post', () => {

cy.closeWelcomeGuide();

cy.insertBlock("core/paragraph", "paragraph").then((id) => {
cy.get( '#'+id )
.click()
.type( 'Hello world' );
});
cy.window().then( ( win ) => {
const { wp } = win;

const paraBlock = wp.blocks.createBlock(
'core/paragraph',
{
content: 'Hello world'
}
);


wp.data.dispatch( 'core/editor' ).insertBlocks( paraBlock );
} );

/**
* Open block list view.
Expand Down

0 comments on commit 7a4c786

Please sign in to comment.