mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
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:
parent
58fcb44de0
commit
014097a97e
21 changed files with 257 additions and 281 deletions
|
@ -11,6 +11,7 @@ import {
|
|||
ExcalidrawRectangleElement,
|
||||
} from "../element/types";
|
||||
import { UI, Pointer, Keyboard } from "./helpers/ui";
|
||||
import { KEYS } from "../keys";
|
||||
|
||||
// Unmount ReactDOM from root
|
||||
ReactDOM.unmountComponentAtNode(document.getElementById("root")!);
|
||||
|
@ -88,9 +89,9 @@ describe("move element", () => {
|
|||
renderScene.mockClear();
|
||||
|
||||
// Move selected rectangle
|
||||
Keyboard.keyDown("ArrowRight");
|
||||
Keyboard.keyDown("ArrowDown");
|
||||
Keyboard.keyDown("ArrowDown");
|
||||
Keyboard.keyDown(KEYS.ARROW_RIGHT);
|
||||
Keyboard.keyDown(KEYS.ARROW_DOWN);
|
||||
Keyboard.keyDown(KEYS.ARROW_DOWN);
|
||||
|
||||
// Check that the arrow size has been changed according to moving the rectangle
|
||||
expect(renderScene).toHaveBeenCalledTimes(3);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue