From b259358616b5ca56e19b758b1f86ce2421f52c06 Mon Sep 17 00:00:00 2001 From: Patryk Niedźwiedziński Date: Sat, 31 Aug 2019 11:00:58 +0200 Subject: Add snapshots --- test/NavBar.test.js | 27 --------- test/NavLink.test.js | 23 -------- test/__snapshots__/NavBar.test.js.snap | 40 ------------- test/__snapshots__/NavLink.test.js.snap | 14 ----- test/components/FacebookFeed.test.js | 11 ++++ test/components/FacebookFindUsButton.test.js | 11 ++++ test/components/Footer.test.js | 20 +++++++ test/components/JoinUs.test.js | 11 ++++ test/components/NavBar.test.js | 27 +++++++++ test/components/NavLink.test.js | 23 ++++++++ .../__snapshots__/FacebookFeed.test.js.snap | 13 +++++ .../FacebookFindUsButton.test.js.snap | 19 +++++++ test/components/__snapshots__/Footer.test.js.snap | 66 ++++++++++++++++++++++ test/components/__snapshots__/JoinUs.test.js.snap | 31 ++++++++++ test/components/__snapshots__/NavBar.test.js.snap | 40 +++++++++++++ test/components/__snapshots__/NavLink.test.js.snap | 14 +++++ test/pages/404.test.js | 11 ++++ test/pages/__snapshots__/404.test.js.snap | 13 +++++ test/pages/__snapshots__/download.test.js.snap | 25 ++++++++ test/pages/__snapshots__/index.test.js.snap | 9 +++ test/pages/__snapshots__/kontakt.test.js.snap | 31 ++++++++++ test/pages/__snapshots__/o-nas.test.js.snap | 7 +++ test/pages/download.test.js | 11 ++++ test/pages/index.test.js | 11 ++++ test/pages/kontakt.test.js | 11 ++++ test/pages/o-nas.test.js | 11 ++++ 26 files changed, 426 insertions(+), 104 deletions(-) delete mode 100644 test/NavBar.test.js delete mode 100644 test/NavLink.test.js delete mode 100644 test/__snapshots__/NavBar.test.js.snap delete mode 100644 test/__snapshots__/NavLink.test.js.snap create mode 100644 test/components/FacebookFeed.test.js create mode 100644 test/components/FacebookFindUsButton.test.js create mode 100644 test/components/Footer.test.js create mode 100644 test/components/JoinUs.test.js create mode 100644 test/components/NavBar.test.js create mode 100644 test/components/NavLink.test.js create mode 100644 test/components/__snapshots__/FacebookFeed.test.js.snap create mode 100644 test/components/__snapshots__/FacebookFindUsButton.test.js.snap create mode 100644 test/components/__snapshots__/Footer.test.js.snap create mode 100644 test/components/__snapshots__/JoinUs.test.js.snap create mode 100644 test/components/__snapshots__/NavBar.test.js.snap create mode 100644 test/components/__snapshots__/NavLink.test.js.snap create mode 100644 test/pages/404.test.js create mode 100644 test/pages/__snapshots__/404.test.js.snap create mode 100644 test/pages/__snapshots__/download.test.js.snap create mode 100644 test/pages/__snapshots__/index.test.js.snap create mode 100644 test/pages/__snapshots__/kontakt.test.js.snap create mode 100644 test/pages/__snapshots__/o-nas.test.js.snap create mode 100644 test/pages/download.test.js create mode 100644 test/pages/index.test.js create mode 100644 test/pages/kontakt.test.js create mode 100644 test/pages/o-nas.test.js (limited to 'test') diff --git a/test/NavBar.test.js b/test/NavBar.test.js deleted file mode 100644 index 88bc5db..0000000 --- a/test/NavBar.test.js +++ /dev/null @@ -1,27 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import NavBar from '../components/NavBar' - -describe('NavBar', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(NavBar) - - wrapper.setProps({ - title: 'Title', - routes: [ - { - path: '/', - name: 'Home' - } - ] - }) - - it('check title', () => { - expect(wrapper.html()).toContain( - 'Title' - ) - }) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/NavLink.test.js b/test/NavLink.test.js deleted file mode 100644 index aeb16d0..0000000 --- a/test/NavLink.test.js +++ /dev/null @@ -1,23 +0,0 @@ -import { shallowMount } from '@vue/test-utils' -import NavLink from '../components/NavLink' - -describe('NavLink', () => { - // Now mount the component and you have the wrapper - const wrapper = shallowMount(NavLink) - - wrapper.setProps({ link: '/link', name: 'Link' }) - - it('renders the correct markup', () => { - expect(wrapper.html()).toContain( - `` - ) - }) - - it('check text', () => { - expect(wrapper.text()).toBe('Link') - }) - - it('match snapshot', () => { - expect(wrapper.element).toMatchSnapshot() - }) -}) diff --git a/test/__snapshots__/NavBar.test.js.snap b/test/__snapshots__/NavBar.test.js.snap deleted file mode 100644 index fb90c28..0000000 --- a/test/__snapshots__/NavBar.test.js.snap +++ /dev/null @@ -1,40 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`NavBar match snapshot 1`] = ` - -`; diff --git a/test/__snapshots__/NavLink.test.js.snap b/test/__snapshots__/NavLink.test.js.snap deleted file mode 100644 index 122e5c8..0000000 --- a/test/__snapshots__/NavLink.test.js.snap +++ /dev/null @@ -1,14 +0,0 @@ -// Jest Snapshot v1, https://goo.gl/fbAQLP - -exports[`NavLink match snapshot 1`] = ` - -`; diff --git a/test/components/FacebookFeed.test.js b/test/components/FacebookFeed.test.js new file mode 100644 index 0000000..7abedf6 --- /dev/null +++ b/test/components/FacebookFeed.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import FacebookFeed from '../../components/FacebookFeed' + +describe('FacebookFeed', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(FacebookFeed) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/components/FacebookFindUsButton.test.js b/test/components/FacebookFindUsButton.test.js new file mode 100644 index 0000000..d74e16f --- /dev/null +++ b/test/components/FacebookFindUsButton.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import FacebookFindUsButton from '../../components/FacebookFindUsButton' + +describe('FacebookFindUsButton', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(FacebookFindUsButton) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/components/Footer.test.js b/test/components/Footer.test.js new file mode 100644 index 0000000..e284b5a --- /dev/null +++ b/test/components/Footer.test.js @@ -0,0 +1,20 @@ +import { shallowMount } from '@vue/test-utils' +import Footer from '../../components/Footer' + +describe('Footer', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(Footer) + + wrapper.setProps({ + routes: [ + { + path: '/', + name: 'Home' + } + ] + }) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/components/JoinUs.test.js b/test/components/JoinUs.test.js new file mode 100644 index 0000000..c831459 --- /dev/null +++ b/test/components/JoinUs.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import JoinUs from '../../components/JoinUs' + +describe('JoinUs', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(JoinUs) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/components/NavBar.test.js b/test/components/NavBar.test.js new file mode 100644 index 0000000..be61915 --- /dev/null +++ b/test/components/NavBar.test.js @@ -0,0 +1,27 @@ +import { shallowMount } from '@vue/test-utils' +import NavBar from '../../components/NavBar' + +describe('NavBar', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(NavBar) + + wrapper.setProps({ + title: 'Title', + routes: [ + { + path: '/', + name: 'Home' + } + ] + }) + + it('check title', () => { + expect(wrapper.html()).toContain( + 'Title' + ) + }) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/components/NavLink.test.js b/test/components/NavLink.test.js new file mode 100644 index 0000000..d35e6db --- /dev/null +++ b/test/components/NavLink.test.js @@ -0,0 +1,23 @@ +import { shallowMount } from '@vue/test-utils' +import NavLink from '../../components/NavLink' + +describe('NavLink', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(NavLink) + + wrapper.setProps({ link: '/link', name: 'Link' }) + + it('renders the correct markup', () => { + expect(wrapper.html()).toContain( + `` + ) + }) + + it('check text', () => { + expect(wrapper.text()).toBe('Link') + }) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/components/__snapshots__/FacebookFeed.test.js.snap b/test/components/__snapshots__/FacebookFeed.test.js.snap new file mode 100644 index 0000000..6819e12 --- /dev/null +++ b/test/components/__snapshots__/FacebookFeed.test.js.snap @@ -0,0 +1,13 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`FacebookFeed match snapshot 1`] = ` +
+

+ Zobacz co się dzieje! +

+ + +
+`; diff --git a/test/components/__snapshots__/FacebookFindUsButton.test.js.snap b/test/components/__snapshots__/FacebookFindUsButton.test.js.snap new file mode 100644 index 0000000..98783c4 --- /dev/null +++ b/test/components/__snapshots__/FacebookFindUsButton.test.js.snap @@ -0,0 +1,19 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`FacebookFindUsButton match snapshot 1`] = ` + +
+ Find us on Facebook +
+
+`; diff --git a/test/components/__snapshots__/Footer.test.js.snap b/test/components/__snapshots__/Footer.test.js.snap new file mode 100644 index 0000000..577f85e --- /dev/null +++ b/test/components/__snapshots__/Footer.test.js.snap @@ -0,0 +1,66 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Footer match snapshot 1`] = ` +