mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
fix test
This commit is contained in:
parent
a1a12e68d1
commit
e31214b1e1
@ -20,6 +20,9 @@ describe('TransactionForm', () => {
|
|||||||
email: 'user@example.org',
|
email: 'user@example.org',
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
|
$route: {
|
||||||
|
params: {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
const propsData = {
|
const propsData = {
|
||||||
|
|||||||
@ -13,6 +13,9 @@ describe('InputAmount', () => {
|
|||||||
locale: jest.fn(() => 'en'),
|
locale: jest.fn(() => 'en'),
|
||||||
},
|
},
|
||||||
$n: jest.fn((n) => String(n)),
|
$n: jest.fn((n) => String(n)),
|
||||||
|
$route: {
|
||||||
|
params: {},
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('mount in a TransactionForm', () => {
|
describe('mount in a TransactionForm', () => {
|
||||||
|
|||||||
@ -14,8 +14,14 @@ describe('InputEmail', () => {
|
|||||||
value: '',
|
value: '',
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const mocks = {
|
||||||
|
$route: {
|
||||||
|
params: {},
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
const Wrapper = () => {
|
const Wrapper = () => {
|
||||||
return mount(InputEmail, { localVue, propsData })
|
return mount(InputEmail, { localVue, propsData, mocks })
|
||||||
}
|
}
|
||||||
|
|
||||||
describe('mount', () => {
|
describe('mount', () => {
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
import { mount, RouterLinkStub } from '@vue/test-utils'
|
import { mount, RouterLinkStub } from '@vue/test-utils'
|
||||||
import InfoStatistic from './InfoStatistic'
|
import InfoStatistic from './InfoStatistic'
|
||||||
import { toastErrorSpy } from '../../test/testSetup'
|
import { toastErrorSpy } from '../../test/testSetup'
|
||||||
import { listContributionLinks, communityStatistics, searchAdminUsers } from '@/graphql/queries'
|
import { listContributionLinks, searchAdminUsers } from '@/graphql/queries'
|
||||||
|
|
||||||
const localVue = global.localVue
|
const localVue = global.localVue
|
||||||
|
|
||||||
@ -47,15 +47,15 @@ const apolloQueryMock = jest
|
|||||||
})
|
})
|
||||||
.mockResolvedValueOnce({
|
.mockResolvedValueOnce({
|
||||||
data: {
|
data: {
|
||||||
communityStatistics: {
|
// communityStatistics: {
|
||||||
totalUsers: 3113,
|
// // totalUsers: 3113,
|
||||||
// activeUsers: 1057,
|
// // activeUsers: 1057,
|
||||||
// deletedUsers: 35,
|
// // deletedUsers: 35,
|
||||||
totalGradidoCreated: '4083774.05000000000000000000',
|
// // totalGradidoCreated: '4083774.05000000000000000000',
|
||||||
totalGradidoDecayed: '-1062639.13634129622923372197',
|
// // totalGradidoDecayed: '-1062639.13634129622923372197',
|
||||||
totalGradidoAvailable: '2513565.869444365732411569',
|
// // totalGradidoAvailable: '2513565.869444365732411569',
|
||||||
// totalGradidoUnbookedDecayed: '-500474.6738366222166261272',
|
// // totalGradidoUnbookedDecayed: '-500474.6738366222166261272',
|
||||||
},
|
// },
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
.mockResolvedValue('default')
|
.mockResolvedValue('default')
|
||||||
|
|||||||
@ -15,7 +15,7 @@ import VueMoment from 'vue-moment'
|
|||||||
// import clickOutside from '@/directives/click-ouside.js'
|
// import clickOutside from '@/directives/click-ouside.js'
|
||||||
import { focus } from 'vue-focus'
|
import { focus } from 'vue-focus'
|
||||||
|
|
||||||
import { loadAllRules } from '../src/validation-rules'
|
import { loadAllRules } from '@/validation-rules'
|
||||||
|
|
||||||
import { loadFilters } from '@/filters/amount'
|
import { loadFilters } from '@/filters/amount'
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user