Skip to content

Commit

Permalink
Add e2e test
Browse files Browse the repository at this point in the history
  • Loading branch information
ellatrix committed Dec 6, 2022
1 parent 25d4ab6 commit bc59be6
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/e2e/specs/editor/blocks/html.spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -30,4 +30,20 @@ test.describe( 'HTML block', () => {
<!-- /wp:html -->`
);
} );

test( 'should not encode <', async ( { editor, page } ) => {
// Create a Custom HTML block with the slash shortcut.
await page.click( 'role=button[name="Add default block"i]' );
await page.keyboard.type( '/html' );
await expect(
page.locator( 'role=option[name="Custom HTML"i][selected]' )
).toBeVisible();
await page.keyboard.press( 'Enter' );
await page.keyboard.type( '1 < 2' );
await editor.publishPost();
await page.reload();
await expect(
page.locator( '[data-type="core/html"] textarea' )
).toBeVisible();
} );
} );

0 comments on commit bc59be6

Please sign in to comment.