feat: organize imports
This commit is contained in:
parent
5b0479e60c
commit
fcb2e3cc74
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import Leftmenu from 'components/LeftMenu.vue';
|
||||
|
||||
import { useNavigationStore } from 'src/stores/useNavigationStore';
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import VnChangePassword from 'src/components/common/VnChangePassword.vue';
|
||||
import { vi, beforeEach, afterEach, beforeAll, describe, expect, it } from 'vitest';
|
||||
import { Notify } from 'quasar';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import VnLog from 'src/components/common/VnLog.vue';
|
||||
|
||||
describe('VnLog', () => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import VnPaginate from 'src/components/ui/VnPaginate.vue';
|
||||
|
||||
describe('VnPaginate', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { describe, it, expect, beforeAll, vi } from 'vitest';
|
||||
import { axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import parsePhone from 'src/filters/parsePhone';
|
||||
|
||||
describe('parsePhone filter', () => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import VnSms from 'src/components/ui/VnSms.vue';
|
||||
|
||||
describe('VnSms', () => {
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterAll } from 'vitest';
|
||||
import { axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { downloadFile } from 'src/composables/downloadFile';
|
||||
import { useSession } from 'src/composables/useSession';
|
||||
const session = useSession();
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterAll } from 'vitest';
|
||||
import { axios, flushPromises } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
|
||||
import { flushPromises } from '@vue/test-utils';
|
||||
import { useAcl } from 'src/composables/useAcl';
|
||||
|
||||
describe('useAcl', () => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { describe, expect, it, beforeEach, afterEach, vi } from 'vitest';
|
||||
import { axios, flushPromises } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { flushPromises } from 'app/test/vitest/helper';
|
||||
import { useArrayData } from 'composables/useArrayData';
|
||||
import { useRouter } from 'vue-router';
|
||||
import * as vueRouter from 'vue-router';
|
||||
|
@ -25,8 +26,8 @@ describe('useArrayData', () => {
|
|||
arrayData.fetch({});
|
||||
|
||||
await flushPromises();
|
||||
const routerReplace = useRouter().replace.mock.calls[0][0];
|
||||
|
||||
let routerReplace = useRouter().replace;
|
||||
routerReplace = routerReplace.mock.calls[0][0];
|
||||
expect(axios.get.mock.calls[0][1].params).toEqual({
|
||||
filter,
|
||||
supplierFk: 2,
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it } from 'vitest';
|
||||
import { axios, flushPromises } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { flushPromises } from '@vue/test-utils';
|
||||
import { useRole } from 'composables/useRole';
|
||||
const role = useRole();
|
||||
|
||||
|
@ -31,10 +32,9 @@ describe('useRole', () => {
|
|||
lang: 'en',
|
||||
};
|
||||
const expectedRoles = ['salesPerson', 'admin'];
|
||||
vi.spyOn(axios, 'get')
|
||||
.mockResolvedValueOnce({
|
||||
vi.spyOn(axios, 'get').mockResolvedValueOnce({
|
||||
data: { roles: rolesData, user: fetchedUser },
|
||||
})
|
||||
});
|
||||
|
||||
vi.spyOn(role.state, 'setUser');
|
||||
vi.spyOn(role.state, 'setRoles');
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import { vi, describe, expect, it, beforeAll, beforeEach } from 'vitest';
|
||||
import { axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { useSession } from 'composables/useSession';
|
||||
import { useState } from 'composables/useState';
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it } from 'vitest';
|
||||
import { axios, flushPromises } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { flushPromises } from '@vue/test-utils';
|
||||
import { useTokenConfig } from 'composables/useTokenConfig';
|
||||
const tokenConfig = useTokenConfig();
|
||||
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import ClaimDescriptorMenu from 'pages/Claim/Card/ClaimDescriptorMenu.vue';
|
||||
|
||||
describe('ClaimDescriptorMenu', () => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, beforeEach, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import ClaimLines from '/src/pages/Claim/Card/ClaimLines.vue';
|
||||
|
||||
describe('ClaimLines', () => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, beforeEach, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import ClaimLinesImport from 'pages/Claim/Card/ClaimLinesImport.vue';
|
||||
|
||||
describe('ClaimLinesImport', () => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import CustomerPayments from 'src/pages/Customer/Payments/CustomerPayments.vue';
|
||||
|
||||
describe('CustomerPayments', () => {
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import TicketBoxing from 'pages/Ticket/Card/TicketBoxing.vue';
|
||||
|
||||
// #4836 - Investigate how to test q-drawer outside
|
||||
|
@ -21,7 +22,11 @@ describe('TicketBoxing', () => {
|
|||
min: 1,
|
||||
max: 2,
|
||||
};
|
||||
const videoList = ['2022-01-01T01-01-00.mp4', '2022-02-02T02-02-00.mp4', '2022-03-03T03-03-00.mp4'];
|
||||
const videoList = [
|
||||
'2022-01-01T01-01-00.mp4',
|
||||
'2022-02-02T02-02-00.mp4',
|
||||
'2022-03-03T03-03-00.mp4',
|
||||
];
|
||||
|
||||
vi.spyOn(axios, 'get').mockResolvedValue({ data: videoList });
|
||||
vi.spyOn(vm.quasar, 'notify');
|
||||
|
@ -44,7 +49,9 @@ describe('TicketBoxing', () => {
|
|||
|
||||
await vm.getVideoList(expeditionId, timed);
|
||||
|
||||
expect(vm.quasar.notify).toHaveBeenCalledWith(expect.objectContaining({ type: 'negative' }));
|
||||
expect(vm.quasar.notify).toHaveBeenCalledWith(
|
||||
expect.objectContaining({ type: 'negative' })
|
||||
);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach, beforeEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import TicketAdvance from 'pages/Ticket/TicketAdvance.vue';
|
||||
import { Notify } from 'quasar';
|
||||
import { nextTick } from 'vue';
|
||||
|
|
|
@ -1,5 +1,6 @@
|
|||
import { vi, describe, expect, it, beforeAll, afterEach } from 'vitest';
|
||||
import { createWrapper, axios } from 'app/test/vitest/helper';
|
||||
import axios from 'axios';
|
||||
import { createWrapper } from 'app/test/vitest/helper';
|
||||
import WagonCreate from 'pages/Wagon/WagonCreate.vue';
|
||||
|
||||
describe('WagonCreate', () => {
|
||||
|
|
Loading…
Reference in New Issue