adapt unit test for community page to design changes

This commit is contained in:
mahula 2022-12-07 05:46:29 +01:00
parent 1a81bc53cb
commit cb66b51887

View File

@ -4,12 +4,32 @@ import { toastErrorSpy, toastSuccessSpy } from '@test/testSetup'
import { createContribution, updateContribution, deleteContribution } from '@/graphql/mutations'
import { listContributions, listAllContributions, verifyLogin } from '@/graphql/queries'
import VueRouter from 'vue-router'
import routes from '../routes/routes'
const localVue = global.localVue
localVue.use(VueRouter)
const mockStoreDispach = jest.fn()
const apolloQueryMock = jest.fn()
const apolloMutationMock = jest.fn()
const router = new VueRouter({
base: '/',
routes,
linkActiveClass: 'active',
mode: 'history',
// scrollBehavior: (to, from, savedPosition) => {
// if (savedPosition) {
// return savedPosition
// }
// if (to.hash) {
// return { selector: to.hash }
// }
// return { x: 0, y: 0 }
// },
})
describe('Community', () => {
let wrapper
@ -34,6 +54,7 @@ describe('Community', () => {
const Wrapper = () => {
return mount(Community, {
localVue,
router,
mocks,
})
}