Elffuss BraidHub

kikocis/continue public

fix: tests
Changesetfb1cad4526ebcee8be55ebc0b25f342d536da83902e9552d4089d6aadaad80c9
AuthorNate <sestinj@gmail.com> · 2025-09-14 20:59 -07:00
CommitterNate <sestinj@gmail.com> · 2025-09-14 20:59 -07:00
Parents910f9a39164f

Browse the files at this changeset

2 files changed

modified gui/src/pages/gui/ToolCallDiv/FindAndReplace.test.tsx +5 −4
@@ -236,10 +236,11 @@
236236
237237 render(<FindAndReplaceDisplay {...defaultProps} />);
238238
239- const toggleButton = screen.getByTestId("toggle-find-and-replace-diff");
240- fireEvent.click(toggleButton);
241-
242- expect(screen.getByText("Error generating diff")).toBeInTheDocument();
239+ // When diff generation errors, component shows a friendly message
240+ // without rendering the expand/collapse container
241+ expect(
242+ screen.getByText("The searched string was not found in the file"),
243+ ).toBeInTheDocument();
243244 });
244245
245246 it("should show 'No changes to display' when diff is empty", () => {
modified gui/src/pages/gui/chat-tests/EditToolScenarios.test.tsx +2 −0
@@ -73,6 +73,8 @@
7373 store.dispatch(setInactive());
7474
7575 ideMessenger.responses["getWorkspaceDirs"] = [EDIT_WORKSPACE_DIR];
76+ // Provide empty open files to avoid MockIdeMessenger throwing on getOpenFiles
77+ ideMessenger.responses["getOpenFiles"] = [] as any;
7678 ideMessenger.responses["tools/evaluatePolicy"] = {
7779 policy: "allowedWithPermission",
7880 };