mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-10-29 21:07:40 +01:00
test: validate custom answers only after a submit attempt
This commit is contained in:
1 parent
80e65114d6
commit
441b35fd0d
1 file changed
+3
@@ -949,6 +949,9 @@ describe("TaskChatProtocolCard", () => {
|
||||
container.querySelectorAll<HTMLButtonElement>("button"),
|
||||
).find((button) => button.getAttribute("aria-label") === "Next question");
|
||||
expect(next?.disabled).toBe(false);
|
||||
expect(container.textContent).not.toContain("Enter a custom answer.");
|
||||
const submitNext = Array.from(container.querySelectorAll("button")).find(button => button.textContent?.trim() === "Next");
|
||||
await act(async () => submitNext?.click());
|
||||
expect(container.textContent).toContain("Enter a custom answer.");
|
||||
|
||||
const textarea = container.querySelector("textarea")!;
|
||||
|
||||
Reference in new issue
Block a user