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' , () => {