yarn test fixed, resolve date error with substring, add selected 'send' on submit test

This commit is contained in:
ogerly 2022-03-09 08:51:07 +01:00
parent 8545ca1790
commit a2550cae6a
2 changed files with 20 additions and 19 deletions

View File

@ -225,6 +225,7 @@ describe('GddSend', () => {
email: 'someone@watches.tv', email: 'someone@watches.tv',
amount: 87.23, amount: 87.23,
memo: 'Long enough', memo: 'Long enough',
selected: 'send',
}, },
], ],
]) ])

View File

@ -95,13 +95,13 @@ describe('GddTransactionList', () => {
typeId: 'DECAY', typeId: 'DECAY',
amount: '-0.16778637075575395772595', amount: '-0.16778637075575395772595',
balance: '31.59320453982945549519405', balance: '31.59320453982945549519405',
balanceDate: '2022-03-03T08:54:54.020Z', balanceDate: '2022-03-03T08:54:54',
memo: '', memo: '',
linkedUser: null, linkedUser: null,
decay: { decay: {
decay: '-0.16778637075575395772595', decay: '-0.16778637075575395772595',
start: '2022-02-28T13:55:47.000Z', start: '2022-02-28T13:55:47',
end: '2022-03-03T08:54:54.020Z', end: '2022-03-03T08:54:54',
duration: 241147.02, duration: 241147.02,
__typename: 'Decay', __typename: 'Decay',
}, },
@ -112,7 +112,7 @@ describe('GddTransactionList', () => {
typeId: 'SEND', typeId: 'SEND',
amount: '1', amount: '1',
balance: '31.76099091058520945292', balance: '31.76099091058520945292',
balanceDate: '2022-02-28T13:55:47.000Z', balanceDate: '2022-02-28T13:55:47',
memo: 'adasd adada', memo: 'adasd adada',
linkedUser: { linkedUser: {
firstName: 'Bibi', firstName: 'Bibi',
@ -121,8 +121,8 @@ describe('GddTransactionList', () => {
}, },
decay: { decay: {
decay: '-0.2038314055482643084', decay: '-0.2038314055482643084',
start: '2022-02-25T07:29:26.000Z', start: '2022-02-25T07:29:26',
end: '2022-02-28T13:55:47.000Z', end: '2022-02-28T13:55:47',
duration: 282381, duration: 282381,
__typename: 'Decay', __typename: 'Decay',
}, },
@ -133,7 +133,7 @@ describe('GddTransactionList', () => {
typeId: 'CREATION', typeId: 'CREATION',
amount: '1000', amount: '1000',
balance: '32.96482231613347376132', balance: '32.96482231613347376132',
balanceDate: '2022-02-25T07:29:26.000Z', balanceDate: '2022-02-25T07:29:26',
memo: 'asd adada dad', memo: 'asd adada dad',
linkedUser: { linkedUser: {
firstName: 'Gradido', firstName: 'Gradido',
@ -142,8 +142,8 @@ describe('GddTransactionList', () => {
}, },
decay: { decay: {
decay: '-0.03517768386652623868', decay: '-0.03517768386652623868',
start: '2022-02-23T10:55:30.000Z', start: '2022-02-23T10:55:30',
end: '2022-02-25T07:29:26.000Z', end: '2022-02-25T07:29:26',
duration: 160436, duration: 160436,
__typename: 'Decay', __typename: 'Decay',
}, },
@ -154,7 +154,7 @@ describe('GddTransactionList', () => {
typeId: 'RECEIVE', typeId: 'RECEIVE',
amount: '10', amount: '10',
balance: '10', balance: '10',
balanceDate: '2022-02-23T10:55:30.000Z', balanceDate: '2022-02-23T10:55:30',
memo: 'asd adaaad adad addad ', memo: 'asd adaaad adad addad ',
linkedUser: { linkedUser: {
firstName: 'Bibi', firstName: 'Bibi',
@ -263,9 +263,9 @@ describe('GddTransactionList', () => {
}) })
it('shows the date of the transaction', () => { it('shows the date of the transaction', () => {
expect(transaction.findAll('.gdd-transaction-list-item-date').at(0).text()).toContain( expect(
'Mon Feb 28 2022 13:55:47 GMT+0000 (Coordinated Universal Time)', transaction.findAll('.gdd-transaction-list-item-date').at(0).text().substr(0, 24),
) ).toContain('Mon Feb 28 2022 13:55:47')
}) })
it('shows the decay calculation', () => { it('shows the decay calculation', () => {
@ -327,9 +327,9 @@ describe('GddTransactionList', () => {
}) })
it('shows the date of the transaction', () => { it('shows the date of the transaction', () => {
expect(transaction.findAll('.gdd-transaction-list-item-date').at(0).text()).toContain( expect(
'Wed Feb 23 2022 10:55:30 GMT+0000 (Coordinated Universal Time)', transaction.findAll('.gdd-transaction-list-item-date').at(0).text().substr(0, 24),
) ).toContain('Wed Feb 23 2022 10:55:30')
}) })
}) })
@ -388,9 +388,9 @@ describe('GddTransactionList', () => {
}) })
it('shows the date of the transaction', () => { it('shows the date of the transaction', () => {
expect(transaction.findAll('.gdd-transaction-list-item-date').at(0).text()).toContain( expect(
'Wed Feb 23 2022 10:55:30 GMT+0000 (Coordinated Universal Time)', transaction.findAll('.gdd-transaction-list-item-date').at(0).text().substr(0, 24),
) ).toContain('Wed Feb 23 2022 10:55:30')
}) })
it('shows the decay calculation', () => { it('shows the decay calculation', () => {