Withdrew change that destroyed the gdd transaction list. Changed the Gdtinputs to Int instead of Number, Changed the test description to the reviewed fixes.

This commit is contained in:
Hannes Heine 2021-08-16 12:30:35 +02:00
parent 07cac1ec64
commit a1697f1b79
3 changed files with 12 additions and 16 deletions

View File

@ -1,14 +1,14 @@
import { ArgsType, Field } from 'type-graphql' import { ArgsType, Field, Int } from 'type-graphql'
@ArgsType() @ArgsType()
export class GdtTransactionInput { export class GdtTransactionInput {
@Field(() => String) @Field(() => String)
email: string email: string
@Field(() => Number, { nullable: true }) @Field(() => Int, { nullable: true })
currentPage?: number currentPage?: number
@Field(() => Number, { nullable: true }) @Field(() => Int, { nullable: true })
pageSize?: number pageSize?: number
@Field(() => String, { nullable: true }) @Field(() => String, { nullable: true })

View File

@ -1,9 +1,9 @@
<template> <template>
<div class="gdd-transaction-list"> <div class="gdd-transaction-list">
<b-list-group> <div class="list-group">
<b-list-group-item <div
v-for="{ decay, transactionId, type, date, balance, name, memo } in transactions" v-for="{ decay, transaction_id, type, date, balance, name, memo } in transactions"
:key="transactionId" :key="transaction_id"
:style="type === 'decay' ? 'background-color:#f1e0ae3d' : ''" :style="type === 'decay' ? 'background-color:#f1e0ae3d' : ''"
> >
<div class="list-group-item gdd-transaction-list-item" v-b-toggle="'a' + date + ''"> <div class="list-group-item gdd-transaction-list-item" v-b-toggle="'a' + date + ''">
@ -70,7 +70,7 @@
<!-- Collaps End --> <!-- Collaps End -->
</div> </div>
</b-list-group-item> </div>
<pagination-buttons <pagination-buttons
v-if="showPagination && transactionCount > pageSize" v-if="showPagination && transactionCount > pageSize"
:has-next="hasNext" :has-next="hasNext"
@ -83,7 +83,7 @@
<div v-if="transactions.length === 0" class="mt-4 text-center"> <div v-if="transactions.length === 0" class="mt-4 text-center">
<span>{{ $t('transaction.nullTransactions') }}</span> <span>{{ $t('transaction.nullTransactions') }}</span>
</div> </div>
</b-list-group> </div>
</div> </div>
</template> </template>

View File

@ -63,10 +63,6 @@ describe('UserCard_FormUserMail', () => {
await flushPromises() await flushPromises()
}) })
it('enter email in input field', () => {
expect(wrapper.find('input').element.value).toBe('test@example.org')
})
describe('error API send', () => { describe('error API send', () => {
beforeEach(async () => { beforeEach(async () => {
mockAPIcall.mockRejectedValue({ mockAPIcall.mockRejectedValue({
@ -76,7 +72,7 @@ describe('UserCard_FormUserMail', () => {
await flushPromises() await flushPromises()
}) })
it('send request with filled variables to the API', async () => { it('sends request with filled variables to the API', async () => {
expect(mockAPIcall).toHaveBeenCalledWith( expect(mockAPIcall).toHaveBeenCalledWith(
expect.objectContaining({ expect.objectContaining({
variables: { variables: {
@ -106,7 +102,7 @@ describe('UserCard_FormUserMail', () => {
await flushPromises() await flushPromises()
}) })
it('send request with filled variables to the API', async () => { it('sends request with filled variables to the API', async () => {
expect(mockAPIcall).toHaveBeenCalledWith( expect(mockAPIcall).toHaveBeenCalledWith(
expect.objectContaining({ expect.objectContaining({
variables: { variables: {
@ -118,7 +114,7 @@ describe('UserCard_FormUserMail', () => {
) )
}) })
it('successful message is send to the window.alert', async () => { it('sends a success message', async () => {
expect(window.alert).toBeCalledWith('changePassword success') expect(window.alert).toBeCalledWith('changePassword success')
}) })
}) })