From 1aedf9c487e30bbae2f16c8485ee8f67722181e1 Mon Sep 17 00:00:00 2001 From: Robert Stein Date: Sat, 24 Nov 2018 16:43:30 +0100 Subject: [PATCH] - changes mousedown event simulation so that `event` object is passed to `onmousedown` handler --- src/lib/components/tests/Keyboard.test.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/components/tests/Keyboard.test.js b/src/lib/components/tests/Keyboard.test.js index 04da5412..ac7b809a 100644 --- a/src/lib/components/tests/Keyboard.test.js +++ b/src/lib/components/tests/Keyboard.test.js @@ -863,7 +863,9 @@ it('Keyboard handleButtonMouseDown will work', () => { target: keyboard.getButtonElement("q") }); - keyboard.getButtonElement("q").onmousedown(); + var clickEvent = document.createEvent('MouseEvents'); + clickEvent.initEvent('mousedown', true, true); + keyboard.getButtonElement("q").dispatchEvent(clickEvent); document.onmouseup(); });