Initial commit

This commit is contained in:
2024-04-24 11:13:56 +03:00
commit 22d37bb0a4
301 changed files with 86455 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
import {test, describe, expect, vi} from 'vitest'
import { mount} from '@vue/test-utils'
import ButtonModal from '@molecules/ButtonModal/ButtonModal.vue';
describe('ButtonModal', () => {
test('ButtonModal mounted', () => {
const wrapper = mount(ButtonModal)
expect(wrapper.exists()).toBe(true)
})
})

View File

@@ -0,0 +1,10 @@
import {test, describe, expect, vi} from 'vitest'
import { mount} from '@vue/test-utils'
import MachinesModal from '@molecules/MachinesModal/MachinesModal.vue';
describe('MachinesModal', () => {
test('MachinesModal mounted', () => {
const wrapper = mount(MachinesModal)
expect(wrapper.exists()).toBe(true)
})
})

View File

@@ -0,0 +1,10 @@
import {test, describe, expect} from 'vitest'
import { mount} from '@vue/test-utils'
import MapModal from '@molecules/MapModal/MapModal.vue';
describe('MapModal', () => {
test('MapModal mounted', () => {
const wrapper = mount(MapModal)
expect(wrapper.exists()).toBe(true)
})
})

View File

@@ -0,0 +1,46 @@
import {test, describe, expect, vi} from 'vitest'
import { shallowMount } from '@vue/test-utils'
import VChart from '@molecules/VChart/VChart.vue';
import { createStore } from 'vuex';
import { store as layout_machines } from '@/store/modules/layout_machines';
describe('VChart', () => {
test('VChart mounted', () => {
const store = createStore({
modules: {
layout_machines
}
})
vi.mock('@store/hooks/Echarts', () => {
const html = vi.fn(() => {
return {
getHtml: () => {
return '<div>test</div>'
},
onClickedBarCharts: vi.fn()
}
})
return {
__esModule: true,
ECharts: html
}
})
const wrapper = shallowMount(VChart, {
props: {
id: "",
type: "bar",
},
global: {
mocks: {
$store: store
}
}
})
expect(wrapper.exists()).toBe(true)
})
})

View File

@@ -0,0 +1,18 @@
import {test, describe, expect, vi} from 'vitest'
import { mount} from '@vue/test-utils'
import VDatepicker from '@molecules/VDatepicker/VDatepicker.vue';
describe('VDatepicker', () => {
test('VDatepicker mounted', () => {
const wrapper = mount(VDatepicker,
{
global: {
provide: {
defaultDate: null
}
}
}
)
expect(wrapper.exists()).toBe(true)
})
})

View File

@@ -0,0 +1,10 @@
import {test, describe, expect} from 'vitest'
import { mount} from '@vue/test-utils'
import VModal from '@molecules/VModal/VModal.vue';
describe('VModal', () => {
test('VModal mounted', () => {
const wrapper = mount(VModal)
expect(wrapper.exists()).toBe(true)
})
})

View File

@@ -0,0 +1,10 @@
import {test, describe, expect} from 'vitest'
import { mount} from '@vue/test-utils'
import VSpinner from '@molecules/VSpinner/VSpinner.vue';
describe('VSpinner', () => {
test('VSpinner mounted', () => {
const wrapper = mount(VSpinner)
expect(wrapper.exists()).toBe(true)
})
})

View File

@@ -0,0 +1,31 @@
import {test, describe, expect, vi } from 'vitest'
import { mount} from '@vue/test-utils'
import VTabulator from '@molecules/VTabulator/VTabulator.vue';
describe("tests VTabulator component", () => {
vi.mock('tabulator-tables', () => {
const tabulator = vi.fn(() => {
return {
getHtml: () => {
return '<div>test</div>'
}
}
})
return {
__esModule: true,
TabulatorFull: tabulator
}
})
test('exist test of VTabulator', async () => {
const wrapper = mount(VTabulator, {
shallow: true,
})
expect(wrapper.exists()).toBe(true)
})
})