From 77f4810ddc963386bc68d3e8a5e078ef4cf270b2 Mon Sep 17 00:00:00 2001 From: Alina Beck Date: Wed, 20 Nov 2019 12:31:40 +0300 Subject: [PATCH] set up global localVue by setting up localVue with all required plugins (such as styleguide and vuex) in a separate testSetup file we can avoid doing this individually in all component tests the testSetup is executed before each test suite, so each test file gets a fresh instance of localVue --- webapp/.babelrc | 5 +++-- webapp/components/Avatar/Avatar.spec.js | 8 ++------ webapp/components/AvatarMenu/AvatarMenu.spec.js | 11 ++--------- .../CategoriesSelect/CategoriesSelect.spec.js | 6 ++---- webapp/components/Category/index.spec.js | 7 +++---- webapp/components/Comment/Comment.spec.js | 8 ++------ .../components/CommentForm/CommentForm.spec.js | 7 +++---- .../components/CommentList/CommentList.spec.js | 9 ++------- .../ContributionForm/ContributionForm.spec.js | 12 ++++-------- webapp/components/DeleteData/DeleteData.spec.js | 9 +++------ .../components/DonationInfo/DonationInfo.spec.js | 7 +++---- .../DropdownFilter/DropdownFilter.spec.js | 9 +++------ webapp/components/Editor/Editor.spec.js | 7 +++---- webapp/components/Editor/nodes/Embed.spec.js | 9 ++------- webapp/components/Embed/EmbedComponent.spec.js | 9 +++------ webapp/components/Emotions/Emotions.spec.js | 9 +++------ webapp/components/Empty/Empty.spec.js | 7 +++---- webapp/components/EnterNonce/EnterNonce.spec.js | 7 ++----- webapp/components/FilterMenu/FilterMenu.spec.js | 9 ++------- .../components/FilterPosts/FilterPosts.spec.js | 11 +++-------- webapp/components/Hashtag/Hashtag.spec.js | 7 +++---- .../components/LocaleSwitch/LocaleSwitch.spec.js | 11 +++-------- .../components/MasonryGrid/MasonryGrid.spec.js | 7 +++---- .../MasonryGrid/MasonryGridItem.spec.js | 7 +++---- webapp/components/Modal.spec.js | 8 ++------ webapp/components/Modal/ConfirmModal.spec.js | 9 +++------ webapp/components/Modal/DisableModal.spec.js | 7 ++----- webapp/components/Modal/ReportModal.spec.js | 8 ++------ .../components/Notification/Notification.spec.js | 11 +++-------- .../NotificationList/NotificationList.spec.js | 10 +++------- .../NotificationMenu/NotificationMenu.spec.js | 9 ++------- .../NotificationsTable.spec.js | 15 +++++---------- webapp/components/Paginate/Paginate.spec.js | 8 +++----- webapp/components/Password/Change.spec.js | 9 ++------- .../PasswordReset/ChangePassword.spec.js | 6 ++---- webapp/components/PasswordReset/Request.spec.js | 6 ++---- webapp/components/PostCard/PostCard.spec.js | 12 ++++-------- .../Registration/CreateUserAccount.spec.js | 6 ++---- webapp/components/Registration/Signup.spec.js | 6 ++---- webapp/components/RelativeDateTime/spec.js | 4 ++-- .../components/ReleaseModal/ReleaseModal.spec.js | 7 ++----- webapp/components/Ribbon/index.spec.js | 4 ++-- webapp/components/SearchInput.spec.js | 9 +++------ .../components/TeaserImage/TeaserImage.spec.js | 7 ++----- webapp/components/Upload/spec.js | 9 ++------- webapp/components/User/User.spec.js | 13 ++----------- webapp/package.json | 4 ++++ webapp/pages/admin/index.spec.js | 7 +++---- webapp/pages/admin/users.spec.js | 7 ++----- webapp/pages/index.spec.js | 15 +++------------ webapp/pages/notifications/index.spec.js | 10 +++------- webapp/pages/post/_id/_slug/index.spec.js | 10 ++-------- webapp/pages/profile/_id/_slug.spec.js | 12 ++---------- webapp/pages/settings/index.spec.js | 8 ++------ .../my-email-address/enter-nonce.spec.js | 7 ++----- .../settings/my-email-address/index.spec.js | 8 ++------ .../settings/my-email-address/verify.spec.js | 8 ++------ webapp/pages/settings/my-social-media.spec.js | 10 ++-------- webapp/testSetup.js | 16 ++++++++++++++++ webapp/yarn.lock | 14 +++++++++++++- 60 files changed, 177 insertions(+), 340 deletions(-) create mode 100644 webapp/testSetup.js diff --git a/webapp/.babelrc b/webapp/.babelrc index b23873e12..b2c8f5e2f 100644 --- a/webapp/.babelrc +++ b/webapp/.babelrc @@ -1,6 +1,7 @@ { "plugins": [ - "@babel/plugin-syntax-dynamic-import" + "@babel/plugin-syntax-dynamic-import", + "transform-require-context" ], "presets": [ [ @@ -24,4 +25,4 @@ ] } } -} \ No newline at end of file +} diff --git a/webapp/components/Avatar/Avatar.spec.js b/webapp/components/Avatar/Avatar.spec.js index 3de402a54..f7b0f908f 100644 --- a/webapp/components/Avatar/Avatar.spec.js +++ b/webapp/components/Avatar/Avatar.spec.js @@ -1,11 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { mount } from '@vue/test-utils' import Avatar from './Avatar.vue' -import Filters from '~/plugins/vue-filters' -const localVue = createLocalVue() -localVue.use(Styleguide) -localVue.use(Filters) +const localVue = global.localVue describe('Avatar.vue', () => { let propsData = {} diff --git a/webapp/components/AvatarMenu/AvatarMenu.spec.js b/webapp/components/AvatarMenu/AvatarMenu.spec.js index 6327ded0a..519b61d00 100644 --- a/webapp/components/AvatarMenu/AvatarMenu.spec.js +++ b/webapp/components/AvatarMenu/AvatarMenu.spec.js @@ -1,15 +1,8 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import Vuex from 'vuex' -import VTooltip from 'v-tooltip' -import Styleguide from '@human-connection/styleguide' import AvatarMenu from './AvatarMenu.vue' -import Filters from '~/plugins/vue-filters' -const localVue = createLocalVue() -localVue.use(Styleguide) -localVue.use(Vuex) -localVue.use(Filters) -localVue.use(VTooltip) +const localVue = global.localVue config.stubs['nuxt-link'] = '' config.stubs['router-link'] = '' diff --git a/webapp/components/CategoriesSelect/CategoriesSelect.spec.js b/webapp/components/CategoriesSelect/CategoriesSelect.spec.js index 199dacb74..4e9fa52d0 100644 --- a/webapp/components/CategoriesSelect/CategoriesSelect.spec.js +++ b/webapp/components/CategoriesSelect/CategoriesSelect.spec.js @@ -1,9 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import CategoriesSelect from './CategoriesSelect' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue describe('CategoriesSelect.vue', () => { let wrapper diff --git a/webapp/components/Category/index.spec.js b/webapp/components/Category/index.spec.js index 7ce0b7243..27a2d9b9b 100644 --- a/webapp/components/Category/index.spec.js +++ b/webapp/components/Category/index.spec.js @@ -1,9 +1,8 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { shallowMount } from '@vue/test-utils' + import Category from './index' -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue describe('Category', () => { let icon diff --git a/webapp/components/Comment/Comment.spec.js b/webapp/components/Comment/Comment.spec.js index 59e3f6c5a..b307700d9 100644 --- a/webapp/components/Comment/Comment.spec.js +++ b/webapp/components/Comment/Comment.spec.js @@ -1,12 +1,8 @@ -import { config, shallowMount, createLocalVue } from '@vue/test-utils' +import { config, shallowMount } from '@vue/test-utils' import Comment from './Comment.vue' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue config.stubs['client-only'] = '' diff --git a/webapp/components/CommentForm/CommentForm.spec.js b/webapp/components/CommentForm/CommentForm.spec.js index 94ce5aa66..47bc01982 100644 --- a/webapp/components/CommentForm/CommentForm.spec.js +++ b/webapp/components/CommentForm/CommentForm.spec.js @@ -1,12 +1,11 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import CommentForm from './CommentForm' -import Styleguide from '@human-connection/styleguide' + import MutationObserver from 'mutation-observer' global.MutationObserver = MutationObserver -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue describe('CommentForm.vue', () => { let mocks diff --git a/webapp/components/CommentList/CommentList.spec.js b/webapp/components/CommentList/CommentList.spec.js index 3287b7cd4..0c037d2ff 100644 --- a/webapp/components/CommentList/CommentList.spec.js +++ b/webapp/components/CommentList/CommentList.spec.js @@ -1,14 +1,9 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import CommentList from './CommentList' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Styleguide) -localVue.use(Vuex) -localVue.use(Filters) localVue.filter('truncate', string => string) config.stubs['v-popover'] = '' diff --git a/webapp/components/ContributionForm/ContributionForm.spec.js b/webapp/components/ContributionForm/ContributionForm.spec.js index 836fe3fd3..124c38206 100644 --- a/webapp/components/ContributionForm/ContributionForm.spec.js +++ b/webapp/components/ContributionForm/ContributionForm.spec.js @@ -1,20 +1,16 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import ContributionForm from './ContributionForm.vue' -import Styleguide from '@human-connection/styleguide' + import Vuex from 'vuex' import PostMutations from '~/graphql/PostMutations.js' import CategoriesSelect from '~/components/CategoriesSelect/CategoriesSelect' -import Filters from '~/plugins/vue-filters' + import TeaserImage from '~/components/TeaserImage/TeaserImage' import MutationObserver from 'mutation-observer' global.MutationObserver = MutationObserver -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) +const localVue = global.localVue config.stubs['client-only'] = '' config.stubs['nuxt-link'] = '' diff --git a/webapp/components/DeleteData/DeleteData.spec.js b/webapp/components/DeleteData/DeleteData.spec.js index 73ca985fa..abcdf9101 100644 --- a/webapp/components/DeleteData/DeleteData.spec.js +++ b/webapp/components/DeleteData/DeleteData.spec.js @@ -1,12 +1,9 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import DeleteData from './DeleteData.vue' -import Styleguide from '@human-connection/styleguide' + import Vuex from 'vuex' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue describe('DeleteData.vue', () => { let mocks diff --git a/webapp/components/DonationInfo/DonationInfo.spec.js b/webapp/components/DonationInfo/DonationInfo.spec.js index ca719c19a..c308e2146 100644 --- a/webapp/components/DonationInfo/DonationInfo.spec.js +++ b/webapp/components/DonationInfo/DonationInfo.spec.js @@ -1,9 +1,8 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { mount } from '@vue/test-utils' + import DonationInfo from './DonationInfo.vue' -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue const mockDate = new Date(2019, 11, 6) global.Date = jest.fn(() => mockDate) diff --git a/webapp/components/DropdownFilter/DropdownFilter.spec.js b/webapp/components/DropdownFilter/DropdownFilter.spec.js index 9566fa6ef..8020a487f 100644 --- a/webapp/components/DropdownFilter/DropdownFilter.spec.js +++ b/webapp/components/DropdownFilter/DropdownFilter.spec.js @@ -1,11 +1,8 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import VTooltip from 'v-tooltip' -import Styleguide from '@human-connection/styleguide' +import { mount } from '@vue/test-utils' + import DropdownFilter from './DropdownFilter.vue' -const localVue = createLocalVue() -localVue.use(Styleguide) -localVue.use(VTooltip) +const localVue = global.localVue describe('DropdownFilter.vue', () => { let propsData, wrapper, mocks diff --git a/webapp/components/Editor/Editor.spec.js b/webapp/components/Editor/Editor.spec.js index 18eaef3b8..8f27ebd17 100644 --- a/webapp/components/Editor/Editor.spec.js +++ b/webapp/components/Editor/Editor.spec.js @@ -1,13 +1,12 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import Editor from './Editor' -import Styleguide from '@human-connection/styleguide' + import MutationObserver from 'mutation-observer' import Vue from 'vue' global.MutationObserver = MutationObserver -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue describe('Editor.vue', () => { let wrapper diff --git a/webapp/components/Editor/nodes/Embed.spec.js b/webapp/components/Editor/nodes/Embed.spec.js index 639f99338..e87ee1570 100644 --- a/webapp/components/Editor/nodes/Embed.spec.js +++ b/webapp/components/Editor/nodes/Embed.spec.js @@ -1,14 +1,9 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils' -import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' +import { shallowMount } from '@vue/test-utils' + import Embed from './Embed' let Wrapper, propsData, component const someUrl = 'https://www.youtube.com/watch?v=qkdXAtO40Fo' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) describe('Embed.vue', () => { beforeEach(() => { diff --git a/webapp/components/Embed/EmbedComponent.spec.js b/webapp/components/Embed/EmbedComponent.spec.js index 5ad8dd324..ab0f0c8fb 100644 --- a/webapp/components/Embed/EmbedComponent.spec.js +++ b/webapp/components/Embed/EmbedComponent.spec.js @@ -1,14 +1,11 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' + import EmbedComponent from './EmbedComponent' let wrapper, propsData, getters, mocks const someUrl = 'https://www.youtube.com/watch?v=qkdXAtO40Fo' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue describe('EmbedComponent.vue', () => { const Wrapper = () => { diff --git a/webapp/components/Emotions/Emotions.spec.js b/webapp/components/Emotions/Emotions.spec.js index ecc7f9e94..b7a2bbe34 100644 --- a/webapp/components/Emotions/Emotions.spec.js +++ b/webapp/components/Emotions/Emotions.spec.js @@ -1,13 +1,10 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import Emotions from './Emotions.vue' -import Styleguide from '@human-connection/styleguide' + import Vuex from 'vuex' import PostMutations from '~/graphql/PostMutations.js' -const localVue = createLocalVue() - -localVue.use(Styleguide) -localVue.use(Vuex) +const localVue = global.localVue describe('Emotions.vue', () => { let wrapper diff --git a/webapp/components/Empty/Empty.spec.js b/webapp/components/Empty/Empty.spec.js index a4220fa63..6b1a37324 100644 --- a/webapp/components/Empty/Empty.spec.js +++ b/webapp/components/Empty/Empty.spec.js @@ -1,9 +1,8 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { shallowMount } from '@vue/test-utils' + import Empty from './Empty.vue' -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue describe('Empty.vue', () => { let propsData, wrapper diff --git a/webapp/components/EnterNonce/EnterNonce.spec.js b/webapp/components/EnterNonce/EnterNonce.spec.js index 67f1f9073..3e05e45d0 100644 --- a/webapp/components/EnterNonce/EnterNonce.spec.js +++ b/webapp/components/EnterNonce/EnterNonce.spec.js @@ -1,10 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import EnterNonce from './EnterNonce.vue' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Styleguide) +const localVue = global.localVue describe('EnterNonce ', () => { let wrapper diff --git a/webapp/components/FilterMenu/FilterMenu.spec.js b/webapp/components/FilterMenu/FilterMenu.spec.js index c377e1838..079ef5487 100644 --- a/webapp/components/FilterMenu/FilterMenu.spec.js +++ b/webapp/components/FilterMenu/FilterMenu.spec.js @@ -1,12 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import FilterMenu from './FilterMenu.vue' -import Styleguide from '@human-connection/styleguide' -import VTooltip from 'v-tooltip' -const localVue = createLocalVue() - -localVue.use(Styleguide) -localVue.use(VTooltip) +const localVue = global.localVue describe('FilterMenu.vue', () => { let wrapper diff --git a/webapp/components/FilterPosts/FilterPosts.spec.js b/webapp/components/FilterPosts/FilterPosts.spec.js index 504112572..f27074b7b 100644 --- a/webapp/components/FilterPosts/FilterPosts.spec.js +++ b/webapp/components/FilterPosts/FilterPosts.spec.js @@ -1,16 +1,11 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import VTooltip from 'v-tooltip' -import Styleguide from '@human-connection/styleguide' +import { mount } from '@vue/test-utils' + import Vuex from 'vuex' import FilterPosts from './FilterPosts.vue' import locales from '~/locales' import orderBy from 'lodash/orderBy' -const localVue = createLocalVue() - -localVue.use(Styleguide) -localVue.use(VTooltip) -localVue.use(Vuex) +const localVue = global.localVue let mutations let getters diff --git a/webapp/components/Hashtag/Hashtag.spec.js b/webapp/components/Hashtag/Hashtag.spec.js index cfd1a7c2a..279c5268d 100644 --- a/webapp/components/Hashtag/Hashtag.spec.js +++ b/webapp/components/Hashtag/Hashtag.spec.js @@ -1,9 +1,8 @@ -import { config, shallowMount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { config, shallowMount } from '@vue/test-utils' + import Hashtag from './Hashtag' -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue config.stubs['nuxt-link'] = '' diff --git a/webapp/components/LocaleSwitch/LocaleSwitch.spec.js b/webapp/components/LocaleSwitch/LocaleSwitch.spec.js index 3e9e17443..ee28b742a 100644 --- a/webapp/components/LocaleSwitch/LocaleSwitch.spec.js +++ b/webapp/components/LocaleSwitch/LocaleSwitch.spec.js @@ -1,14 +1,9 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' -import VTooltip from 'v-tooltip' +import { mount } from '@vue/test-utils' + import LocaleSwitch from './LocaleSwitch.vue' import Vuex from 'vuex' -const localVue = createLocalVue() - -localVue.use(Styleguide) -localVue.use(VTooltip) -localVue.use(Vuex) +const localVue = global.localVue describe('LocaleSwitch.vue', () => { let wrapper, mocks, computed, deutschLanguageItem, getters diff --git a/webapp/components/MasonryGrid/MasonryGrid.spec.js b/webapp/components/MasonryGrid/MasonryGrid.spec.js index 2a52f9a85..8eed5e150 100644 --- a/webapp/components/MasonryGrid/MasonryGrid.spec.js +++ b/webapp/components/MasonryGrid/MasonryGrid.spec.js @@ -1,9 +1,8 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { mount } from '@vue/test-utils' + import MasonryGrid from './MasonryGrid' -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue describe('MasonryGrid', () => { let wrapper diff --git a/webapp/components/MasonryGrid/MasonryGridItem.spec.js b/webapp/components/MasonryGrid/MasonryGridItem.spec.js index fc799dadc..1783f0a15 100644 --- a/webapp/components/MasonryGrid/MasonryGridItem.spec.js +++ b/webapp/components/MasonryGrid/MasonryGridItem.spec.js @@ -1,9 +1,8 @@ -import { config, shallowMount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { config, shallowMount } from '@vue/test-utils' + import MasonryGridItem from './MasonryGridItem' -const localVue = createLocalVue() -localVue.use(Styleguide) +const localVue = global.localVue config.stubs['ds-grid-item'] = '' diff --git a/webapp/components/Modal.spec.js b/webapp/components/Modal.spec.js index 35ece0bee..2dae4285a 100644 --- a/webapp/components/Modal.spec.js +++ b/webapp/components/Modal.spec.js @@ -1,16 +1,12 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils' +import { shallowMount } from '@vue/test-utils' import Modal from './Modal.vue' import ConfirmModal from './Modal/ConfirmModal.vue' import DisableModal from './Modal/DisableModal.vue' import ReportModal from './Modal/ReportModal.vue' import Vuex from 'vuex' import { getters, mutations } from '../store/modal' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue describe('Modal.vue', () => { let wrapper diff --git a/webapp/components/Modal/ConfirmModal.spec.js b/webapp/components/Modal/ConfirmModal.spec.js index f6adecb81..a1fc998ef 100644 --- a/webapp/components/Modal/ConfirmModal.spec.js +++ b/webapp/components/Modal/ConfirmModal.spec.js @@ -1,13 +1,10 @@ -import { config, shallowMount, mount, createLocalVue } from '@vue/test-utils' -import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' +import { config, shallowMount, mount } from '@vue/test-utils' + import ConfirmModal from './ConfirmModal.vue' import { postMenuModalsData } from '~/components/utils/PostHelpers' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Vuex) -localVue.use(Styleguide) config.stubs['sweetalert-icon'] = '' describe('ConfirmModal.vue', () => { diff --git a/webapp/components/Modal/DisableModal.spec.js b/webapp/components/Modal/DisableModal.spec.js index b5ebf888c..8bf796921 100644 --- a/webapp/components/Modal/DisableModal.spec.js +++ b/webapp/components/Modal/DisableModal.spec.js @@ -1,10 +1,7 @@ -import { shallowMount, mount, createLocalVue } from '@vue/test-utils' +import { shallowMount, mount } from '@vue/test-utils' import DisableModal from './DisableModal.vue' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Styleguide) +const localVue = global.localVue describe('DisableModal.vue', () => { let mocks diff --git a/webapp/components/Modal/ReportModal.spec.js b/webapp/components/Modal/ReportModal.spec.js index d6350f595..b151f3c7b 100644 --- a/webapp/components/Modal/ReportModal.spec.js +++ b/webapp/components/Modal/ReportModal.spec.js @@ -1,12 +1,8 @@ -import { config, shallowMount, mount, createLocalVue } from '@vue/test-utils' +import { config, shallowMount, mount } from '@vue/test-utils' import ReportModal from './ReportModal.vue' -import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Vuex) -localVue.use(Styleguide) config.stubs['sweetalert-icon'] = '' describe('ReportModal.vue', () => { diff --git a/webapp/components/Notification/Notification.spec.js b/webapp/components/Notification/Notification.spec.js index 54e6b4ab3..750f59b3a 100644 --- a/webapp/components/Notification/Notification.spec.js +++ b/webapp/components/Notification/Notification.spec.js @@ -1,14 +1,9 @@ -import { config, mount, createLocalVue, RouterLinkStub } from '@vue/test-utils' +import { config, mount, RouterLinkStub } from '@vue/test-utils' import Notification from './Notification.vue' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' + import Vuex from 'vuex' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) +const localVue = global.localVue config.stubs['client-only'] = '' diff --git a/webapp/components/NotificationList/NotificationList.spec.js b/webapp/components/NotificationList/NotificationList.spec.js index c48daefe6..f70b7a482 100644 --- a/webapp/components/NotificationList/NotificationList.spec.js +++ b/webapp/components/NotificationList/NotificationList.spec.js @@ -1,16 +1,12 @@ -import { config, shallowMount, mount, createLocalVue, RouterLinkStub } from '@vue/test-utils' +import { config, shallowMount, mount, RouterLinkStub } from '@vue/test-utils' import NotificationList from './NotificationList' import Notification from '../Notification/Notification' import Vuex from 'vuex' -import Filters from '~/plugins/vue-filters' -import Styleguide from '@human-connection/styleguide' + import { notifications } from '~/components/utils/Notifications' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) localVue.filter('truncate', string => string) config.stubs['client-only'] = '' diff --git a/webapp/components/NotificationMenu/NotificationMenu.spec.js b/webapp/components/NotificationMenu/NotificationMenu.spec.js index 87576a5f3..a75e2a860 100644 --- a/webapp/components/NotificationMenu/NotificationMenu.spec.js +++ b/webapp/components/NotificationMenu/NotificationMenu.spec.js @@ -1,13 +1,8 @@ -import { config, shallowMount, createLocalVue } from '@vue/test-utils' +import { config, shallowMount } from '@vue/test-utils' import NotificationMenu from './NotificationMenu' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' +const localVue = global.localVue -const localVue = createLocalVue() - -localVue.use(Styleguide) -localVue.use(Filters) localVue.filter('truncate', string => string) config.stubs['dropdown'] = '' diff --git a/webapp/components/NotificationsTable/NotificationsTable.spec.js b/webapp/components/NotificationsTable/NotificationsTable.spec.js index 59b8953e9..80095666f 100644 --- a/webapp/components/NotificationsTable/NotificationsTable.spec.js +++ b/webapp/components/NotificationsTable/NotificationsTable.spec.js @@ -1,16 +1,11 @@ -import { config, mount, createLocalVue, RouterLinkStub } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' -import VTooltip from 'v-tooltip' +import { config, mount, RouterLinkStub } from '@vue/test-utils' + import Vuex from 'vuex' import NotificationsTable from './NotificationsTable' -import Filters from '~/plugins/vue-filters' -import { notifications } from '~/components/utils/Notifications' -const localVue = createLocalVue() -localVue.use(Styleguide) -localVue.use(Filters) -localVue.use(VTooltip) -localVue.use(Vuex) +import { notifications } from '~/components/utils/Notifications' +const localVue = global.localVue + localVue.filter('truncate', string => string) config.stubs['client-only'] = '' diff --git a/webapp/components/Paginate/Paginate.spec.js b/webapp/components/Paginate/Paginate.spec.js index 034d33301..3f63d2840 100644 --- a/webapp/components/Paginate/Paginate.spec.js +++ b/webapp/components/Paginate/Paginate.spec.js @@ -1,10 +1,8 @@ -import { mount, createLocalVue } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { mount } from '@vue/test-utils' + import Paginate from './Paginate' -const localVue = createLocalVue() - -localVue.use(Styleguide) +const localVue = global.localVue describe('Paginate.vue', () => { let propsData, wrapper, Wrapper, nextButton, backButton diff --git a/webapp/components/Password/Change.spec.js b/webapp/components/Password/Change.spec.js index ef89c34f7..6010f5d8c 100644 --- a/webapp/components/Password/Change.spec.js +++ b/webapp/components/Password/Change.spec.js @@ -1,12 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import ChangePassword from './Change.vue' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' -const localVue = createLocalVue() - -localVue.use(Styleguide) -localVue.use(Filters) +const localVue = global.localVue describe('ChangePassword.vue', () => { let mocks diff --git a/webapp/components/PasswordReset/ChangePassword.spec.js b/webapp/components/PasswordReset/ChangePassword.spec.js index b5d85dea7..b1b55cb06 100644 --- a/webapp/components/PasswordReset/ChangePassword.spec.js +++ b/webapp/components/PasswordReset/ChangePassword.spec.js @@ -1,10 +1,8 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import ChangePassword from './ChangePassword' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Styleguide) config.stubs['sweetalert-icon'] = '' describe('ChangePassword ', () => { diff --git a/webapp/components/PasswordReset/Request.spec.js b/webapp/components/PasswordReset/Request.spec.js index 4a6dbde9f..df55cff18 100644 --- a/webapp/components/PasswordReset/Request.spec.js +++ b/webapp/components/PasswordReset/Request.spec.js @@ -1,10 +1,8 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import Request from './Request' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Styleguide) config.stubs['sweetalert-icon'] = '' config.stubs['client-only'] = '' config.stubs['nuxt-link'] = '' diff --git a/webapp/components/PostCard/PostCard.spec.js b/webapp/components/PostCard/PostCard.spec.js index ab902f05a..28ce10b9e 100644 --- a/webapp/components/PostCard/PostCard.spec.js +++ b/webapp/components/PostCard/PostCard.spec.js @@ -1,14 +1,10 @@ -import { config, shallowMount, mount, createLocalVue, RouterLinkStub } from '@vue/test-utils' -import Styleguide from '@human-connection/styleguide' +import { config, shallowMount, mount, RouterLinkStub } from '@vue/test-utils' + import Vuex from 'vuex' -import Filters from '~/plugins/vue-filters' + import PostCard from './PostCard.vue' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) +const localVue = global.localVue config.stubs['client-only'] = '' config.stubs['v-popover'] = '' diff --git a/webapp/components/Registration/CreateUserAccount.spec.js b/webapp/components/Registration/CreateUserAccount.spec.js index 7bc2aba28..81f825956 100644 --- a/webapp/components/Registration/CreateUserAccount.spec.js +++ b/webapp/components/Registration/CreateUserAccount.spec.js @@ -1,12 +1,10 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import { VERSION } from '~/constants/terms-and-conditions-version.js' import CreateUserAccount from './CreateUserAccount' import { SignupVerificationMutation } from '~/graphql/Registration.js' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Styleguide) config.stubs['sweetalert-icon'] = '' config.stubs['client-only'] = '' config.stubs['nuxt-link'] = '' diff --git a/webapp/components/Registration/Signup.spec.js b/webapp/components/Registration/Signup.spec.js index b78a18541..2fd440491 100644 --- a/webapp/components/Registration/Signup.spec.js +++ b/webapp/components/Registration/Signup.spec.js @@ -1,10 +1,8 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import Signup, { SignupMutation, SignupByInvitationMutation } from './Signup' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Styleguide) config.stubs['sweetalert-icon'] = '' describe('Signup', () => { diff --git a/webapp/components/RelativeDateTime/spec.js b/webapp/components/RelativeDateTime/spec.js index 15574f539..6d2b924a7 100644 --- a/webapp/components/RelativeDateTime/spec.js +++ b/webapp/components/RelativeDateTime/spec.js @@ -1,7 +1,7 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils' +import { shallowMount } from '@vue/test-utils' import RelativeDateTime from './' -const localVue = createLocalVue() +const localVue = global.localVue describe('RelativeDateTime', () => { let mocks diff --git a/webapp/components/ReleaseModal/ReleaseModal.spec.js b/webapp/components/ReleaseModal/ReleaseModal.spec.js index bb7281ab7..22201a406 100644 --- a/webapp/components/ReleaseModal/ReleaseModal.spec.js +++ b/webapp/components/ReleaseModal/ReleaseModal.spec.js @@ -1,10 +1,7 @@ -import { shallowMount, mount, createLocalVue } from '@vue/test-utils' +import { shallowMount, mount } from '@vue/test-utils' import ReleaseModal from './ReleaseModal.vue' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Styleguide) +const localVue = global.localVue describe('ReleaseModal.vue', () => { let mocks diff --git a/webapp/components/Ribbon/index.spec.js b/webapp/components/Ribbon/index.spec.js index b1c519992..0d9c2e05c 100644 --- a/webapp/components/Ribbon/index.spec.js +++ b/webapp/components/Ribbon/index.spec.js @@ -1,7 +1,7 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils' +import { shallowMount } from '@vue/test-utils' import Ribbon from './index' -const localVue = createLocalVue() +const localVue = global.localVue describe('Ribbon', () => { let text diff --git a/webapp/components/SearchInput.spec.js b/webapp/components/SearchInput.spec.js index bf44b906b..8cc8b9459 100644 --- a/webapp/components/SearchInput.spec.js +++ b/webapp/components/SearchInput.spec.js @@ -1,11 +1,8 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import SearchInput from './SearchInput.vue' -import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue + localVue.filter('truncate', () => 'truncated string') localVue.filter('dateTime', () => Date.now) diff --git a/webapp/components/TeaserImage/TeaserImage.spec.js b/webapp/components/TeaserImage/TeaserImage.spec.js index 048a7914c..dd89c8cfd 100644 --- a/webapp/components/TeaserImage/TeaserImage.spec.js +++ b/webapp/components/TeaserImage/TeaserImage.spec.js @@ -1,10 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import TeaserImage from './TeaserImage.vue' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Styleguide) +const localVue = global.localVue describe('TeaserImage.vue', () => { let wrapper diff --git a/webapp/components/Upload/spec.js b/webapp/components/Upload/spec.js index 8ee5f6046..d9878ea2d 100644 --- a/webapp/components/Upload/spec.js +++ b/webapp/components/Upload/spec.js @@ -1,12 +1,7 @@ -import { shallowMount, createLocalVue } from '@vue/test-utils' +import { shallowMount } from '@vue/test-utils' import Upload from '.' -import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue describe('Upload', () => { let wrapper diff --git a/webapp/components/User/User.spec.js b/webapp/components/User/User.spec.js index 71babe641..4a6e37df1 100644 --- a/webapp/components/User/User.spec.js +++ b/webapp/components/User/User.spec.js @@ -1,19 +1,10 @@ -import { mount, createLocalVue, RouterLinkStub } from '@vue/test-utils' +import { mount, RouterLinkStub } from '@vue/test-utils' import User from './User.vue' import Vuex from 'vuex' -import VTooltip from 'v-tooltip' -import Filters from '~/plugins/vue-filters' -import Styleguide from '@human-connection/styleguide' - -const localVue = createLocalVue() +const localVue = global.localVue const filter = jest.fn(str => str) -localVue.use(Vuex) -localVue.use(VTooltip) -localVue.use(Styleguide) -localVue.use(Filters) - localVue.filter('truncate', filter) describe('User', () => { diff --git a/webapp/package.json b/webapp/package.json index a75d80095..1a9ec1b41 100644 --- a/webapp/package.json +++ b/webapp/package.json @@ -47,6 +47,9 @@ "^~/(.*)$": "/$1", "\\.(css|less)$": "identity-obj-proxy" }, + "setupFiles": [ + "/testSetup.js" + ], "testMatch": [ "**/?(*.)+(spec|test).js?(x)" ] @@ -62,6 +65,7 @@ "accounting": "~0.4.1", "apollo-cache-inmemory": "~1.6.3", "apollo-client": "~2.6.4", + "babel-plugin-transform-require-context": "^0.1.1", "cookie-universal-nuxt": "~2.0.18", "cropperjs": "^1.5.5", "cross-env": "~6.0.3", diff --git a/webapp/pages/admin/index.spec.js b/webapp/pages/admin/index.spec.js index 68256aa9d..35e8ba212 100644 --- a/webapp/pages/admin/index.spec.js +++ b/webapp/pages/admin/index.spec.js @@ -1,11 +1,10 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import AdminIndexPage from './index.vue' -import Styleguide from '@human-connection/styleguide' + import VueApollo from 'vue-apollo' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Styleguide) localVue.use(VueApollo) describe('admin/index.vue', () => { diff --git a/webapp/pages/admin/users.spec.js b/webapp/pages/admin/users.spec.js index f477aab1d..37d155b92 100644 --- a/webapp/pages/admin/users.spec.js +++ b/webapp/pages/admin/users.spec.js @@ -1,10 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import Users from './users.vue' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Styleguide) +const localVue = global.localVue describe('Users', () => { let wrapper diff --git a/webapp/pages/index.spec.js b/webapp/pages/index.spec.js index 0cee06b38..ada55d01f 100644 --- a/webapp/pages/index.spec.js +++ b/webapp/pages/index.spec.js @@ -1,19 +1,10 @@ -import { config, shallowMount, mount, createLocalVue } from '@vue/test-utils' +import { config, shallowMount, mount } from '@vue/test-utils' import PostIndex from './index.vue' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' -import VTooltip from 'v-tooltip' + import FilterMenu from '~/components/FilterMenu/FilterMenu' -import InfiniteScroll from '~/plugins/vue-infinite-scroll' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) -localVue.use(VTooltip) -localVue.use(InfiniteScroll) +const localVue = global.localVue config.stubs['client-only'] = '' config.stubs['router-link'] = '' diff --git a/webapp/pages/notifications/index.spec.js b/webapp/pages/notifications/index.spec.js index 8d0413063..61af56f63 100644 --- a/webapp/pages/notifications/index.spec.js +++ b/webapp/pages/notifications/index.spec.js @@ -1,15 +1,11 @@ -import { config, shallowMount, mount, createLocalVue } from '@vue/test-utils' +import { config, shallowMount, mount } from '@vue/test-utils' import NotificationsPage from './index.vue' -import Styleguide from '@human-connection/styleguide' -import VTooltip from 'v-tooltip' + import DropdownFilter from '~/components/DropdownFilter/DropdownFilter' import NotificationsTable from '~/components/NotificationsTable/NotificationsTable' import Paginate from '~/components/Paginate/Paginate' -const localVue = createLocalVue() - -localVue.use(Styleguide) -localVue.use(VTooltip) +const localVue = global.localVue config.stubs['client-only'] = '' diff --git a/webapp/pages/post/_id/_slug/index.spec.js b/webapp/pages/post/_id/_slug/index.spec.js index b5827db8d..db960bb67 100644 --- a/webapp/pages/post/_id/_slug/index.spec.js +++ b/webapp/pages/post/_id/_slug/index.spec.js @@ -1,14 +1,8 @@ -import { config, shallowMount, createLocalVue } from '@vue/test-utils' +import { config, shallowMount } from '@vue/test-utils' import PostSlug from './index.vue' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) +const localVue = global.localVue config.stubs['client-only'] = '' diff --git a/webapp/pages/profile/_id/_slug.spec.js b/webapp/pages/profile/_id/_slug.spec.js index f7eba10cc..71a49bfab 100644 --- a/webapp/pages/profile/_id/_slug.spec.js +++ b/webapp/pages/profile/_id/_slug.spec.js @@ -1,16 +1,8 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import ProfileSlug from './_slug.vue' -import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' -import InfiniteScroll from '~/plugins/vue-infinite-scroll' -const localVue = createLocalVue() +const localVue = global.localVue -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) -localVue.use(InfiniteScroll) localVue.filter('date', d => d) config.stubs['client-only'] = '' diff --git a/webapp/pages/settings/index.spec.js b/webapp/pages/settings/index.spec.js index 1040f2ad0..ff2781073 100644 --- a/webapp/pages/settings/index.spec.js +++ b/webapp/pages/settings/index.spec.js @@ -1,12 +1,8 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import index from './index.vue' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue describe('index.vue', () => { let store diff --git a/webapp/pages/settings/my-email-address/enter-nonce.spec.js b/webapp/pages/settings/my-email-address/enter-nonce.spec.js index abb6a71bf..3e0ed5a4c 100644 --- a/webapp/pages/settings/my-email-address/enter-nonce.spec.js +++ b/webapp/pages/settings/my-email-address/enter-nonce.spec.js @@ -1,10 +1,7 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import EnterNoncePage from './enter-nonce.vue' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Styleguide) +const localVue = global.localVue describe('EnterNoncePage', () => { let mocks diff --git a/webapp/pages/settings/my-email-address/index.spec.js b/webapp/pages/settings/my-email-address/index.spec.js index 6f99f182a..dd64c1733 100644 --- a/webapp/pages/settings/my-email-address/index.spec.js +++ b/webapp/pages/settings/my-email-address/index.spec.js @@ -1,12 +1,8 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import EmailSettingsIndexPage from './index.vue' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue config.stubs['sweetalert-icon'] = '' diff --git a/webapp/pages/settings/my-email-address/verify.spec.js b/webapp/pages/settings/my-email-address/verify.spec.js index d0f098bb0..e9c2e5a34 100644 --- a/webapp/pages/settings/my-email-address/verify.spec.js +++ b/webapp/pages/settings/my-email-address/verify.spec.js @@ -1,12 +1,8 @@ -import { config, mount, createLocalVue } from '@vue/test-utils' +import { config, mount } from '@vue/test-utils' import EmailVerifyPage from './verify.vue' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) +const localVue = global.localVue config.stubs['client-only'] = '' config.stubs['sweetalert-icon'] = '' diff --git a/webapp/pages/settings/my-social-media.spec.js b/webapp/pages/settings/my-social-media.spec.js index 046edf152..b1c9e0649 100644 --- a/webapp/pages/settings/my-social-media.spec.js +++ b/webapp/pages/settings/my-social-media.spec.js @@ -1,15 +1,9 @@ -import { mount, createLocalVue } from '@vue/test-utils' +import { mount } from '@vue/test-utils' import flushPromises from 'flush-promises' import MySocialMedia from './my-social-media.vue' import Vuex from 'vuex' -import Styleguide from '@human-connection/styleguide' -import Filters from '~/plugins/vue-filters' -const localVue = createLocalVue() - -localVue.use(Vuex) -localVue.use(Styleguide) -localVue.use(Filters) +const localVue = global.localVue describe('my-social-media.vue', () => { let wrapper diff --git a/webapp/testSetup.js b/webapp/testSetup.js new file mode 100644 index 000000000..09d161e1f --- /dev/null +++ b/webapp/testSetup.js @@ -0,0 +1,16 @@ +import { createLocalVue } from '@vue/test-utils' +import Vuex from 'vuex' +import VTooltip from 'v-tooltip' +import Styleguide from '@human-connection/styleguide' +import BaseComponents from '~/plugins/base-components' +import Filters from '~/plugins/vue-filters' +import InfiniteScroll from '~/plugins/vue-infinite-scroll' + +global.localVue = createLocalVue() + +global.localVue.use(Vuex) +global.localVue.use(VTooltip) +global.localVue.use(Styleguide) +global.localVue.use(BaseComponents) +global.localVue.use(Filters) +global.localVue.use(InfiniteScroll) diff --git a/webapp/yarn.lock b/webapp/yarn.lock index 72a6dd55b..7288f9cba 100644 --- a/webapp/yarn.lock +++ b/webapp/yarn.lock @@ -867,7 +867,7 @@ dependencies: regenerator-runtime "^0.13.2" -"@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.7.0": +"@babel/template@7", "@babel/template@^7.1.0", "@babel/template@^7.4.0", "@babel/template@^7.4.4", "@babel/template@^7.7.0": version "7.7.0" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0" integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ== @@ -4562,6 +4562,13 @@ babel-plugin-transform-remove-undefined@^0.5.0: dependencies: babel-helper-evaluate-path "^0.5.0" +babel-plugin-transform-require-context@^0.1.1: + version "0.1.1" + resolved "https://registry.yarnpkg.com/babel-plugin-transform-require-context/-/babel-plugin-transform-require-context-0.1.1.tgz#319b545ca83080b5062776b46cc9b8b346fea9a6" + integrity sha512-4ceqYOtzgmq4/QsB8dP7pUrUOCjY/jrRYdt7YkIOWHxtGDQbcf6YZDyLCiPQf6KsEIcIbSQiTRXOsbLiuJfgNQ== + dependencies: + "@babel/template" "7" + babel-plugin-transform-simplify-comparison-operators@^6.9.4: version "6.9.4" resolved "https://registry.yarnpkg.com/babel-plugin-transform-simplify-comparison-operators/-/babel-plugin-transform-simplify-comparison-operators-6.9.4.tgz#f62afe096cab0e1f68a2d753fdf283888471ceb9" @@ -14268,6 +14275,11 @@ serve-static@1.14.1, serve-static@^1.14.1: version "1.14.1" resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9" integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg== + dependencies: + encodeurl "~1.0.2" + escape-html "~1.0.3" + parseurl "~1.3.3" + send "0.17.1" server-destroy@^1.0.1: version "1.0.1"