Commit 8ae2defa authored by Johan Hernefeldt's avatar Johan Hernefeldt Committed by 杨奕

Dropdown: click open uses `show-timeout` attribute (#8734)

* Dropdown: Click open uses `show-timeout` attribute

* Dropdown: Modified test to work with `show-timeout` attribute

* Dropdown: Clean up in testfix
parent 0f7dcb9d
......@@ -128,7 +128,11 @@
},
handleClick() {
if (this.triggerElm.disabled) return;
this.visible = !this.visible;
if (this.visible) {
this.hide();
} else {
this.show();
}
},
handleTriggerKeyDown(ev) {
const keyCode = ev.keyCode;
......
......@@ -102,12 +102,11 @@ describe('Dropdown', () => {
triggerEvent(triggerElm, 'mouseenter');
dropdown.$nextTick(_ => {
expect(dropdown.visible).to.not.true;
triggerElm.click();
dropdown.$nextTick(_ => {
setTimeout(_ => {
expect(dropdown.visible).to.be.true;
done();
});
}, 300);
});
});
it('split button', done => {
......
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