Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it('should update its value with changing model', () => {
const wrapper = mount(create(``))
const checkbox = q(wrapper, 'input')
assert(checkbox.checked === true)
wrapper.vm.user.hasPhone = false
return Vue.nextTick().then(() => {
assert(checkbox.checked === false)
})
})
it('can not disable single AMI server in list', () => {
Fixtures.oneServer.forEach(msg => store.dispatch('newMessage', msg))
const comp = mount(AmiServers, {store, localVue})
expect(store.state.selectedServers.length).to.equal(1)
comp.find('.disable-server .input-group--selection-controls__ripple--active').trigger('click')
expect(store.state.selectedServers.length).to.equal(1)
expect(comp.vm.notify).to.equal(true)
})
})
it('should be converted to textarea element', () => {
const wrapper = mount(create(``))
assertAttrs(wrapper, 'textarea', null, 'name')
assertValue(wrapper, 'textarea', 'foo')
const el = q(wrapper, 'textarea')
assert(el.textContent === 'foo')
})
it('should have a label', () => {
const wrapper = mount(FormGroupInput, {
propsData: {
label: 'my label'
}
})
const label = wrapper.find('label')
expect(label.text().trim()).to.equal('my label')
})
})
it('should increment counter', () => {
const wrapper = mount(Counter, { store, localVue })
wrapper.vm.$store.commit(types.INCREMENT)
expect(wrapper.vm.count).toBe(1)
})
it('click slot to change the current-value', (done) => {
wrapper = mount(Picker, {
attachToDocument: true,
propsData: {
slots: [
{
values: [1, 2, 3],
defaultIndex: 0
}
]
}
})
setTimeout(() => {
const indicator = wrapper.find('.weui-picker__indicator').element
const indicatorRect = indicator.getBoundingClientRect()
it('should contain 4 stats cards 3 chart cards and 4 circle charts', () => {
const wrapper = mount(Overview)
const children = wrapper.vm.$children
const statsCards = filterChildren(children, 'stats-card').length
const chartCards = filterChildren(children, 'chart-card').length
const circleChartCards = filterChildren(children, 'circle-chart-card').length
expect(statsCards).to.equal(4)
expect(chartCards).to.equal(1)
expect(circleChartCards).to.equal(4)
})
})
beforeEach(() => {
wrapper = mount(Login)
})
beforeEach(() => {
component = mount(HeaderTop, {
propsData: {
user: {},
pathname: '/api/v1/build/1234',
menu: {
home: 'viewProjects.php'
}
}
});
});
beforeEach(() => {
component = mount(HeaderBottom);
});