From 5a1eda272b5ed8e3c30d61044a65d3c146ef52b3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Wed, 16 Jun 2021 08:06:56 +0200 Subject: [PATCH] Test frontend, little try --- webapp/pages/admin/donations.spec.js | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/webapp/pages/admin/donations.spec.js b/webapp/pages/admin/donations.spec.js index c80093d64..df4a9ba4b 100644 --- a/webapp/pages/admin/donations.spec.js +++ b/webapp/pages/admin/donations.spec.js @@ -12,7 +12,7 @@ describe('donations.vue', () => { $t: jest.fn((string) => string), $apollo: { // queries: { - // Donations: { + // Donations: { // refetch: jest.fn(), // // fetchMore: jest.fn().mockResolvedValue([ // // { @@ -23,14 +23,14 @@ describe('donations.vue', () => { // // }, // // }, // // ]), - // }, + // }, // }, - query: jest.fn().mockResolvedValue({ - data: { - Donations: 1, - }, - }), - mutate: jest.fn(), + // query: jest.fn().mockResolvedValue({ + // data: { + // Donations: 1, + // }, + // }), + // mutate: jest.fn(), }, } }) @@ -78,8 +78,10 @@ describe('donations.vue', () => { }) describe('apollo', () => { - it.only('query is called', () => { - expect(mocks.$apollo.queries.Donations.refetch).toHaveBeenCalledTimes(1) + it.skip('query is called', () => { + // expect(mocks.$apollo.queries.Donations.refetch).toHaveBeenCalledTimes(1) + // expect(mocks.$apollo.Donations.query().exists()).toBeTruthy() + console.log('mocks.$apollo: ', mocks.$apollo) }) it.skip('query result is displayed', () => {