Skip to content

Commit

Permalink
Gallery Block: Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jan 18, 2018
1 parent 91b2504 commit d04b78d
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 21 deletions.
2 changes: 1 addition & 1 deletion blocks/test/fixtures/core__gallery.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
"imageCrop": true,
"linkTo": "none"
},
"originalContent": "<ul class=\"wp-block-gallery\">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>"
"originalContent": "<ul class=\"wp-block-gallery alignnone columns-2 is-cropped\">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>"
}
]
2 changes: 1 addition & 1 deletion blocks/test/fixtures/core__gallery.parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"blockName": "core/gallery",
"attrs": null,
"innerBlocks": [],
"innerHTML": "\n<ul class=\"wp-block-gallery\">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>\n"
"innerHTML": "\n<ul class=\"wp-block-gallery alignnone columns-2 is-cropped\">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>\n"
},
{
"attrs": {},
Expand Down
12 changes: 4 additions & 8 deletions blocks/test/fixtures/core__gallery.serialized.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<!-- wp:gallery -->
<ul class="wp-block-gallery alignnone columns-2 is-cropped">
<li class="blocks-gallery-item">
<figure>
<img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
</figure>
</li>
<figure><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" /></figure>
</li>
<li class="blocks-gallery-item">
<figure>
<img src="http://google.com/hi.png" alt="title" />
</figure>
</li>
<figure><img src="http://google.com/hi.png" alt="title" /></figure>
</li>
</ul>
<!-- /wp:gallery -->
2 changes: 1 addition & 1 deletion blocks/test/fixtures/core__gallery__columns.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!-- wp:core/gallery {"columns":"1"} -->
<ul class="wp-block-gallery columns-1 ">
<ul class="wp-block-gallery alignnone columns-1 is-cropped">
<li class="blocks-gallery-item">
<figure>
<img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
Expand Down
4 changes: 2 additions & 2 deletions blocks/test/fixtures/core__gallery__columns.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
{
"uid": "_uid_0",
"name": "core/gallery",
"isValid": false,
"isValid": true,
"attributes": {
"align": "none",
"images": [
Expand All @@ -19,6 +19,6 @@
"imageCrop": true,
"linkTo": "none"
},
"originalContent": "<ul class=\"wp-block-gallery columns-1 \">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>"
"originalContent": "<ul class=\"wp-block-gallery alignnone columns-1 is-cropped\">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>"
}
]
2 changes: 1 addition & 1 deletion blocks/test/fixtures/core__gallery__columns.parsed.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"columns": "1"
},
"innerBlocks": [],
"innerHTML": "\n<ul class=\"wp-block-gallery columns-1 \">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>\n"
"innerHTML": "\n<ul class=\"wp-block-gallery alignnone columns-1 is-cropped\">\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n\t<li class=\"blocks-gallery-item\">\n\t\t<figure>\n\t\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t\t</figure>\n\t</li>\n</ul>\n"
},
{
"attrs": {},
Expand Down
10 changes: 3 additions & 7 deletions blocks/test/fixtures/core__gallery__columns.serialized.html
Original file line number Diff line number Diff line change
@@ -1,14 +1,10 @@
<!-- wp:gallery {"columns":1} -->
<ul class="wp-block-gallery columns-1 ">
<ul class="wp-block-gallery alignnone columns-1 is-cropped">
<li class="blocks-gallery-item">
<figure>
<img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
</figure>
<figure><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" /></figure>
</li>
<li class="blocks-gallery-item">
<figure>
<img src="http://google.com/hi.png" alt="title" />
</figure>
<figure><img src="http://google.com/hi.png" alt="title" /></figure>
</li>
</ul>
<!-- /wp:gallery -->

0 comments on commit d04b78d

Please sign in to comment.