mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
add test for CommunityStatistic.vue
This commit is contained in:
parent
f15d085450
commit
b124921d33
38
admin/src/components/CommunityStatistic.spec.js
Normal file
38
admin/src/components/CommunityStatistic.spec.js
Normal file
@ -0,0 +1,38 @@
|
||||
import { mount } from '@vue/test-utils'
|
||||
import CommunityStatistic from './CommunityStatistic'
|
||||
|
||||
const localVue = global.localVue
|
||||
|
||||
const mocks = {
|
||||
$t: jest.fn((t) => t),
|
||||
}
|
||||
|
||||
const propsData = {
|
||||
value: {
|
||||
totalUsers: '123',
|
||||
activeUsers: '100',
|
||||
deletedUsers: '5',
|
||||
totalGradidoCreated: '2500',
|
||||
totalGradidoDecayed: '200',
|
||||
totalGradidoAvailable: '500',
|
||||
totalGradidoUnbookedDecayed: '111',
|
||||
},
|
||||
}
|
||||
|
||||
describe('CommunityStatistic', () => {
|
||||
let wrapper
|
||||
|
||||
const Wrapper = () => {
|
||||
return mount(CommunityStatistic, { localVue, mocks, propsData })
|
||||
}
|
||||
|
||||
describe('mount', () => {
|
||||
beforeEach(() => {
|
||||
wrapper = Wrapper()
|
||||
})
|
||||
|
||||
it('renders the Div Element ".community-statistic"', () => {
|
||||
expect(wrapper.find('div.community-statistic').exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
})
|
||||
Loading…
x
Reference in New Issue
Block a user