Skip to content

Commit

Permalink
Update fixtures with gallery data-wp-media-id
Browse files Browse the repository at this point in the history
  • Loading branch information
mkaz committed Jun 30, 2017
1 parent 38f99a4 commit 82eebe3
Show file tree
Hide file tree
Showing 4 changed files with 80 additions and 0 deletions.
10 changes: 10 additions & 0 deletions blocks/test/fixtures/core-gallery.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
<!-- wp:core/gallery {"images":[{"sizes":{"full":{"url":"https://cldup.com/uuUqE_dXzy.jpg","height":1080,"width":810,"orientation":"portrait"}},"mime":"image/jpeg","type":"image","subtype":"jpeg","id":1,"url":"https://cldup.com/uuUqE_dXzy.jpg","alt":"title"},{"sizes":{"full":{"url":"http://google.com/hi.png","height":1080,"width":1440,"orientation":"landscape"}},"mime":"image/jpeg","type":"image","subtype":"jpeg","id":2,"url":"http://google.com/hi.png","alt":"title"}]} -->
<div class="wp-block-gallery">
<figure class="blocks-gallery-image">
<img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" />
</figure>
<figure class="blocks-gallery-image">
<img src="http://google.com/hi.png" alt="title" />
</figure>
</div>
<!-- /wp:core/gallery -->
18 changes: 18 additions & 0 deletions blocks/test/fixtures/core-gallery.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
[
{
"uid": "_uid_0",
"name": "core/gallery",
"attributes": {
"images": [
{
"url": "https://cldup.com/uuUqE_dXzy.jpg",
"alt": "title"
},
{
"url": "http://google.com/hi.png",
"alt": "title"
}
]
}
}
]
46 changes: 46 additions & 0 deletions blocks/test/fixtures/core-gallery.parsed.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"blockName": "core/gallery",
"attrs": {
"images": [
{
"sizes": {
"full": {
"url": "https://cldup.com/uuUqE_dXzy.jpg",
"height": 1080,
"width": 810,
"orientation": "portrait"
}
},
"mime": "image/jpeg",
"type": "image",
"subtype": "jpeg",
"id": 1,
"url": "https://cldup.com/uuUqE_dXzy.jpg",
"alt": "title"
},
{
"sizes": {
"full": {
"url": "http://google.com/hi.png",
"height": 1080,
"width": 1440,
"orientation": "landscape"
}
},
"mime": "image/jpeg",
"type": "image",
"subtype": "jpeg",
"id": 2,
"url": "http://google.com/hi.png",
"alt": "title"
}
]
},
"rawContent": "\n<div class=\"wp-block-gallery\">\n\t<figure class=\"blocks-gallery-image\">\n\t\t<img src=\"https://cldup.com/uuUqE_dXzy.jpg\" alt=\"title\" />\n\t</figure>\n\t<figure class=\"blocks-gallery-image\">\n\t\t<img src=\"http://google.com/hi.png\" alt=\"title\" />\n\t</figure>\n</div>\n"
},
{
"attrs": {},
"rawContent": "\n"
}
]
6 changes: 6 additions & 0 deletions blocks/test/fixtures/core-gallery.serialized.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
<!-- wp:core/gallery -->
<div class="alignnone columns-2 is-cropped wp-block-gallery">
<figure class="blocks-gallery-image"><img src="https://cldup.com/uuUqE_dXzy.jpg" alt="title" /></figure>
<figure class="blocks-gallery-image"><img src="http://google.com/hi.png" alt="title" /></figure>
</div>
<!-- /wp:core/gallery -->

0 comments on commit 82eebe3

Please sign in to comment.