fix: chat tests

This commit is contained in:
Patrick Erichsen 2025-05-22 18:10:19 -07:00
parent 071ecb91eb
commit 7be3bb4161
2 changed files with 4 additions and 8 deletions

View file

@ -38,13 +38,9 @@ export function ModeSelect() {
}, [mode, agentModeSupported, dispatch, selectedModel]);
const cycleMode = useCallback(() => {
if (mode === "chat" && agentModeSupported) {
dispatch(setMode("agent"));
} else {
dispatch(setMode("chat"));
}
dispatch(setMode(mode === "chat" ? "agent" : "chat"));
mainEditor?.commands.focus();
}, [mode, agentModeSupported, mainEditor]);
}, [mode, mainEditor]);
const selectMode = useCallback(
(newMode: MessageModes) => {

View file

@ -35,8 +35,8 @@ describe("Chat page test", () => {
);
});
// Check that it switched to Edit mode
expect(await screen.findByText("Edit")).toBeInTheDocument();
// Check that it switched back to Chat mode
expect(await screen.findByText("Chat")).toBeInTheDocument();
});
it.skip("should send a message and receive a response", async () => {