mirror of
https://github.com/Ocelot-Social-Community/Ocelot-Social.git
synced 2025-12-12 23:35:58 +00:00
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
This commit is contained in:
parent
90d4b361e8
commit
77f4810ddc
@ -1,6 +1,7 @@
|
|||||||
{
|
{
|
||||||
"plugins": [
|
"plugins": [
|
||||||
"@babel/plugin-syntax-dynamic-import"
|
"@babel/plugin-syntax-dynamic-import",
|
||||||
|
"transform-require-context"
|
||||||
],
|
],
|
||||||
"presets": [
|
"presets": [
|
||||||
[
|
[
|
||||||
@ -24,4 +25,4 @@
|
|||||||
]
|
]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,11 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Avatar from './Avatar.vue'
|
import Avatar from './Avatar.vue'
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
describe('Avatar.vue', () => {
|
describe('Avatar.vue', () => {
|
||||||
let propsData = {}
|
let propsData = {}
|
||||||
|
|||||||
@ -1,15 +1,8 @@
|
|||||||
import { config, mount, createLocalVue } from '@vue/test-utils'
|
import { config, mount } from '@vue/test-utils'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import AvatarMenu from './AvatarMenu.vue'
|
import AvatarMenu from './AvatarMenu.vue'
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Filters)
|
|
||||||
localVue.use(VTooltip)
|
|
||||||
|
|
||||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
config.stubs['router-link'] = '<span><slot /></span>'
|
config.stubs['router-link'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -1,9 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import CategoriesSelect from './CategoriesSelect'
|
import CategoriesSelect from './CategoriesSelect'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('CategoriesSelect.vue', () => {
|
describe('CategoriesSelect.vue', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Category from './index'
|
import Category from './index'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Category', () => {
|
describe('Category', () => {
|
||||||
let icon
|
let icon
|
||||||
|
|||||||
@ -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 Comment from './Comment.vue'
|
||||||
import Vuex from 'vuex'
|
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['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|||||||
@ -1,12 +1,11 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import CommentForm from './CommentForm'
|
import CommentForm from './CommentForm'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import MutationObserver from 'mutation-observer'
|
import MutationObserver from 'mutation-observer'
|
||||||
|
|
||||||
global.MutationObserver = MutationObserver
|
global.MutationObserver = MutationObserver
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('CommentForm.vue', () => {
|
describe('CommentForm.vue', () => {
|
||||||
let mocks
|
let mocks
|
||||||
|
|||||||
@ -1,14 +1,9 @@
|
|||||||
import { config, mount, createLocalVue } from '@vue/test-utils'
|
import { config, mount } from '@vue/test-utils'
|
||||||
import CommentList from './CommentList'
|
import CommentList from './CommentList'
|
||||||
import Vuex from 'vuex'
|
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)
|
localVue.filter('truncate', string => string)
|
||||||
|
|
||||||
config.stubs['v-popover'] = '<span><slot /></span>'
|
config.stubs['v-popover'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -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 ContributionForm from './ContributionForm.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import PostMutations from '~/graphql/PostMutations.js'
|
import PostMutations from '~/graphql/PostMutations.js'
|
||||||
import CategoriesSelect from '~/components/CategoriesSelect/CategoriesSelect'
|
import CategoriesSelect from '~/components/CategoriesSelect/CategoriesSelect'
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
import TeaserImage from '~/components/TeaserImage/TeaserImage'
|
import TeaserImage from '~/components/TeaserImage/TeaserImage'
|
||||||
import MutationObserver from 'mutation-observer'
|
import MutationObserver from 'mutation-observer'
|
||||||
|
|
||||||
global.MutationObserver = MutationObserver
|
global.MutationObserver = MutationObserver
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -1,12 +1,9 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import DeleteData from './DeleteData.vue'
|
import DeleteData from './DeleteData.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('DeleteData.vue', () => {
|
describe('DeleteData.vue', () => {
|
||||||
let mocks
|
let mocks
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import DonationInfo from './DonationInfo.vue'
|
import DonationInfo from './DonationInfo.vue'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
const mockDate = new Date(2019, 11, 6)
|
const mockDate = new Date(2019, 11, 6)
|
||||||
global.Date = jest.fn(() => mockDate)
|
global.Date = jest.fn(() => mockDate)
|
||||||
|
|||||||
@ -1,11 +1,8 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import DropdownFilter from './DropdownFilter.vue'
|
import DropdownFilter from './DropdownFilter.vue'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(VTooltip)
|
|
||||||
|
|
||||||
describe('DropdownFilter.vue', () => {
|
describe('DropdownFilter.vue', () => {
|
||||||
let propsData, wrapper, mocks
|
let propsData, wrapper, mocks
|
||||||
|
|||||||
@ -1,13 +1,12 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Editor from './Editor'
|
import Editor from './Editor'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import MutationObserver from 'mutation-observer'
|
import MutationObserver from 'mutation-observer'
|
||||||
import Vue from 'vue'
|
import Vue from 'vue'
|
||||||
|
|
||||||
global.MutationObserver = MutationObserver
|
global.MutationObserver = MutationObserver
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Editor.vue', () => {
|
describe('Editor.vue', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,14 +1,9 @@
|
|||||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import Vuex from 'vuex'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Embed from './Embed'
|
import Embed from './Embed'
|
||||||
|
|
||||||
let Wrapper, propsData, component
|
let Wrapper, propsData, component
|
||||||
const someUrl = 'https://www.youtube.com/watch?v=qkdXAtO40Fo'
|
const someUrl = 'https://www.youtube.com/watch?v=qkdXAtO40Fo'
|
||||||
const localVue = createLocalVue()
|
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Embed.vue', () => {
|
describe('Embed.vue', () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
|
|||||||
@ -1,14 +1,11 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import EmbedComponent from './EmbedComponent'
|
import EmbedComponent from './EmbedComponent'
|
||||||
|
|
||||||
let wrapper, propsData, getters, mocks
|
let wrapper, propsData, getters, mocks
|
||||||
const someUrl = 'https://www.youtube.com/watch?v=qkdXAtO40Fo'
|
const someUrl = 'https://www.youtube.com/watch?v=qkdXAtO40Fo'
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('EmbedComponent.vue', () => {
|
describe('EmbedComponent.vue', () => {
|
||||||
const Wrapper = () => {
|
const Wrapper = () => {
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Emotions from './Emotions.vue'
|
import Emotions from './Emotions.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import PostMutations from '~/graphql/PostMutations.js'
|
import PostMutations from '~/graphql/PostMutations.js'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Vuex)
|
|
||||||
|
|
||||||
describe('Emotions.vue', () => {
|
describe('Emotions.vue', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Empty from './Empty.vue'
|
import Empty from './Empty.vue'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Empty.vue', () => {
|
describe('Empty.vue', () => {
|
||||||
let propsData, wrapper
|
let propsData, wrapper
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import EnterNonce from './EnterNonce.vue'
|
import EnterNonce from './EnterNonce.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('EnterNonce ', () => {
|
describe('EnterNonce ', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,12 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import FilterMenu from './FilterMenu.vue'
|
import FilterMenu from './FilterMenu.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(VTooltip)
|
|
||||||
|
|
||||||
describe('FilterMenu.vue', () => {
|
describe('FilterMenu.vue', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,16 +1,11 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import FilterPosts from './FilterPosts.vue'
|
import FilterPosts from './FilterPosts.vue'
|
||||||
import locales from '~/locales'
|
import locales from '~/locales'
|
||||||
import orderBy from 'lodash/orderBy'
|
import orderBy from 'lodash/orderBy'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(VTooltip)
|
|
||||||
localVue.use(Vuex)
|
|
||||||
|
|
||||||
let mutations
|
let mutations
|
||||||
let getters
|
let getters
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { config, shallowMount, createLocalVue } from '@vue/test-utils'
|
import { config, shallowMount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Hashtag from './Hashtag'
|
import Hashtag from './Hashtag'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|||||||
@ -1,14 +1,9 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
import LocaleSwitch from './LocaleSwitch.vue'
|
import LocaleSwitch from './LocaleSwitch.vue'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(VTooltip)
|
|
||||||
localVue.use(Vuex)
|
|
||||||
|
|
||||||
describe('LocaleSwitch.vue', () => {
|
describe('LocaleSwitch.vue', () => {
|
||||||
let wrapper, mocks, computed, deutschLanguageItem, getters
|
let wrapper, mocks, computed, deutschLanguageItem, getters
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import MasonryGrid from './MasonryGrid'
|
import MasonryGrid from './MasonryGrid'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('MasonryGrid', () => {
|
describe('MasonryGrid', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,9 +1,8 @@
|
|||||||
import { config, shallowMount, createLocalVue } from '@vue/test-utils'
|
import { config, shallowMount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import MasonryGridItem from './MasonryGridItem'
|
import MasonryGridItem from './MasonryGridItem'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
config.stubs['ds-grid-item'] = '<span><slot /></span>'
|
config.stubs['ds-grid-item'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,12 @@
|
|||||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import Modal from './Modal.vue'
|
import Modal from './Modal.vue'
|
||||||
import ConfirmModal from './Modal/ConfirmModal.vue'
|
import ConfirmModal from './Modal/ConfirmModal.vue'
|
||||||
import DisableModal from './Modal/DisableModal.vue'
|
import DisableModal from './Modal/DisableModal.vue'
|
||||||
import ReportModal from './Modal/ReportModal.vue'
|
import ReportModal from './Modal/ReportModal.vue'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import { getters, mutations } from '../store/modal'
|
import { getters, mutations } from '../store/modal'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Modal.vue', () => {
|
describe('Modal.vue', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,13 +1,10 @@
|
|||||||
import { config, shallowMount, mount, createLocalVue } from '@vue/test-utils'
|
import { config, shallowMount, mount } from '@vue/test-utils'
|
||||||
import Vuex from 'vuex'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import ConfirmModal from './ConfirmModal.vue'
|
import ConfirmModal from './ConfirmModal.vue'
|
||||||
import { postMenuModalsData } from '~/components/utils/PostHelpers'
|
import { postMenuModalsData } from '~/components/utils/PostHelpers'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
|
|
||||||
describe('ConfirmModal.vue', () => {
|
describe('ConfirmModal.vue', () => {
|
||||||
|
|||||||
@ -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 DisableModal from './DisableModal.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('DisableModal.vue', () => {
|
describe('DisableModal.vue', () => {
|
||||||
let mocks
|
let mocks
|
||||||
|
|||||||
@ -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 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'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
|
|
||||||
describe('ReportModal.vue', () => {
|
describe('ReportModal.vue', () => {
|
||||||
|
|||||||
@ -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 Notification from './Notification.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|||||||
@ -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 NotificationList from './NotificationList'
|
||||||
import Notification from '../Notification/Notification'
|
import Notification from '../Notification/Notification'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import { notifications } from '~/components/utils/Notifications'
|
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)
|
localVue.filter('truncate', string => string)
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -1,13 +1,8 @@
|
|||||||
import { config, shallowMount, createLocalVue } from '@vue/test-utils'
|
import { config, shallowMount } from '@vue/test-utils'
|
||||||
import NotificationMenu from './NotificationMenu'
|
import NotificationMenu from './NotificationMenu'
|
||||||
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
const localVue = global.localVue
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
localVue.filter('truncate', string => string)
|
localVue.filter('truncate', string => string)
|
||||||
|
|
||||||
config.stubs['dropdown'] = '<span class="dropdown"><slot /></span>'
|
config.stubs['dropdown'] = '<span class="dropdown"><slot /></span>'
|
||||||
|
|||||||
@ -1,16 +1,11 @@
|
|||||||
import { config, mount, createLocalVue, RouterLinkStub } from '@vue/test-utils'
|
import { config, mount, RouterLinkStub } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import NotificationsTable from './NotificationsTable'
|
import NotificationsTable from './NotificationsTable'
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
import { notifications } from '~/components/utils/Notifications'
|
|
||||||
const localVue = createLocalVue()
|
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
import { notifications } from '~/components/utils/Notifications'
|
||||||
localVue.use(Filters)
|
const localVue = global.localVue
|
||||||
localVue.use(VTooltip)
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.filter('truncate', string => string)
|
localVue.filter('truncate', string => string)
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Paginate from './Paginate'
|
import Paginate from './Paginate'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Paginate.vue', () => {
|
describe('Paginate.vue', () => {
|
||||||
let propsData, wrapper, Wrapper, nextButton, backButton
|
let propsData, wrapper, Wrapper, nextButton, backButton
|
||||||
|
|||||||
@ -1,12 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import ChangePassword from './Change.vue'
|
import ChangePassword from './Change.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
describe('ChangePassword.vue', () => {
|
describe('ChangePassword.vue', () => {
|
||||||
let mocks
|
let mocks
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
import { config, mount, createLocalVue } from '@vue/test-utils'
|
import { config, mount } from '@vue/test-utils'
|
||||||
import ChangePassword from './ChangePassword'
|
import ChangePassword from './ChangePassword'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
|
|
||||||
describe('ChangePassword ', () => {
|
describe('ChangePassword ', () => {
|
||||||
|
|||||||
@ -1,10 +1,8 @@
|
|||||||
import { config, mount, createLocalVue } from '@vue/test-utils'
|
import { config, mount } from '@vue/test-utils'
|
||||||
import Request from './Request'
|
import Request from './Request'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -1,14 +1,10 @@
|
|||||||
import { config, shallowMount, mount, createLocalVue, RouterLinkStub } from '@vue/test-utils'
|
import { config, shallowMount, mount, RouterLinkStub } from '@vue/test-utils'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
import PostCard from './PostCard.vue'
|
import PostCard from './PostCard.vue'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
config.stubs['v-popover'] = '<span><slot /></span>'
|
config.stubs['v-popover'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -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 { VERSION } from '~/constants/terms-and-conditions-version.js'
|
||||||
import CreateUserAccount from './CreateUserAccount'
|
import CreateUserAccount from './CreateUserAccount'
|
||||||
import { SignupVerificationMutation } from '~/graphql/Registration.js'
|
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'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
config.stubs['nuxt-link'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -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 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'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
|
|
||||||
describe('Signup', () => {
|
describe('Signup', () => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import RelativeDateTime from './'
|
import RelativeDateTime from './'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
describe('RelativeDateTime', () => {
|
describe('RelativeDateTime', () => {
|
||||||
let mocks
|
let mocks
|
||||||
|
|||||||
@ -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 ReleaseModal from './ReleaseModal.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('ReleaseModal.vue', () => {
|
describe('ReleaseModal.vue', () => {
|
||||||
let mocks
|
let mocks
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import Ribbon from './index'
|
import Ribbon from './index'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
describe('Ribbon', () => {
|
describe('Ribbon', () => {
|
||||||
let text
|
let text
|
||||||
|
|||||||
@ -1,11 +1,8 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import SearchInput from './SearchInput.vue'
|
import SearchInput from './SearchInput.vue'
|
||||||
import Vuex from 'vuex'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
const localVue = createLocalVue()
|
|
||||||
|
|
||||||
localVue.use(Vuex)
|
const localVue = global.localVue
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.filter('truncate', () => 'truncated string')
|
localVue.filter('truncate', () => 'truncated string')
|
||||||
localVue.filter('dateTime', () => Date.now)
|
localVue.filter('dateTime', () => Date.now)
|
||||||
|
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import TeaserImage from './TeaserImage.vue'
|
import TeaserImage from './TeaserImage.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('TeaserImage.vue', () => {
|
describe('TeaserImage.vue', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -1,12 +1,7 @@
|
|||||||
import { shallowMount, createLocalVue } from '@vue/test-utils'
|
import { shallowMount } from '@vue/test-utils'
|
||||||
import Upload from '.'
|
import Upload from '.'
|
||||||
import Vuex from 'vuex'
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Upload', () => {
|
describe('Upload', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -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 User from './User.vue'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
import Filters from '~/plugins/vue-filters'
|
|
||||||
|
|
||||||
import Styleguide from '@human-connection/styleguide'
|
const localVue = global.localVue
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
|
||||||
const filter = jest.fn(str => str)
|
const filter = jest.fn(str => str)
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(VTooltip)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
localVue.filter('truncate', filter)
|
localVue.filter('truncate', filter)
|
||||||
|
|
||||||
describe('User', () => {
|
describe('User', () => {
|
||||||
|
|||||||
@ -47,6 +47,9 @@
|
|||||||
"^~/(.*)$": "<rootDir>/$1",
|
"^~/(.*)$": "<rootDir>/$1",
|
||||||
"\\.(css|less)$": "identity-obj-proxy"
|
"\\.(css|less)$": "identity-obj-proxy"
|
||||||
},
|
},
|
||||||
|
"setupFiles": [
|
||||||
|
"<rootDir>/testSetup.js"
|
||||||
|
],
|
||||||
"testMatch": [
|
"testMatch": [
|
||||||
"**/?(*.)+(spec|test).js?(x)"
|
"**/?(*.)+(spec|test).js?(x)"
|
||||||
]
|
]
|
||||||
@ -62,6 +65,7 @@
|
|||||||
"accounting": "~0.4.1",
|
"accounting": "~0.4.1",
|
||||||
"apollo-cache-inmemory": "~1.6.3",
|
"apollo-cache-inmemory": "~1.6.3",
|
||||||
"apollo-client": "~2.6.4",
|
"apollo-client": "~2.6.4",
|
||||||
|
"babel-plugin-transform-require-context": "^0.1.1",
|
||||||
"cookie-universal-nuxt": "~2.0.18",
|
"cookie-universal-nuxt": "~2.0.18",
|
||||||
"cropperjs": "^1.5.5",
|
"cropperjs": "^1.5.5",
|
||||||
"cross-env": "~6.0.3",
|
"cross-env": "~6.0.3",
|
||||||
|
|||||||
@ -1,11 +1,10 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import AdminIndexPage from './index.vue'
|
import AdminIndexPage from './index.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import VueApollo from 'vue-apollo'
|
import VueApollo from 'vue-apollo'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(VueApollo)
|
localVue.use(VueApollo)
|
||||||
|
|
||||||
describe('admin/index.vue', () => {
|
describe('admin/index.vue', () => {
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import Users from './users.vue'
|
import Users from './users.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('Users', () => {
|
describe('Users', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
@ -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 PostIndex from './index.vue'
|
||||||
import Vuex from 'vuex'
|
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 FilterMenu from '~/components/FilterMenu/FilterMenu'
|
||||||
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(VTooltip)
|
|
||||||
localVue.use(InfiniteScroll)
|
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
config.stubs['router-link'] = '<span><slot /></span>'
|
config.stubs['router-link'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -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 NotificationsPage from './index.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
import VTooltip from 'v-tooltip'
|
|
||||||
import DropdownFilter from '~/components/DropdownFilter/DropdownFilter'
|
import DropdownFilter from '~/components/DropdownFilter/DropdownFilter'
|
||||||
import NotificationsTable from '~/components/NotificationsTable/NotificationsTable'
|
import NotificationsTable from '~/components/NotificationsTable/NotificationsTable'
|
||||||
import Paginate from '~/components/Paginate/Paginate'
|
import Paginate from '~/components/Paginate/Paginate'
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(VTooltip)
|
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|||||||
@ -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 PostSlug from './index.vue'
|
||||||
import Vuex from 'vuex'
|
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(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|||||||
@ -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 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)
|
localVue.filter('date', d => d)
|
||||||
|
|
||||||
config.stubs['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -1,12 +1,8 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import index from './index.vue'
|
import index from './index.vue'
|
||||||
import Vuex from 'vuex'
|
import Vuex from 'vuex'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('index.vue', () => {
|
describe('index.vue', () => {
|
||||||
let store
|
let store
|
||||||
|
|||||||
@ -1,10 +1,7 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import EnterNoncePage from './enter-nonce.vue'
|
import EnterNoncePage from './enter-nonce.vue'
|
||||||
import Styleguide from '@human-connection/styleguide'
|
|
||||||
|
|
||||||
const localVue = createLocalVue()
|
const localVue = global.localVue
|
||||||
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
|
|
||||||
describe('EnterNoncePage', () => {
|
describe('EnterNoncePage', () => {
|
||||||
let mocks
|
let mocks
|
||||||
|
|||||||
@ -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 EmailSettingsIndexPage from './index.vue'
|
||||||
import Vuex from 'vuex'
|
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'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
|
|
||||||
|
|||||||
@ -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 EmailVerifyPage from './verify.vue'
|
||||||
import Vuex from 'vuex'
|
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['client-only'] = '<span><slot /></span>'
|
config.stubs['client-only'] = '<span><slot /></span>'
|
||||||
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
config.stubs['sweetalert-icon'] = '<span><slot /></span>'
|
||||||
|
|||||||
@ -1,15 +1,9 @@
|
|||||||
import { mount, createLocalVue } from '@vue/test-utils'
|
import { mount } from '@vue/test-utils'
|
||||||
import flushPromises from 'flush-promises'
|
import flushPromises from 'flush-promises'
|
||||||
import MySocialMedia from './my-social-media.vue'
|
import MySocialMedia from './my-social-media.vue'
|
||||||
import Vuex from 'vuex'
|
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(Vuex)
|
|
||||||
localVue.use(Styleguide)
|
|
||||||
localVue.use(Filters)
|
|
||||||
|
|
||||||
describe('my-social-media.vue', () => {
|
describe('my-social-media.vue', () => {
|
||||||
let wrapper
|
let wrapper
|
||||||
|
|||||||
16
webapp/testSetup.js
Normal file
16
webapp/testSetup.js
Normal file
@ -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)
|
||||||
@ -867,7 +867,7 @@
|
|||||||
dependencies:
|
dependencies:
|
||||||
regenerator-runtime "^0.13.2"
|
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"
|
version "7.7.0"
|
||||||
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0"
|
resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.0.tgz#4fadc1b8e734d97f56de39c77de76f2562e597d0"
|
||||||
integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==
|
integrity sha512-OKcwSYOW1mhWbnTBgQY5lvg1Fxg+VyfQGjcBduZFljfc044J5iDlnDSfhQ867O17XHiSCxYHUxHg2b7ryitbUQ==
|
||||||
@ -4562,6 +4562,13 @@ babel-plugin-transform-remove-undefined@^0.5.0:
|
|||||||
dependencies:
|
dependencies:
|
||||||
babel-helper-evaluate-path "^0.5.0"
|
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:
|
babel-plugin-transform-simplify-comparison-operators@^6.9.4:
|
||||||
version "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"
|
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"
|
version "1.14.1"
|
||||||
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
|
resolved "https://registry.yarnpkg.com/serve-static/-/serve-static-1.14.1.tgz#666e636dc4f010f7ef29970a88a674320898b2f9"
|
||||||
integrity sha512-JMrvUwE54emCYWlTI+hGrGv5I8dEwmco/00EvkzIIsR7MqrHonbD9pO2MOfFnpFntl7ecpZs+3mW+XbQZu9QCg==
|
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:
|
server-destroy@^1.0.1:
|
||||||
version "1.0.1"
|
version "1.0.1"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user