fix: chat tests
This commit is contained in:
parent
071ecb91eb
commit
7be3bb4161
2 changed files with 4 additions and 8 deletions
|
|
@ -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) => {
|
||||
|
|
|
|||
|
|
@ -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 () => {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue