Tests update

This commit is contained in:
Francisco Hodge 2018-11-25 18:11:09 -05:00
parent 97b475a2b7
commit 125f6b6504

View File

@ -870,6 +870,24 @@ it('Keyboard handleButtonMouseDown will work', () => {
});
it('Keyboard handleButtonMouseDown will work with preventMouseDownDefault', () => {
testUtil.setDOM();
let keyboard = new Keyboard();
keyboard.options.preventMouseDownDefault = true;
keyboard.handleButtonMouseDown("q", {
target: keyboard.getButtonElement("q")
});
var clickEvent = document.createEvent('MouseEvents');
clickEvent.initEvent('mousedown', true, true);
keyboard.getButtonElement("q").dispatchEvent(clickEvent);
document.onmouseup();
});
it('Keyboard onModulesLoaded will work', () => {
testUtil.setDOM();