From 5d9cc6ae24a8d3a583d4c4509c81a071986e461d Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Fri, 14 Jan 2022 13:18:34 +0100 Subject: [PATCH] get the tests working again --- admin/src/pages/Creation.spec.js | 35 ++++++++++++++++-------------- admin/src/pages/UserSearch.spec.js | 21 ++++++++++-------- 2 files changed, 31 insertions(+), 25 deletions(-) diff --git a/admin/src/pages/Creation.spec.js b/admin/src/pages/Creation.spec.js index fc8cdbaf0..9feffda45 100644 --- a/admin/src/pages/Creation.spec.js +++ b/admin/src/pages/Creation.spec.js @@ -6,22 +6,25 @@ const localVue = global.localVue const apolloQueryMock = jest.fn().mockResolvedValue({ data: { - searchUsers: [ - { - userId: 1, - firstName: 'Bibi', - lastName: 'Bloxberg', - email: 'bibi@bloxberg.de', - creation: [200, 400, 600], - }, - { - userId: 2, - firstName: 'Benjamin', - lastName: 'Blümchen', - email: 'benjamin@bluemchen.de', - creation: [800, 600, 400], - }, - ], + searchUsers: { + userCount: 2, + userList: [ + { + userId: 1, + firstName: 'Bibi', + lastName: 'Bloxberg', + email: 'bibi@bloxberg.de', + creation: [200, 400, 600], + }, + { + userId: 2, + firstName: 'Benjamin', + lastName: 'Blümchen', + email: 'benjamin@bluemchen.de', + creation: [800, 600, 400], + }, + ], + }, }, }) diff --git a/admin/src/pages/UserSearch.spec.js b/admin/src/pages/UserSearch.spec.js index b6d01b254..4beda0c49 100644 --- a/admin/src/pages/UserSearch.spec.js +++ b/admin/src/pages/UserSearch.spec.js @@ -5,15 +5,18 @@ const localVue = global.localVue const apolloQueryMock = jest.fn().mockResolvedValue({ data: { - searchUsers: [ - { - firstName: 'Bibi', - lastName: 'Bloxberg', - email: 'bibi@bloxberg.de', - creation: [200, 400, 600], - emailChecked: false, - }, - ], + searchUsers: { + userCount: 1, + userList: [ + { + firstName: 'Bibi', + lastName: 'Bloxberg', + email: 'bibi@bloxberg.de', + creation: [200, 400, 600], + emailChecked: false, + }, + ], + }, }, })