1
0
mirror of https://github.com/lana-k/sqliteviz.git synced 2025-12-07 10:38:54 +08:00

update tests

This commit is contained in:
lana-k
2025-01-05 17:13:55 +01:00
parent eee67763b5
commit e14696b59e
26 changed files with 523 additions and 409 deletions

View File

@@ -5,18 +5,18 @@ import CheckBox from '@/components/CheckBox'
describe('CheckBox', () => {
it('unchecked by default', () => {
const wrapper = shallowMount(CheckBox, {
propsData: { init: false }
props: { init: false }
})
expect(wrapper.find('img').isVisible()).to.equal(false)
})
it('gets init state according to passed props', () => {
const wrapperChecked = shallowMount(CheckBox, {
propsData: { init: true }
props: { init: true }
})
expect(wrapperChecked.find('img').isVisible()).to.equal(true)
const wrapperUnchecked = shallowMount(CheckBox, {
propsData: { init: false }
props: { init: false }
})
expect(wrapperUnchecked.find('img').isVisible()).to.equal(false)
})
@@ -39,7 +39,7 @@ describe('CheckBox', () => {
it('disabled', async () => {
const wrapper = shallowMount(CheckBox, {
propsData: { disabled: true }
props: { disabled: true }
})
expect(wrapper.find('.checkbox-container').classes()).to.include('disabled')
expect(wrapper.find('.checkbox-container').classes()).to.not.include('checked')