MCPcopy Create free account
hub / github.com/continuedev/continue / getElementByText

Function getElementByText

gui/src/util/test/utils.ts:57–66  ·  view source on GitHub ↗
(text: string)

Source from the content-addressed store, hash-verified

55}
56
57export async function getElementByText(text: string): Promise<HTMLElement> {
58 try {
59 const textElement = await waitFor(() => screen.findByText(text));
60 expect(textElement).toBeInTheDocument();
61 return textElement;
62 } catch (e) {
63 logDomText();
64 throw new Error(`Element with text "${text}" not found.`);
65 }
66}
67
68export async function getMainEditor(): Promise<Editor> {
69 const editorElement = await getElementByTestId("editor-input-main");

Callers 3

Chat.test.tsxFile · 0.90

Calls 1

logDomTextFunction · 0.85

Tested by

no test coverage detected