Added widget charts, chart extracted from widgets.

This commit is contained in:
woothu
2018-10-11 12:34:59 +02:00
parent 2023248ee2
commit 364c951ef2
26 changed files with 785 additions and 130 deletions
+3 -3
View File
@@ -22,10 +22,10 @@ describe(ComponentName + '.vue', () => {
const vm = new Vue(Component).$mount()
expect(vm.backgroundColor).toBe('')
expect(vm.styleClasses).toBe('')
expect(vm.header).toBe('header|string')
expect(vm.text).toBe('text|string')
expect(vm.header).toBe('header:string')
expect(vm.text).toBe('text:string')
expect(vm.variant).toBe('')
expect(vm.footer).toBe('footer|string')
expect(vm.footer).toBe('footer:string')
expect(vm.value == 25).toBe(true)
})
it('correctly sets variant when background is not white', () => {
+2 -2
View File
@@ -17,8 +17,8 @@ describe(ComponentName + '.vue', () => {
})
it('correctly sets default props when created', () => {
const vm = new Vue(Component).$mount()
expect(vm.header).toBe('header|string')
expect(vm.text).toBe('text|string')
expect(vm.header).toBe('header:string')
expect(vm.text).toBe('text:string')
expect(vm.link).toBe('#')
expect(vm.iconClasses).toBe('fa fa-cogs bg-primary')
expect(vm.showLink).toBe(false)
+2 -2
View File
@@ -17,8 +17,8 @@ describe(ComponentName + '.vue', () => {
})
it('correctly sets default props when created', () => {
const vm = new Vue(Component).$mount()
expect(vm.header).toBe('header|string')
expect(vm.text).toBe('text|string')
expect(vm.header).toBe('header:string')
expect(vm.text).toBe('text:string')
expect(vm.iconClasses).toBe('fa fa-cogs bg-primary')
})
})
+4 -5
View File
@@ -16,10 +16,9 @@ describe(ComponentName + '.vue', () => {
expect(wrapper.isVueInstance()).toBe(true)
})
it('correctly sets default props and data when created', () => {
const vm = new Vue(Component).$mount()
expect(vm.rightHeader).toBe('rightHeader|string')
expect(vm.rightFooter).toBe('rightFooter|string')
expect(vm.leftHeader).toBe('leftHeader|string')
expect(vm.leftFooter).toBe('leftFooter|string')
expect(wrapper.props().rightHeader).toBe('rightHeader:string')
expect(wrapper.props().rightFooter).toBe('rightFooter:string')
expect(wrapper.props().leftHeader).toBe('leftHeader:string')
expect(wrapper.props().leftFooter).toBe('leftFooter:string')
})
})
+2 -2
View File
@@ -22,8 +22,8 @@ describe(ComponentName + '.vue', () => {
const vm = new Vue(Component).$mount()
expect(vm.backgroundColor).toBe('')
expect(vm.styleClasses).toBe('')
expect(vm.header).toBe('header|string')
expect(vm.text).toBe('text|string')
expect(vm.header).toBe('header:string')
expect(vm.text).toBe('text:string')
expect(vm.variant).toBe('')
expect(vm.value == 25).toBe(true)
})
+2 -2
View File
@@ -17,8 +17,8 @@ describe(ComponentName + '.vue', () => {
})
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().header).toBe('header:string')
expect(wrapper.props().text).toBe('text:string')
expect(wrapper.props().chartType).toBe('chart1')
expect(wrapper.props().chartHeight == 70).toBe(true)
})