From 742e9f5c4d6fb00ac8b0ab9fc0b9d7c404d51674 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robin=20M=C3=A9tral?= Date: Fri, 24 Jun 2022 15:26:26 +0200 Subject: [PATCH] [fixed] Revert changes to test helpers --- specs/helper.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/specs/helper.js b/specs/helper.js index fee49570..9ff09c84 100644 --- a/specs/helper.js +++ b/specs/helper.js @@ -182,7 +182,7 @@ const dispatchMockEvent = eventCtor => (key, code) => (element, opts) => {}, { key: key, - code: code, + keyCode: code, which: code }, opts @@ -194,11 +194,11 @@ const dispatchMockKeyDownEvent = dispatchMockEvent(Simulate.keyDown); /** * Dispatch an 'esc' key down event from an element. */ -export const escKeyDown = dispatchMockKeyDownEvent("ESC", "Escape"); +export const escKeyDown = dispatchMockKeyDownEvent("ESC", 27); /** * Dispatch a 'tab' key down event from an element. */ -export const tabKeyDown = dispatchMockKeyDownEvent("TAB", "Tab"); +export const tabKeyDown = dispatchMockKeyDownEvent("TAB", 9); /** * Dispatch a 'click' event at a node. */