Commit 78d97c8e authored by wacky6.AriesMBP's avatar wacky6.AriesMBP Committed by 杨奕

test: fix date-picker

parent 83245f84
...@@ -376,17 +376,17 @@ describe('DatePicker', () => { ...@@ -376,17 +376,17 @@ describe('DatePicker', () => {
ref="compo" ref="compo"
v-model="value" v-model="value"
type="date" type="date"
@change="handleChange"
value-format="dd-MM-yyyy" />`, value-format="dd-MM-yyyy" />`,
data() { data() {
return { return {
value: '', value: ''
handleChange: null
}; };
} }
}, true); }, true);
const spy = sinon.spy(); const spy = sinon.spy();
vm.handleChange = spy; vm.$refs.compo.$on('change', spy);
vm.$refs.compo.$el.querySelector('input').focus(); vm.$refs.compo.$el.querySelector('input').focus();
setTimeout(_ => { setTimeout(_ => {
vm.$refs.compo.picker.$el.querySelector('.el-date-table td.available').click(); vm.$refs.compo.picker.$el.querySelector('.el-date-table td.available').click();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment