StackGenVis: Alignment of Data, Algorithms, and Models for Stacking Ensemble Learning Using Performance Metrics
https://doi.org/10.1109/TVCG.2020.3030352
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
77 lines
2.3 KiB
77 lines
2.3 KiB
import { mount } from '@vue/test-utils'
|
|
import { BCardHeader } from './card-header'
|
|
|
|
describe('card-header', () => {
|
|
it('has root element "div"', async () => {
|
|
const wrapper = mount(BCardHeader)
|
|
expect(wrapper.is('div')).toBe(true)
|
|
})
|
|
|
|
it('has class card-header', async () => {
|
|
const wrapper = mount(BCardHeader)
|
|
expect(wrapper.classes()).toContain('card-header')
|
|
expect(wrapper.classes().length).toBe(1)
|
|
})
|
|
|
|
it('has custom root element when prop headerTag is set', async () => {
|
|
const wrapper = mount(BCardHeader, {
|
|
context: {
|
|
props: {
|
|
headerTag: 'header'
|
|
}
|
|
}
|
|
})
|
|
expect(wrapper.is('header')).toBe(true)
|
|
expect(wrapper.classes()).toContain('card-header')
|
|
})
|
|
|
|
it('has class bg-info when prop headerBgVariant=info', async () => {
|
|
const wrapper = mount(BCardHeader, {
|
|
context: {
|
|
props: { headerBgVariant: 'info' }
|
|
}
|
|
})
|
|
expect(wrapper.classes()).toContain('card-header')
|
|
expect(wrapper.classes()).toContain('bg-info')
|
|
expect(wrapper.classes().length).toBe(2)
|
|
})
|
|
|
|
it('has class text-info when prop headerTextVariant=info', async () => {
|
|
const wrapper = mount(BCardHeader, {
|
|
context: {
|
|
props: { headerTextVariant: 'info' }
|
|
}
|
|
})
|
|
expect(wrapper.classes()).toContain('card-header')
|
|
expect(wrapper.classes()).toContain('text-info')
|
|
expect(wrapper.classes().length).toBe(2)
|
|
})
|
|
|
|
it('has class border-info when prop headerBorderVariant=info', async () => {
|
|
const wrapper = mount(BCardHeader, {
|
|
context: {
|
|
props: { headerBorderVariant: 'info' }
|
|
}
|
|
})
|
|
expect(wrapper.classes()).toContain('card-header')
|
|
expect(wrapper.classes()).toContain('border-info')
|
|
expect(wrapper.classes().length).toBe(2)
|
|
})
|
|
|
|
it('has all variant classes when all variant props set', async () => {
|
|
const wrapper = mount(BCardHeader, {
|
|
context: {
|
|
props: {
|
|
headerTextVariant: 'info',
|
|
headerBgVariant: 'danger',
|
|
headerBorderVariant: 'dark'
|
|
}
|
|
}
|
|
})
|
|
expect(wrapper.classes()).toContain('card-header')
|
|
expect(wrapper.classes()).toContain('text-info')
|
|
expect(wrapper.classes()).toContain('bg-danger')
|
|
expect(wrapper.classes()).toContain('border-dark')
|
|
expect(wrapper.classes().length).toBe(4)
|
|
})
|
|
})
|
|
|