test: fix date-picker

pull/7258/head^2
wacky6.AriesMBP 2017-10-12 00:09:57 +11:00 committed by 杨奕
parent 83245f846d
commit 78d97c8e3f
1 changed files with 4 additions and 4 deletions

View File

@ -376,17 +376,17 @@ describe('DatePicker', () => {
ref="compo"
v-model="value"
type="date"
@change="handleChange"
value-format="dd-MM-yyyy" />`,
data() {
return {
value: '',
handleChange: null
value: ''
};
}
}, true);
const spy = sinon.spy();
vm.handleChange = spy;
vm.$refs.compo.$on('change', spy);
vm.$refs.compo.$el.querySelector('input').focus();
setTimeout(_ => {
vm.$refs.compo.picker.$el.querySelector('.el-date-table td.available').click();