diff --git a/test/e2e/specs/blocks/__snapshots__/html.test.js.snap b/test/e2e/specs/blocks/__snapshots__/html.test.js.snap new file mode 100644 index 00000000000000..b72664d0212768 --- /dev/null +++ b/test/e2e/specs/blocks/__snapshots__/html.test.js.snap @@ -0,0 +1,8 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`HTML block can be created by typing "/html" 1`] = ` +" +

Pythagorean theorem: +a2 + b2 = c2

+" +`; diff --git a/test/e2e/specs/blocks/html.test.js b/test/e2e/specs/blocks/html.test.js new file mode 100644 index 00000000000000..8f1996c00435a2 --- /dev/null +++ b/test/e2e/specs/blocks/html.test.js @@ -0,0 +1,26 @@ +/** + * Internal dependencies + */ +import { + clickBlockAppender, + getEditedPostContent, + newPost, +} from '../../support/utils'; + +describe( 'HTML block', () => { + beforeEach( async () => { + await newPost(); + } ); + + it( 'can be created by typing "/html"', async () => { + // Create a Custom HTML block with the slash shortcut. + await clickBlockAppender(); + await page.keyboard.type( '/html' ); + await page.keyboard.press( 'Enter' ); + await page.keyboard.type( '

Pythagorean theorem: ' ); + await page.keyboard.press( 'Enter' ); + await page.keyboard.type( 'a2 + b2 = c2

' ); + + expect( await getEditedPostContent() ).toMatchSnapshot(); + } ); +} );