diff options
22 files changed, 324 insertions, 2 deletions
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/NavBar.test.js b/test/components/NavBar.test.js index 88bc5db..be61915 100644 --- a/test/NavBar.test.js +++ b/test/components/NavBar.test.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils' -import NavBar from '../components/NavBar' +import NavBar from '../../components/NavBar' describe('NavBar', () => { // Now mount the component and you have the wrapper diff --git a/test/NavLink.test.js b/test/components/NavLink.test.js index aeb16d0..d35e6db 100644 --- a/test/NavLink.test.js +++ b/test/components/NavLink.test.js @@ -1,5 +1,5 @@ import { shallowMount } from '@vue/test-utils' -import NavLink from '../components/NavLink' +import NavLink from '../../components/NavLink' describe('NavLink', () => { // Now mount the component and you have the wrapper 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`] = ` +<section + class="feed" +> + <h1> + Zobacz co się dzieje! + </h1> + + <facebookfindusbutton-stub /> +</section> +`; 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`] = ` +<a + href="https://facebook.com/19pdhpuszcza" + rel="noopener" + target="_blank" +> + <div + class="button" + > + <img + alt="Find us on Facebook" + class="image" + src="/assets/social/find_us_fb.png" + /> + </div> +</a> +`; 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`] = ` +<div + class="footer" + style="background-color: rgb(80, 123, 52);" +> + <div + class="map" + > + <div + class="routes" + > + <nuxt-link + to="/" + > + Home + </nuxt-link> + </div> + + <div + class="routes" + /> + </div> + + <div + class="space" + /> + + <div + class="author" + > + <p> + 19 Poznańska Drużyna Harcerzy Puszcza + </p> + + <div + class="social" + > + <a + href="https://github.com/19pdh/" + rel="”noopener”" + target="_blank" + > + <img + alt="Github" + class="icon" + src="/assets/social/github.png" + /> + </a> + + <a + href="https://www.facebook.com/19pdhpuszcza/" + rel="”noopener”" + target="_blank" + > + <img + alt="Facebook" + class="icon" + src="/assets/social/facebook.png" + /> + </a> + </div> + </div> +</div> +`; diff --git a/test/components/__snapshots__/JoinUs.test.js.snap b/test/components/__snapshots__/JoinUs.test.js.snap new file mode 100644 index 0000000..832268c --- /dev/null +++ b/test/components/__snapshots__/JoinUs.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`JoinUs match snapshot 1`] = ` +<section + class="joinus" +> + <div + class="heading" + > + <div + class="title" + > + <div + class="text" + > + Rozpocznij swoją harcerską przygodę! + </div> + </div> + + <div + class="button" + > + <router-link + to="/kontakt" + > + Dołącz do nas! + </router-link> + </div> + </div> +</section> +`; diff --git a/test/__snapshots__/NavBar.test.js.snap b/test/components/__snapshots__/NavBar.test.js.snap index fb90c28..fb90c28 100644 --- a/test/__snapshots__/NavBar.test.js.snap +++ b/test/components/__snapshots__/NavBar.test.js.snap diff --git a/test/__snapshots__/NavLink.test.js.snap b/test/components/__snapshots__/NavLink.test.js.snap index 122e5c8..122e5c8 100644 --- a/test/__snapshots__/NavLink.test.js.snap +++ b/test/components/__snapshots__/NavLink.test.js.snap diff --git a/test/pages/404.test.js b/test/pages/404.test.js new file mode 100644 index 0000000..76322da --- /dev/null +++ b/test/pages/404.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import page404 from '../../pages/404' + +describe('404', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(page404) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/pages/__snapshots__/404.test.js.snap b/test/pages/__snapshots__/404.test.js.snap new file mode 100644 index 0000000..44419f9 --- /dev/null +++ b/test/pages/__snapshots__/404.test.js.snap @@ -0,0 +1,13 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`404 match snapshot 1`] = ` +<div> + <h1> + 404 + </h1> + + <p> + Nie znaleziono strony + </p> +</div> +`; diff --git a/test/pages/__snapshots__/download.test.js.snap b/test/pages/__snapshots__/download.test.js.snap new file mode 100644 index 0000000..05d1361 --- /dev/null +++ b/test/pages/__snapshots__/download.test.js.snap @@ -0,0 +1,25 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`download match snapshot 1`] = ` +<div + class="container" +> + <h1> + Do pobrania + </h1> + + <a + class="link" + href="/files/Karta_próby_na_sprawność.pdf" + > + Karta próby na sprawność + </a> + + <a + class="link" + href="/files/Próba_Harcerza.pdf" + > + Próba Harcerza + </a> +</div> +`; diff --git a/test/pages/__snapshots__/index.test.js.snap b/test/pages/__snapshots__/index.test.js.snap new file mode 100644 index 0000000..af3d906 --- /dev/null +++ b/test/pages/__snapshots__/index.test.js.snap @@ -0,0 +1,9 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`index match snapshot 1`] = ` +<div> + <joinus-stub /> + + <facebookfeed-stub /> +</div> +`; diff --git a/test/pages/__snapshots__/kontakt.test.js.snap b/test/pages/__snapshots__/kontakt.test.js.snap new file mode 100644 index 0000000..22be789 --- /dev/null +++ b/test/pages/__snapshots__/kontakt.test.js.snap @@ -0,0 +1,31 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`kontakt match snapshot 1`] = ` +<div> + <h1> + Kontakt z drużynowym + </h1> + + <p> + + tel: + + <a + href="tel:+48695516492" + > + +48695516492 + </a> + </p> + + <p> + + email: + + <a + href="mailto:patryk.niedzwiedzinski@zhr.pl" + > + patryk.niedzwiedzinski@zhr.pl + </a> + </p> +</div> +`; diff --git a/test/pages/__snapshots__/o-nas.test.js.snap b/test/pages/__snapshots__/o-nas.test.js.snap new file mode 100644 index 0000000..fbdc54c --- /dev/null +++ b/test/pages/__snapshots__/o-nas.test.js.snap @@ -0,0 +1,7 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Onas match snapshot 1`] = ` +<h1> + O nas +</h1> +`; diff --git a/test/pages/download.test.js b/test/pages/download.test.js new file mode 100644 index 0000000..78f16d9 --- /dev/null +++ b/test/pages/download.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import download from '../../pages/download' + +describe('download', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(download) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/pages/index.test.js b/test/pages/index.test.js new file mode 100644 index 0000000..1e262b3 --- /dev/null +++ b/test/pages/index.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import index from '../../pages/index' + +describe('index', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(index) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/pages/kontakt.test.js b/test/pages/kontakt.test.js new file mode 100644 index 0000000..d99e120 --- /dev/null +++ b/test/pages/kontakt.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import kontakt from '../../pages/kontakt' + +describe('kontakt', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(kontakt) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) diff --git a/test/pages/o-nas.test.js b/test/pages/o-nas.test.js new file mode 100644 index 0000000..8b87253 --- /dev/null +++ b/test/pages/o-nas.test.js @@ -0,0 +1,11 @@ +import { shallowMount } from '@vue/test-utils' +import Onas from '../../pages/o-nas' + +describe('Onas', () => { + // Now mount the component and you have the wrapper + const wrapper = shallowMount(Onas) + + it('match snapshot', () => { + expect(wrapper.element).toMatchSnapshot() + }) +}) |