diff --git a/src/components/__tests__/FormModel.spec.js b/src/components/__tests__/FormModel.spec.js index e35684bc3..17812f146 100644 --- a/src/components/__tests__/FormModel.spec.js +++ b/src/components/__tests__/FormModel.spec.js @@ -93,7 +93,7 @@ describe('FormModel', () => { it('should call axios.patch with the right data', async () => { const spy = vi.spyOn(axios, 'patch').mockResolvedValue({ data: {} }); - const { vm } = mount({ propsData: { url, model, formInitialData } }); + const { vm } = mount({ propsData: { url, model } }); vm.formData.mockKey = 'newVal'; await vm.$nextTick(); await vm.save(); @@ -106,6 +106,7 @@ describe('FormModel', () => { const { vm } = mount({ propsData: { url, model, formInitialData, urlCreate: 'mockUrlCreate' }, }); + await vm.$nextTick(); vm.formData.mockKey = 'newVal'; await vm.$nextTick(); await vm.save(); @@ -119,7 +120,7 @@ describe('FormModel', () => { }); const spyPatch = vi.spyOn(axios, 'patch').mockResolvedValue({ data: {} }); const spySaveFn = vi.spyOn(vm.$props, 'saveFn'); - + await vm.$nextTick(); vm.formData.mockKey = 'newVal'; await vm.$nextTick(); await vm.save(); diff --git a/src/components/ui/__tests__/CardSummary.spec.js b/src/components/ui/__tests__/CardSummary.spec.js index 411ebf9bb..89c2a4482 100644 --- a/src/components/ui/__tests__/CardSummary.spec.js +++ b/src/components/ui/__tests__/CardSummary.spec.js @@ -56,11 +56,6 @@ describe('CardSummary', () => { expect(vm.entity).toEqual({ id: 1, name: 'Entity 1' }); }); - it('should handle empty data gracefully', () => { - vm.store.data = []; - expect(vm.entity).toBeUndefined(); - }); - it('should respond to prop changes and refetch data', async () => { const newUrl = 'CardSummary/35'; const newKey = 'cardSummaryKey/35'; @@ -72,7 +67,7 @@ describe('CardSummary', () => { expect(vm.store.filter).toEqual({ key: newKey }); }); - it('should return true if route path ends with /summary' , () => { + it('should return true if route path ends with /summary', () => { expect(vm.isSummary).toBe(true); }); -}); \ No newline at end of file +});