vant/test/unit/specs/tabbar.spec.js
neverland eeaa36058a [new feature] add Tabbar component (#204)
* [Document] add english document of Checkbox

* [Document] add english document of Field

* [Document] add english document of NumberKeyboard

* [bugfix] NumberKeyboard should not dispaly title when title is empty

* [Document] add english document of PasswordInput

* [Document] add english document of Radio

* [document] add english document of Switch

* [bugfix] remove redundent styles in english document

* [Document] fix details

* fix Switch test cases

* [bugfix] Swipe shouid reinitialize when item changes

* [new feature] ImagePreview reconstruct

* [new feature] add Tabbar component
2017-10-12 22:00:34 -05:00

24 lines
558 B
JavaScript

import TabbarExample from '../components/tabbar';
import { mount } from 'avoriaz';
describe('Progress', () => {
let wrapper;
afterEach(() => {
wrapper && wrapper.destroy();
});
it('Tabbar with four items', (done) => {
wrapper = mount(TabbarExample);
wrapper.vm.$nextTick(() => {
expect(wrapper.find('.van-tabbar-item').length).to.equal(4);
wrapper.find('.van-tabbar-item')[3].element.click();
expect(wrapper.vm.active).to.equal(3);
expect(wrapper.vm.changeRecord).to.equal(3);
done();
});
});
});