2023-02-20 14:13:53 +00:00
|
|
|
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;
|
2023-02-20 14:15:20 +00:00
|
|
|
|
|
|
|
//setup: () => { claimDms: ref([])
|
2023-02-20 14:13:53 +00:00
|
|
|
});
|
|
|
|
|
|
|
|
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' })
|
|
|
|
// );
|
|
|
|
});
|
|
|
|
});
|
|
|
|
});
|