feat(app): tests
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import AppContainer from '@frames/AppContainer/AppContainer.vue';
|
||||
import {createStore} from "vuex";
|
||||
import { store as layout } from '@/store/modules/layout';
|
||||
import { store as auth } from '@/store/modules/auth';
|
||||
|
||||
describe('AppContainer', () => {
|
||||
const store = createStore({
|
||||
modules: {
|
||||
layout,
|
||||
auth
|
||||
},
|
||||
})
|
||||
|
||||
test('AppContainer mounted', () => {
|
||||
const wrapper = shallowMount(AppContainer,
|
||||
{
|
||||
global: {
|
||||
mocks: {
|
||||
$store: store,
|
||||
},
|
||||
}}
|
||||
)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import AppContainerBreadcrumbs from '@frames/AppContainer/AppContainerBreadcrumbs.vue';
|
||||
|
||||
describe('AppContainerBreadcrumbs', () => {
|
||||
test('AppContainerBreadcrumbs mounted', () => {
|
||||
const wrapper = shallowMount(AppContainerBreadcrumbs)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import AppContainerHeader from '@frames/AppContainer/AppContainerHeader.vue';
|
||||
|
||||
describe('AppContainerHeader', () => {
|
||||
test('AppContainerHeader mounted', () => {
|
||||
const wrapper = shallowMount(AppContainerHeader)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,16 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import AppContainerLeftPanel from '@frames/AppContainer/AppContainerLeftPanel.vue';
|
||||
import Router from "@router"
|
||||
|
||||
describe('AppContainerLeftPanel', () => {
|
||||
test('AppContainerLeftPanel mounted', () => {
|
||||
const wrapper = shallowMount(AppContainerLeftPanel,
|
||||
{
|
||||
global: {
|
||||
plugins: [Router]
|
||||
}
|
||||
})
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,15 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import AppContainerMobileMenu from '@frames/AppContainer/AppContainerMobileMenu.vue';
|
||||
|
||||
describe('AppContainerMobileMenu', () => {
|
||||
test('AppContainerMobileMenu mounted', () => {
|
||||
const wrapper = shallowMount(AppContainerMobileMenu, {
|
||||
props: {
|
||||
isOpenedMobileMenu: false,
|
||||
setIsMobileMenuOpened: () => {},
|
||||
}
|
||||
})
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,20 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import AppContainerRightPanel from '@frames/AppContainer/AppContainerRightPanel.vue';
|
||||
import Router from "@router"
|
||||
|
||||
describe('AppContainerRightPanel', () => {
|
||||
test('AppContainerRightPanel mounted', () => {
|
||||
const wrapper = shallowMount(AppContainerRightPanel, {
|
||||
props: {
|
||||
currentUser: {
|
||||
id: 1,
|
||||
}
|
||||
},
|
||||
global: {
|
||||
plugins: [Router]
|
||||
}
|
||||
})
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,15 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import MenuList from '@frames/AppContainer/MenuList/MenuList.vue';
|
||||
|
||||
describe('MenuList', () => {
|
||||
|
||||
test('MenuList mounted', () => {
|
||||
const wrapper = shallowMount(MenuList, {
|
||||
props: {
|
||||
routeName: ""
|
||||
}
|
||||
})
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,11 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import MenuListItem from '@frames/AppContainer/MenuList/MenuListItem.vue';
|
||||
|
||||
describe('MenuListItem', () => {
|
||||
|
||||
test('MenuListItem mounted', () => {
|
||||
const wrapper = shallowMount(MenuListItem)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import MenuListItemCopy from '@frames/AppContainer/MenuList/MenuListItemCopy.vue';
|
||||
|
||||
describe('MenuListItemCopy', () => {
|
||||
test('MenuListItemCopy mounted', () => {
|
||||
const wrapper = shallowMount(MenuListItemCopy)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import MenuListItemGroup from '@frames/AppContainer/MenuList/MenuListItemGroup.vue';
|
||||
|
||||
describe('MenuListItemGroup', () => {
|
||||
test('MenuListItemGroup mounted', () => {
|
||||
const wrapper = shallowMount(MenuListItemGroup)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,17 @@
|
||||
import {test, describe, expect, } from 'vitest'
|
||||
import { shallowMount} from '@vue/test-utils'
|
||||
import MenuListItemImplementation from '@frames/AppContainer/MenuList/MenuListItemImplementation.vue';
|
||||
import Router from "@router"
|
||||
|
||||
describe('MenuListItemImplementation', () => {
|
||||
|
||||
test('MenuListItemImplementation mounted', () => {
|
||||
const wrapper = shallowMount(MenuListItemImplementation,
|
||||
{
|
||||
global: {
|
||||
plugins: [Router]
|
||||
}
|
||||
})
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import {test, describe, expect} from 'vitest'
|
||||
import { mount} from '@vue/test-utils'
|
||||
import PacksContainer from '@frames/PacksContainer/PacksContainer.vue';
|
||||
|
||||
describe('PacksContainer', () => {
|
||||
test('PacksContainer mounted', () => {
|
||||
const wrapper = mount(PacksContainer)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import {test, describe, expect} from 'vitest'
|
||||
import { mount} from '@vue/test-utils'
|
||||
import PacksContainerBody from '@frames/PacksContainer/PacksContainerBody.vue';
|
||||
|
||||
describe('PacksContainerBody', () => {
|
||||
test('PacksContainerBody mounted', () => {
|
||||
const wrapper = mount(PacksContainerBody)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
@@ -0,0 +1,10 @@
|
||||
import {test, describe, expect} from 'vitest'
|
||||
import { mount} from '@vue/test-utils'
|
||||
import PacksContainerControl from '@frames/PacksContainer//PacksContainerControl.vue';
|
||||
|
||||
describe('PacksContainerControl', () => {
|
||||
test('PacksContainerControl mounted', () => {
|
||||
const wrapper = mount(PacksContainerControl)
|
||||
expect(wrapper.exists()).toBe(true)
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user