#6919 syncData #941

Merged
jorgep merged 95 commits from 6919-syncData into dev 2025-02-06 09:39:49 +00:00
2 changed files with 5 additions and 9 deletions
Showing only changes of commit d5373ecbd6 - Show all commits

View File

@ -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();

View File

@ -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);
});
});
});