From 76968fe6bd27a984687ae816656a4a6fdd6ad177 Mon Sep 17 00:00:00 2001 From: provira Date: Wed, 15 Jan 2025 09:01:37 +0100 Subject: [PATCH] fix: refs #7087 fixed some tests --- src/components/ui/__tests__/CardSummary.spec.js | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/ui/__tests__/CardSummary.spec.js b/src/components/ui/__tests__/CardSummary.spec.js index b114797ef..411ebf9bb 100644 --- a/src/components/ui/__tests__/CardSummary.spec.js +++ b/src/components/ui/__tests__/CardSummary.spec.js @@ -62,12 +62,14 @@ describe('CardSummary', () => { }); it('should respond to prop changes and refetch data', async () => { + const newUrl = 'CardSummary/35'; + const newKey = 'cardSummaryKey/35'; const fetchSpy = vi.spyOn(vm.arrayData, 'fetch'); - await wrapper.setProps({ url: 'newUrl', filter: { key: 'newValue' } }); + await wrapper.setProps({ url: newUrl, filter: { key: newKey } }); expect(fetchSpy).toHaveBeenCalled(); - expect(vm.store.url).toBe('newUrl'); - expect(vm.store.filter).toEqual({ key: 'newValue' }); + expect(vm.store.url).toBe(newUrl); + expect(vm.store.filter).toEqual({ key: newKey }); }); it('should return true if route path ends with /summary' , () => {