added widgets from dashboard

This commit is contained in:
woothu
2018-10-09 14:42:41 +02:00
parent 4741d4231a
commit 2023248ee2
4 changed files with 160 additions and 165 deletions
+25
View File
@@ -0,0 +1,25 @@
import Vue from 'vue'
import { shallowMount } from '@vue/test-utils'
import BootstrapVue from 'bootstrap-vue'
import Component from '@/views/widgets/Widget06'
Vue.use(BootstrapVue)
const ComponentName = 'Widget06'
const wrapper = shallowMount(Component)
describe(ComponentName + '.vue', () => {
it('has a name', () => {
expect(Component.name).toMatch(ComponentName)
})
it('is Vue instance', () => {
expect(wrapper.isVueInstance()).toBe(true)
})
it('correctly sets default props and data when created', () => {
expect(wrapper.props().cardClasses).toBe('')
expect(wrapper.props().header).toBe('header|string')
expect(wrapper.props().text).toBe('text|string')
expect(wrapper.props().chartType).toBe('chart1')
expect(wrapper.props().chartHeight == 70).toBe(true)
})
})