diff --git a/test/e2e/specs/editor/blocks/code.spec.js b/test/e2e/specs/editor/blocks/code.spec.js index 6abfb15d10b83b..8fb498b9189ae0 100644 --- a/test/e2e/specs/editor/blocks/code.spec.js +++ b/test/e2e/specs/editor/blocks/code.spec.js @@ -17,6 +17,9 @@ test.describe( 'Code', () => { .click(); await page.keyboard.type( '```' ); await page.keyboard.press( 'Enter' ); + + await editor.canvas.locator( 'pre' ).isVisible(); + await page.keyboard.type( ' { test( 'should paste plain text', async ( { editor, pageUtils } ) => { await editor.insertBlock( { name: 'core/code' } ); + await editor.canvas.locator( 'pre' ).isVisible(); // Test to see if HTML and white space is kept. pageUtils.setClipboardData( { plainText: '\n\t
' } ); diff --git a/test/e2e/specs/editor/blocks/preformatted.spec.js b/test/e2e/specs/editor/blocks/preformatted.spec.js index 5cd20a051c4fb8..295db02993fb88 100644 --- a/test/e2e/specs/editor/blocks/preformatted.spec.js +++ b/test/e2e/specs/editor/blocks/preformatted.spec.js @@ -30,6 +30,7 @@ test.describe( 'Preformatted', () => { page, } ) => { await editor.insertBlock( { name: 'core/preformatted' } ); + await editor.canvas.locator( 'pre' ).isVisible(); await page.keyboard.type( '1' ); await page.keyboard.press( 'Enter' ); await page.keyboard.type( '2' ); diff --git a/test/e2e/specs/editor/blocks/verse-code-preformatted.spec.js b/test/e2e/specs/editor/blocks/verse-code-preformatted.spec.js index fdb76a8277a462..82db0b2a106f79 100644 --- a/test/e2e/specs/editor/blocks/verse-code-preformatted.spec.js +++ b/test/e2e/specs/editor/blocks/verse-code-preformatted.spec.js @@ -15,6 +15,9 @@ const { test, expect } = require( '@wordpress/e2e-test-utils-playwright' ); page, } ) => { await editor.insertBlock( { name: blockName } ); + + await editor.canvas.locator( 'pre' ).isVisible(); + await page.keyboard.type( 'a' ); await page.keyboard.press( 'Enter' ); await page.keyboard.press( 'Enter' );