From 5763692725bd528f5f6bccbe56f734023720b7d0 Mon Sep 17 00:00:00 2001 From: Moriz Wahl Date: Mon, 9 Aug 2021 19:57:19 +0200 Subject: [PATCH] test update balance --- frontend/src/views/Layout/DashboardLayout_gdd.spec.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/frontend/src/views/Layout/DashboardLayout_gdd.spec.js b/frontend/src/views/Layout/DashboardLayout_gdd.spec.js index cfed75cbd..4f47785dc 100644 --- a/frontend/src/views/Layout/DashboardLayout_gdd.spec.js +++ b/frontend/src/views/Layout/DashboardLayout_gdd.spec.js @@ -151,6 +151,16 @@ describe('DashboardLayoutGdd', () => { expect(routerPushMock).toBeCalledWith('/login') }) }) + + describe('update balance', () => { + it('updates the amount correctelly', async () => { + await wrapper.setData({ balance: 0 }) + console.log(wrapper.html()) + await wrapper.findComponent({ name: 'RouterView' }).vm.$emit('update-balance', 5) + await flushPromises() + expect(wrapper.vm.balance).toBe(5) + }) + }) }) }) })