fix(refactor): add services/adapters/useCases
This commit is contained in:
@@ -12,5 +12,3 @@ describe("tests AppPageHeader component", () => {
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ describe("tests VTabulator component", () => {
|
||||
|
||||
vi.mock('tabulator-tables', () => {
|
||||
|
||||
const Tabulator = vi.fn(() => {
|
||||
const tabulator = vi.fn(() => {
|
||||
return {
|
||||
getHtml: () => {
|
||||
return '<div>test</div>'
|
||||
@@ -17,7 +17,7 @@ describe("tests VTabulator component", () => {
|
||||
|
||||
return {
|
||||
__esModule: true,
|
||||
TabulatorFull: Tabulator
|
||||
TabulatorFull: tabulator
|
||||
}
|
||||
})
|
||||
|
||||
|
||||
@@ -17,6 +17,13 @@ describe("tests SitesManagerPage component mounted with vuex", () => {
|
||||
},
|
||||
})
|
||||
|
||||
vi.mock('tabulator-tables', () => {
|
||||
const mockTabulator = vi.fn().mockImplementation(() => ({
|
||||
// Mock implementation details
|
||||
}));
|
||||
return { TabulatorFull: mockTabulator }; // Adjust based on what you're trying to mock
|
||||
});
|
||||
|
||||
beforeEach(async () => {
|
||||
store.dispatch('users/resetStore')
|
||||
store.dispatch('services/resetStore')
|
||||
@@ -47,12 +54,13 @@ describe("tests SitesManagerPage component mounted with vuex", () => {
|
||||
|
||||
test('test UsersManager mounted with vuex', async () => {
|
||||
const wrapper = mount(UsersManager, {
|
||||
shallow: true,
|
||||
global: {
|
||||
plugins: [store]
|
||||
}
|
||||
})
|
||||
|
||||
console.log(wrapper.html())
|
||||
|
||||
const componentState = wrapper.vm.componentState
|
||||
const gridCols = wrapper.vm.gridCols
|
||||
expect(componentState).toBe('view')
|
||||
|
||||
@@ -8,7 +8,8 @@ import axios from "axios";
|
||||
|
||||
vi.mock('axios')
|
||||
|
||||
describe("tests SitesManagerPage component mounted with vuex", () => {
|
||||
|
||||
describe("tests App mounted with vuex", () => {
|
||||
const store = createStore({
|
||||
plugins: [],
|
||||
modules: {
|
||||
@@ -17,6 +18,8 @@ describe("tests SitesManagerPage component mounted with vuex", () => {
|
||||
},
|
||||
})
|
||||
|
||||
|
||||
|
||||
const mockData = [
|
||||
{
|
||||
"id": 1,
|
||||
@@ -32,7 +35,6 @@ describe("tests SitesManagerPage component mounted with vuex", () => {
|
||||
data: mockData,
|
||||
})
|
||||
|
||||
|
||||
test('tests App mounted with vuex', async () => {
|
||||
const wrapper = mount(Sites, {
|
||||
shallow: true,
|
||||
|
||||
Reference in New Issue
Block a user