mirror of
https://github.com/excalidraw/excalidraw.git
synced 2025-05-03 10:00:07 -04:00
Fixes in Shortcuts dialog and minor refactor (#1297)
This commit is contained in:
parent
e4c154f43e
commit
0c3d34261e
11 changed files with 96 additions and 82 deletions
|
@ -1,19 +1,19 @@
|
|||
import { queries, buildQueries } from "@testing-library/react";
|
||||
|
||||
const toolMap = {
|
||||
selection: "Selection — S, 1",
|
||||
rectangle: "Rectangle — R, 2",
|
||||
diamond: "Diamond — D, 3",
|
||||
ellipse: "Ellipse — E, 4",
|
||||
arrow: "Arrow — A, 5",
|
||||
line: "Line — L, 6",
|
||||
selection: "selection",
|
||||
rectangle: "rectangle",
|
||||
diamond: "diamond",
|
||||
ellipse: "ellipse",
|
||||
arrow: "arrow",
|
||||
line: "line",
|
||||
};
|
||||
|
||||
export type ToolName = keyof typeof toolMap;
|
||||
|
||||
const _getAllByToolName = (container: HTMLElement, tool: string) => {
|
||||
const toolTitle = toolMap[tool as ToolName];
|
||||
return queries.getAllByTitle(container, toolTitle);
|
||||
return queries.getAllByTestId(container, toolTitle);
|
||||
};
|
||||
|
||||
const getMultipleError = (_container: any, tool: any) =>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue