0
0
Fork 0

test(claim_photo): init front test

This commit is contained in:
Alex Moreno 2023-02-20 15:13:53 +01:00
parent ed2aedd9d4
commit a303692454
1 changed files with 30 additions and 0 deletions

View File

@ -0,0 +1,30 @@
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
import { ref } from 'vue';
import { createWrapper, axios } from 'app/test/vitest/helper';
import ClaimPhoto from 'pages/Claim/Card/ClaimPhoto.vue';
describe('ClaimPhoto', () => {
let vm;
beforeAll(() => {
vm = createWrapper(ClaimPhoto).vm;
});
afterEach(() => {
//vi.clearAllMocks();
});
describe('viewDeleteDms()', () => {
it('should call quasar dialog', async () => {
console.log(vm.quasar);
vi.spyOn(axios, 'get').mockResolvedValue();
vi.spyOn(axios, 'post').mockResolvedValue();
vi.spyOn(vm.quasar, 'notify');
// await vm.viewDeleteDms();
// expect(vm.quasar.notify).toHaveBeenCalledWith(
// expect.objectContaining({ type: 'positive' })
// );
});
});
});