From 7875df4b023b1a55470d31960ed69718b8cf150f Mon Sep 17 00:00:00 2001 From: jcasado Date: Thu, 25 Apr 2024 14:03:00 +0200 Subject: [PATCH] refs #6697 fix tfront --- .../pages/Claims/ClaimLinesImport.spec.js | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js b/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js index 085118b14..d93c96132 100644 --- a/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js +++ b/test/vitest/__tests__/pages/Claims/ClaimLinesImport.spec.js @@ -5,7 +5,6 @@ import ClaimLinesImport from 'pages/Claim/Card/ClaimLinesImport.vue'; describe('ClaimLinesImport', () => { let vm; - beforeAll(() => { vm = createWrapper(ClaimLinesImport, { global: { @@ -13,7 +12,7 @@ describe('ClaimLinesImport', () => { mocks: { fetch: vi.fn(), }, - } + }, }).vm; }); @@ -26,25 +25,23 @@ describe('ClaimLinesImport', () => { vi.spyOn(axios, 'post').mockResolvedValue({ data: true }); vi.spyOn(vm.quasar, 'notify'); - vm.selected = [ - { id: 1, saleFk: 1, claimFk: 1, quantity: 10 } - ] + vm.selected = [{ id: 1, saleFk: 1, claimFk: 1 }]; - vm.route.params.id = 1 + vm.route.params.id = 1; await vm.importLines(); - const expectedData = [{ saleFk: 1, claimFk: 1, quantity: 10 }] + const expectedData = [{ saleFk: 1, claimFk: 1 }]; expect(axios.post).toHaveBeenCalledWith('ClaimBeginnings', expectedData, { - signal: expect.any(Object) - }) + signal: expect.any(Object), + }); expect(vm.quasar.notify).toHaveBeenCalledWith( expect.objectContaining({ message: 'Lines added to claim', - type: 'positive' + type: 'positive', }) ); - expect(vm.canceller).toEqual(null) + expect(vm.canceller).toEqual(null); }); }); });