fix: extend transcript hover surfaces
This commit is contained in:
@@ -23,6 +23,7 @@ describe("buildTranscriptRow: user/agent/thought", () => {
|
||||
);
|
||||
expect(el.className).toContain("st-row-user");
|
||||
expect(el.textContent).toContain("hi <b>there</b>");
|
||||
expect(el.querySelector(".st-who")).toBeNull();
|
||||
// never actual markup from user input
|
||||
expect(el.querySelector("b")).toBeNull();
|
||||
});
|
||||
@@ -61,12 +62,11 @@ describe("buildTranscriptRow: user/agent/thought", () => {
|
||||
const el = buildTranscriptRow(
|
||||
row("agent_text", { content: { type: "text", text: "copy **this** exactly" } }),
|
||||
);
|
||||
const body = el.querySelector<HTMLElement>(".st-body")!;
|
||||
expect(body.getAttribute("role")).toBe("button");
|
||||
body.click();
|
||||
expect(el.getAttribute("role")).toBe("button");
|
||||
el.click();
|
||||
await Promise.resolve();
|
||||
expect(writeText).toHaveBeenCalledWith("copy **this** exactly");
|
||||
body.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter", bubbles: true }));
|
||||
el.dispatchEvent(new KeyboardEvent("keydown", { key: "Enter", bubbles: true }));
|
||||
await Promise.resolve();
|
||||
expect(writeText).toHaveBeenCalledTimes(2);
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user