From be048be032dff9a3792a19c43f0d5c8dfb4cf62c Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Tue, 28 Feb 2023 19:53:35 +0100 Subject: [PATCH] fix(backend): possible flaky test --- backend/src/graphql/resolver/ContributionResolver.test.ts | 8 ++++---- backend/src/graphql/resolver/util/findContributions.ts | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/backend/src/graphql/resolver/ContributionResolver.test.ts b/backend/src/graphql/resolver/ContributionResolver.test.ts index a8e36258c..4f574daa9 100644 --- a/backend/src/graphql/resolver/ContributionResolver.test.ts +++ b/backend/src/graphql/resolver/ContributionResolver.test.ts @@ -2888,11 +2888,11 @@ describe('ContributionResolver', () => { state: 'PENDING', }), expect.objectContaining({ - amount: '200', - firstName: 'Bibi', + amount: '100', + firstName: 'Peter', id: expect.any(Number), - lastName: 'Bloxberg', - memo: 'Aktives Grundeinkommen', + lastName: 'Lustig', + memo: 'Test env contribution', messagesCount: 0, state: 'PENDING', }), diff --git a/backend/src/graphql/resolver/util/findContributions.ts b/backend/src/graphql/resolver/util/findContributions.ts index 0dc70cf30..84768d399 100644 --- a/backend/src/graphql/resolver/util/findContributions.ts +++ b/backend/src/graphql/resolver/util/findContributions.ts @@ -17,6 +17,7 @@ export const findContributions = async ( withDeleted: withDeleted, order: { createdAt: order, + id: order, }, relations: ['user'], skip: (currentPage - 1) * pageSize,