diff --git a/test/fixtures/sections/2images.json b/test/fixtures/sections/2images.json new file mode 100644 index 000000000..0cc8ba461 --- /dev/null +++ b/test/fixtures/sections/2images.json @@ -0,0 +1,42 @@ +[ + { + "title": "helix-logo\nhelix-logo", + "types": [ + "has-image", + "nb-image-2", + "is-image-only" + ], + "image": "./helix_logo.png", + "intro": "helix-logo\nhelix-logo", + "meta": {}, + "type": "root", + "children": [ + { + "type": "paragraph", + "children": [ + { + "type": "image", + "title": null, + "url": "./helix_logo.png", + "alt": "helix-logo" + }, + { + "type": "text", + "value": "\n" + }, + { + "type": "image", + "title": null, + "url": "./helix_logo.png", + "alt": "helix-logo" + } + ], + "data": { + "types": [ + "has-image" + ] + } + } + ] + } +] diff --git a/test/fixtures/sections/2images.md b/test/fixtures/sections/2images.md new file mode 100644 index 000000000..93d9c6855 --- /dev/null +++ b/test/fixtures/sections/2images.md @@ -0,0 +1,2 @@ +![helix-logo](./helix_logo.png) +![helix-logo](./helix_logo.png) \ No newline at end of file diff --git a/test/fixtures/sections/paragraphwithlink.json b/test/fixtures/sections/paragraphwithlink.json new file mode 100644 index 000000000..7aed55ce0 --- /dev/null +++ b/test/fixtures/sections/paragraphwithlink.json @@ -0,0 +1,48 @@ +[ + { + "title": "This is a paragraph with a link!", + "types": [ + "has-text", + "has-link", + "nb-text-2", + "nb-link-1", + "is-text-link", + "is-text" + ], + "intro": "This is a paragraph with a link!", + "meta": {}, + "type": "root", + "children": [ + { + "type": "paragraph", + "children": [ + { + "type": "text", + "value": "This is a paragraph with a " + }, + { + "type": "link", + "title": null, + "url": "/index.html", + "children": [ + { + "type": "text", + "value": "link" + } + ] + }, + { + "type": "text", + "value": "!" + } + ], + "data": { + "types": [ + "is-text", + "has-link" + ] + } + } + ] + } +] diff --git a/test/fixtures/sections/paragraphwithlink.md b/test/fixtures/sections/paragraphwithlink.md new file mode 100644 index 000000000..27f072608 --- /dev/null +++ b/test/fixtures/sections/paragraphwithlink.md @@ -0,0 +1 @@ +This is a paragraph with a [link](/index.html)! \ No newline at end of file diff --git a/test/testGetMetadata.js b/test/testGetMetadata.js index 4d09caf89..a49282fff 100644 --- a/test/testGetMetadata.js +++ b/test/testGetMetadata.js @@ -30,6 +30,8 @@ function callback(body) { const SECTIONS_BLOCS = [ 'header', 'paragraph', + 'paragraphwithlink', + '2images', 'headerparagraph', 'headerlist', 'headerimage',