forked from WordPress/gutenberg
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make it possible to undo prefix transforms (WordPress#11497)
* Make it possible to undo prefix transforms * Same for backticks * Tests: Refactor tests to stop using META_KEY
- Loading branch information
1 parent
25b834e
commit bad6c5a
Showing
18 changed files
with
251 additions
and
68 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Code can be created by three backticks and enter 1`] = ` | ||
"<!-- wp:code --> | ||
<pre class=\\"wp-block-code\\"><code><?php</code></pre> | ||
<!-- /wp:code -->" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Separator can be created by prefixing existing content with number signs and a space 1`] = ` | ||
"<!-- wp:heading {\\"level\\":4} --> | ||
<h4>4</h4> | ||
<!-- /wp:heading -->" | ||
`; | ||
|
||
exports[`Separator can be created by prefixing number sign and a space 1`] = ` | ||
"<!-- wp:heading {\\"level\\":3} --> | ||
<h3>3</h3> | ||
<!-- /wp:heading -->" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
// Jest Snapshot v1, https://goo.gl/fbAQLP | ||
|
||
exports[`Separator can be created by three dashes and enter 1`] = ` | ||
"<!-- wp:separator --> | ||
<hr class=\\"wp-block-separator\\"/> | ||
<!-- /wp:separator -->" | ||
`; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
/** | ||
* Internal dependencies | ||
*/ | ||
import { | ||
clickBlockAppender, | ||
getEditedPostContent, | ||
newPost, | ||
} from '../../support/utils'; | ||
|
||
describe( 'Code', () => { | ||
beforeEach( async () => { | ||
await newPost(); | ||
} ); | ||
|
||
it( 'can be created by three backticks and enter', async () => { | ||
await clickBlockAppender(); | ||
await page.keyboard.type( '```' ); | ||
await page.keyboard.press( 'Enter' ); | ||
await page.keyboard.type( '<?php' ); | ||
|
||
expect( await getEditedPostContent() ).toMatchSnapshot(); | ||
} ); | ||
} ); |
Oops, something went wrong.