mirror of
https://github.com/baserow/baserow.git
synced 2026-12-04 08:18:42 +00:00
22 lines
779 B
JavaScript
22 lines
779 B
JavaScript
import { shallowMount } from '@vue/test-utils'
|
|
import SkeletonBlock from '@baserow/modules/core/components/SkeletonBlock'
|
|
|
|
describe('SkeletonBlock.vue', () => {
|
|
it('renders a rounded full width line by default', () => {
|
|
const wrapper = shallowMount(SkeletonBlock)
|
|
expect(wrapper.classes()).toEqual([
|
|
'skeleton-block',
|
|
'skeleton-block--rounded',
|
|
])
|
|
expect(wrapper.attributes('style')).toBe('width: 100%; height: 12px;')
|
|
})
|
|
|
|
it('applies the given shape and size', () => {
|
|
const wrapper = shallowMount(SkeletonBlock, {
|
|
propsData: { width: '40px', height: '40px', shape: 'square' },
|
|
})
|
|
expect(wrapper.classes()).toContain('skeleton-block--square')
|
|
expect(wrapper.attributes('style')).toBe('width: 40px; height: 40px;')
|
|
})
|
|
})
|