diff options
-rw-r--r-- | components/Posts/PostLink.vue | 4 | ||||
-rw-r--r-- | tests/unit/__snapshots__/storybook.test.js.snap | 263 |
2 files changed, 264 insertions, 3 deletions
diff --git a/components/Posts/PostLink.vue b/components/Posts/PostLink.vue index 0361b80..b7bfab4 100644 --- a/components/Posts/PostLink.vue +++ b/components/Posts/PostLink.vue @@ -1,6 +1,6 @@ <template> <div class="post-link"> - <nuxt-link :to="route"> + <nuxt-link :to="route" no-prefetch> <div> <div class="image" :style="`background-image: url('${image}')`" /> <div class="post-container"> @@ -31,7 +31,7 @@ export default { image: { type: String, required: false, - default: () => '/assets/og/default.jpg', + default: '/assets/og/default.jpg', }, }, computed: { diff --git a/tests/unit/__snapshots__/storybook.test.js.snap b/tests/unit/__snapshots__/storybook.test.js.snap index d9c1da8..496f7a4 100644 --- a/tests/unit/__snapshots__/storybook.test.js.snap +++ b/tests/unit/__snapshots__/storybook.test.js.snap @@ -160,6 +160,7 @@ exports[`Storyshots Posts/PostLink default 1`] = ` class="post-link" > <nuxt-link + no-prefetch="" to="/kronika/2019/20/11/test" > <div> @@ -197,6 +198,7 @@ exports[`Storyshots Posts/PostLink with image 1`] = ` class="post-link" > <nuxt-link + no-prefetch="" to="/kronika/2019/20/11/test" > <div> @@ -226,7 +228,266 @@ exports[`Storyshots Posts/PostLink with image 1`] = ` </div> `; -exports[`Storyshots Posts/PurePostList default 1`] = `<!---->`; +exports[`Storyshots Posts/PurePostList default 1`] = ` +<div + class="post-list" +> + <!----> + + <div + class="post-list-container" + > + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(/assets/og/default.jpg);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(/assets/og/default.jpg);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(/assets/og/default.jpg);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(https://images.unsplash.com/photo-1573145881456-0708c72340ca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(https://images.unsplash.com/photo-1573145881456-0708c72340ca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(https://images.unsplash.com/photo-1573145881456-0708c72340ca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(https://images.unsplash.com/photo-1573145881456-0708c72340ca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + <div + class="post-link" + > + <nuxt-link + no-prefetch="" + to="/kronika/2019/20/11/test" + > + <div> + <div + class="image" + style="background-image: url(https://images.unsplash.com/photo-1573145881456-0708c72340ca?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjEyMDd9&auto=format&fit=crop&w=1350&q=80);" + /> + + <div + class="post-container" + > + <h4 + class="post-title" + > + Test PostLink + </h4> + + <p + class="post-description" + > + Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus pulvinar non ex non sagittis. Quisque in enim tellus. Aliquam consequat mi id sapien congue, sit amet vulputate tortor viverra. Donec.... + </p> + </div> + </div> + </nuxt-link> + </div> + </div> +</div> +`; exports[`Storyshots Posts/PurePostList loading 1`] = ` <div |