[improvement] Picker: add test case

This commit is contained in:
陈嘉涵
2019-06-09 09:55:33 +08:00
parent 3a4b434b4c
commit a72ce3d115
2 changed files with 26 additions and 0 deletions
+11
View File
@@ -181,3 +181,14 @@ test('click column\'s item', () => {
wrapper.findAll('.van-picker-column__item').at(3).trigger('click');
expect(wrapper.emitted('change')[0][1]).toEqual(columns[1]);
});
test('toolbar-position prop', () => {
const wrapper = mount(Picker, {
propsData: {
showToolbar: true,
toolbarPosition: 'bottom'
}
});
expect(wrapper).toMatchSnapshot();
});