mirror of
https://github.com/IT4Change/gradido.git
synced 2025-12-13 07:45:54 +00:00
yarn test fixed
This commit is contained in:
parent
b86431fa40
commit
a8de79c0c6
@ -15,7 +15,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
decayDuration: 0,
|
||||
memo: 'Testing',
|
||||
transactionId: 1,
|
||||
name: 'Bibi',
|
||||
name: 'Gradido Akademie',
|
||||
email: 'bibi@bloxberg.de',
|
||||
date: new Date(),
|
||||
decay: {
|
||||
@ -34,7 +34,7 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
decayDuration: 0,
|
||||
memo: 'Testing 2',
|
||||
transactionId: 2,
|
||||
name: 'Bibi',
|
||||
name: 'Gradido Akademie',
|
||||
email: 'bibi@bloxberg.de',
|
||||
date: new Date(),
|
||||
decay: {
|
||||
@ -53,6 +53,16 @@ const apolloQueryMock = jest.fn().mockResolvedValue({
|
||||
const toastedErrorMock = jest.fn()
|
||||
|
||||
const mocks = {
|
||||
$moment: jest.fn(() => {
|
||||
return {
|
||||
format: jest.fn((m) => m),
|
||||
subtract: jest.fn(() => {
|
||||
return {
|
||||
format: jest.fn((m) => m),
|
||||
}
|
||||
}),
|
||||
}
|
||||
}),
|
||||
$t: jest.fn((t) => t),
|
||||
$apollo: {
|
||||
query: apolloQueryMock,
|
||||
@ -64,6 +74,7 @@ const mocks = {
|
||||
|
||||
const propsData = {
|
||||
userId: 1,
|
||||
fields: ['date', 'balance', 'name', 'memo', 'decay'],
|
||||
}
|
||||
|
||||
describe('CreationTransactionListFormular', () => {
|
||||
@ -92,7 +103,9 @@ describe('CreationTransactionListFormular', () => {
|
||||
)
|
||||
})
|
||||
|
||||
it('has two values for the transaction', () => {
|
||||
it('has two values for the transaction', async () => {
|
||||
await wrapper.vm.$nextTick()
|
||||
console.log(wrapper.html())
|
||||
expect(wrapper.find('tbody').findAll('tr').length).toBe(2)
|
||||
})
|
||||
|
||||
|
||||
@ -53,7 +53,9 @@ export default {
|
||||
},
|
||||
})
|
||||
.then((result) => {
|
||||
console.log(result)
|
||||
this.items = result.data.transactionList.transactions.filter((t) => t.type === 'creation')
|
||||
console.log( this.items)
|
||||
})
|
||||
.catch((error) => {
|
||||
this.$toasted.error(error.message)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user