diff options
author | 2018-06-20 23:08:45 +0300 | |
---|---|---|
committer | 2023-01-13 10:37:53 +0300 | |
commit | 7a8f6604e77859455d8abab8c46af0a4619a9c60 (patch) | |
tree | baa6895d4966fd98202518a52c09f741c9539bbf /vnext | |
parent | c3e791ae2357bbe220c133e3ab417bd5f7c55410 (diff) |
add Footer snapshots
Diffstat (limited to 'vnext')
-rw-r--r-- | vnext/src/components/__tests__/Footer.test.js | 18 | ||||
-rw-r--r-- | vnext/src/components/__tests__/__snapshots__/Footer.test.js.snap | 175 |
2 files changed, 193 insertions, 0 deletions
diff --git a/vnext/src/components/__tests__/Footer.test.js b/vnext/src/components/__tests__/Footer.test.js new file mode 100644 index 00000000..17461b85 --- /dev/null +++ b/vnext/src/components/__tests__/Footer.test.js @@ -0,0 +1,18 @@ +import React from 'react'; + +import Footer from '../Footer'; +import renderer from 'react-test-renderer'; + +test('Footer renders correctly with and without sponsors', () => { + const footer = renderer.create( + <Footer /> + ); + let footerTree = footer.toJSON(); + expect(footerTree).toMatchSnapshot(); + + const sponsoredFooter = renderer.create( + <Footer links='Sponsored footer' /> + ); + footerTree = sponsoredFooter.toJSON(); + expect(footerTree).toMatchSnapshot(); +});
\ No newline at end of file diff --git a/vnext/src/components/__tests__/__snapshots__/Footer.test.js.snap b/vnext/src/components/__tests__/__snapshots__/Footer.test.js.snap new file mode 100644 index 00000000..23f2deff --- /dev/null +++ b/vnext/src/components/__tests__/__snapshots__/Footer.test.js.snap @@ -0,0 +1,175 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Footer renders correctly with and without sponsors 1`] = ` +<div + id="footer" +> + <div + id="footer-right" + > + · + <a + href="/help/contacts" + rel="nofollow" + > + Contacts + </a> + · + <a + href="/help/tos" + rel="nofollow" + > + TOS + </a> + </div> + <div + id="footer-social" + > + <a + href="https://twitter.com/Juick" + rel="nofollow" + > + <div + className="icon icon--ei-sc-twitter icon--m" + > + <svg + className="icon__cnt" + dangerouslySetInnerHTML={ + Object { + "__html": "<use xlink:href=#ei-sc-twitter-icon />", + } + } + /> + </div> + </a> + <a + href="https://vk.com/juick" + rel="nofollow" + > + <div + className="icon icon--ei-sc-vk icon--m" + > + <svg + className="icon__cnt" + dangerouslySetInnerHTML={ + Object { + "__html": "<use xlink:href=#ei-sc-vk-icon />", + } + } + /> + </div> + </a> + <a + href="https://www.facebook.com/JuickCom" + rel="nofollow" + > + <div + className="icon icon--ei-sc-facebook icon--m" + > + <svg + className="icon__cnt" + dangerouslySetInnerHTML={ + Object { + "__html": "<use xlink:href=#ei-sc-facebook-icon />", + } + } + /> + </div> + </a> + </div> + <div + id="footer-left" + > + juick.com © 2008-2018 + </div> +</div> +`; + +exports[`Footer renders correctly with and without sponsors 2`] = ` +<div + id="footer" +> + <div + id="footer-right" + > + · + <a + href="/help/contacts" + rel="nofollow" + > + Contacts + </a> + · + <a + href="/help/tos" + rel="nofollow" + > + TOS + </a> + </div> + <div + id="footer-social" + > + <a + href="https://twitter.com/Juick" + rel="nofollow" + > + <div + className="icon icon--ei-sc-twitter icon--m" + > + <svg + className="icon__cnt" + dangerouslySetInnerHTML={ + Object { + "__html": "<use xlink:href=#ei-sc-twitter-icon />", + } + } + /> + </div> + </a> + <a + href="https://vk.com/juick" + rel="nofollow" + > + <div + className="icon icon--ei-sc-vk icon--m" + > + <svg + className="icon__cnt" + dangerouslySetInnerHTML={ + Object { + "__html": "<use xlink:href=#ei-sc-vk-icon />", + } + } + /> + </div> + </a> + <a + href="https://www.facebook.com/JuickCom" + rel="nofollow" + > + <div + className="icon icon--ei-sc-facebook icon--m" + > + <svg + className="icon__cnt" + dangerouslySetInnerHTML={ + Object { + "__html": "<use xlink:href=#ei-sc-facebook-icon />", + } + } + /> + </div> + </a> + </div> + <div + id="footer-left" + > + juick.com © 2008-2018 + </div> + <div> + Sponsors: + Sponsored footer + </div> +</div> +`; |