forked from verdnatura/salix-front
test(claim_photo): init front test
This commit is contained in:
parent
ed2aedd9d4
commit
a303692454
|
@ -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' })
|
||||||
|
// );
|
||||||
|
});
|
||||||
|
});
|
||||||
|
});
|
Loading…
Reference in New Issue