Virtual whiteboard for sketching hand-drawn like diagrams
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 

13 lines
363 B

import { waitFor } from "@testing-library/dom";
export const getTextEditor = async (waitForEditor = true) => {
const query = () =>
document.querySelector(
".excalidraw-textEditorContainer > textarea",
) as HTMLTextAreaElement;
if (waitForEditor) {
waitFor(() => expect(query()).not.toBe(null));
return query();
}
return query();
};