Skip to content

Commit

Permalink
Use current default parser for full-content tests
Browse files Browse the repository at this point in the history
Also update the full-content fixtures with the resulting changes.
  • Loading branch information
nylen committed Jun 12, 2017
1 parent 127aecb commit 5ebe561
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion blocks/test/fixtures/core-button-center.html
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
<!-- wp:core/button align="center" -->
<div class="aligncenter"><a href="https://github.com/WordPress/gutenberg"><span>Help build Gutenberg</span></a></div>
<div class="aligncenter"><a href="https://github.com/WordPress/gutenberg">Help build Gutenberg</a></div>
<!-- /wp:core/button -->
7 changes: 4 additions & 3 deletions blocks/test/fixtures/core-freeform.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,13 +4,13 @@
"name": "core/freeform",
"attributes": {
"content": [
"Testing freeform block with some",
"Testing freeform block with some\n",
{
"attributes": {
"className": "wp-some-class"
},
"children": [
"HTML ",
"\n\tHTML ",
{
"attributes": {
"style": {
Expand All @@ -19,7 +19,8 @@
},
"children": "content",
"type": "span"
}
},
"\n"
],
"type": "div"
}
Expand Down
4 changes: 3 additions & 1 deletion blocks/test/fixtures/core-freeform.serialized.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<!-- wp:core/freeform -->
Testing freeform block with some
<div class="wp-some-class">HTML <span style="color:red;">content</span></div>
<div class="wp-some-class">
HTML <span style="color:red;">content</span>
</div>
<!-- /wp:core/freeform -->

1 change: 1 addition & 0 deletions blocks/test/fixtures/core-text-multi-paragraph.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
"—somewhat similar to LEGO bricks—that you can move around and interact with. Move your cursor around and you'll notice the different blocks light up with outlines and arrows. Press the arrows to reposition blocks quickly, without fearing about losing things in the process of copying and pasting."
]
},
"\n",
{
"type": "p",
"children": [
Expand Down
7 changes: 2 additions & 5 deletions blocks/test/full-content.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,7 @@ import { format } from 'util';
/**
* Internal dependencies
*/
import {
// parseWithGrammar,
parseWithTinyMCE,
} from '../api/parser';
import parse from '../api/parser';
import serialize from '../api/serializer';
import { getBlockTypes } from '../api/registration';

Expand Down Expand Up @@ -94,7 +91,7 @@ describe( 'full post content fixture', () => {
it( f, () => {
const content = readFixtureFile( f + '.html' );

const blocksActual = parseWithTinyMCE( content );
const blocksActual = parse( content );
const blocksActualNormalized = normalizeParsedBlocks( blocksActual );
let blocksExpectedString = readFixtureFile( f + '.json' );

Expand Down

0 comments on commit 5ebe561

Please sign in to comment.