fix tests to use enum definitions

This commit is contained in:
Ulf Gebhardt 2021-10-02 19:15:57 +02:00
parent 78442409a8
commit 4aa5316110
No known key found for this signature in database
GPG Key ID: 81308EFE29ABFEBD
2 changed files with 10 additions and 9 deletions

View File

@ -32,8 +32,8 @@ describe('TransactionCollapse', () => {
expect(wrapper.find('div.gdt-transaction-collapse').exists()).toBeTruthy()
})
it('checks the prop gdtEntryType ', () => {
expect(wrapper.props().gdtEntryType).toBe(1)
it('checks the prop gdtEntryType', () => {
expect(wrapper.props().gdtEntryType).toBe('FORM')
})
it('renders the component collapse-header', () => {
@ -78,7 +78,7 @@ describe('TransactionCollapse', () => {
})
it('checks the prop gdtEntryType', () => {
expect(wrapper.props().gdtEntryType).toBe(7)
expect(wrapper.props().gdtEntryType).toBe('GLOBAL_MODIFICATOR')
})
it('renders the component collapse-header', () => {
@ -122,8 +122,8 @@ describe('TransactionCollapse', () => {
expect(wrapper.find('div.gdt-transaction-collapse').exists()).toBeTruthy()
})
it('checks the prop gdtEntryType ', () => {
expect(wrapper.props().gdtEntryType).toBe(4)
it('checks the prop gdtEntryType', () => {
expect(wrapper.props().gdtEntryType).toBe('ELOPAGE_PUBLISHER')
})
it('renders the component collapse-header', () => {

View File

@ -1,4 +1,5 @@
import { mount } from '@vue/test-utils'
import { GdtEntryType } from '../../../graphql/enums'
import GdtTransactionList from './GdtTransactionList'
const localVue = global.localVue
@ -14,7 +15,7 @@ const apolloMock = jest.fn().mockResolvedValue({
factor: 17,
comment: '',
date: '2021-05-02T17:20:11+00:00',
gdtEntryType: 1,
gdtEntryType: GdtEntryType.FORM,
},
{
amount: 1810,
@ -22,7 +23,7 @@ const apolloMock = jest.fn().mockResolvedValue({
factor: 0.2,
comment: 'Dezember 20',
date: '2020-12-31T12:00:00+00:00',
gdtEntryType: 7,
gdtEntryType: GdtEntryType.GLOBAL_MODIFICATOR,
},
{
amount: 100,
@ -30,7 +31,7 @@ const apolloMock = jest.fn().mockResolvedValue({
factor: 17,
comment: '',
date: '2020-05-07T17:00:00+00:00',
gdtEntryType: 1,
gdtEntryType: GdtEntryType.FORM,
},
{
amount: 100,
@ -38,7 +39,7 @@ const apolloMock = jest.fn().mockResolvedValue({
factor: 22,
comment: '',
date: '2020-04-10T13:28:00+00:00',
gdtEntryType: 4,
gdtEntryType: GdtEntryType.ELOPAGE_PUBLISHER,
},
],
},