From d1651b4a2dde8a5680a90bb186bcfe2df97d39ab Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Thu, 3 Jul 2025 20:47:01 -0700 Subject: [PATCH] add plan to toggle test --- gui/src/pages/gui/chat-tests/Chat.test.tsx | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/gui/src/pages/gui/chat-tests/Chat.test.tsx b/gui/src/pages/gui/chat-tests/Chat.test.tsx index d3e6aa18b..d1bae6d07 100644 --- a/gui/src/pages/gui/chat-tests/Chat.test.tsx +++ b/gui/src/pages/gui/chat-tests/Chat.test.tsx @@ -27,7 +27,19 @@ test("should be able to toggle modes", async () => { ); }); - // Check that it switched to Agent mode + // Check that it switched to Plan mode + await getElementByText("Plan"); + + act(() => { + document.dispatchEvent( + new KeyboardEvent("keydown", { + key: ".", + metaKey: true, // cmd key on Mac + }), + ); + }); + + // Check that it switched to Plan mode await getElementByText("Agent"); act(() => {