refactor: Stop using the deprecated keyCode (#2426)
Co-authored-by: Lipis <lipiridis@gmail.com> Co-authored-by: David Luzar <luzar.david@gmail.com>
This commit is contained in:
@ -4,6 +4,7 @@ import App from "../components/App";
|
||||
import { UI, Pointer, Keyboard } from "./helpers/ui";
|
||||
import { getTransformHandles } from "../element/transformHandles";
|
||||
import { API } from "./helpers/api";
|
||||
import { KEYS } from "../keys";
|
||||
|
||||
const { h } = window;
|
||||
|
||||
@ -97,10 +98,10 @@ describe("element binding", () => {
|
||||
expect(arrow.endBinding).toBe(null);
|
||||
|
||||
expect(API.getSelectedElement().type).toBe("arrow");
|
||||
Keyboard.hotkeyPress("ARROW_RIGHT");
|
||||
Keyboard.keyPress(KEYS.ARROW_RIGHT);
|
||||
expect(arrow.endBinding?.elementId).toBe(rectangle.id);
|
||||
|
||||
Keyboard.hotkeyPress("ARROW_LEFT");
|
||||
Keyboard.keyPress(KEYS.ARROW_LEFT);
|
||||
expect(arrow.endBinding).toBe(null);
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user