Changesets · Branches · Tags · Compare
| Changeset | fb1cad4526ebcee8be55ebc0b25f342d536da83902e9552d4089d6aadaad80c9 |
|---|---|
| Author | Nate <sestinj@gmail.com> · 2025-09-14 20:59 -07:00 |
| Committer | Nate <sestinj@gmail.com> · 2025-09-14 20:59 -07:00 |
| Parents | 910f9a39164f |
2 files changed
modified gui/src/pages/gui/ToolCallDiv/FindAndReplace.test.tsx +5 −4
| @@ -236,10 +236,11 @@ | ||
| 236 | 236 | |
| 237 | 237 | render(<FindAndReplaceDisplay {...defaultProps} />); |
| 238 | 238 | |
| 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(); | |
| 243 | 244 | }); |
| 244 | 245 | |
| 245 | 246 | 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 @@ | ||
| 73 | 73 | store.dispatch(setInactive()); |
| 74 | 74 | |
| 75 | 75 | ideMessenger.responses["getWorkspaceDirs"] = [EDIT_WORKSPACE_DIR]; |
| 76 | + // Provide empty open files to avoid MockIdeMessenger throwing on getOpenFiles | |
| 77 | + ideMessenger.responses["getOpenFiles"] = [] as any; | |
| 76 | 78 | ideMessenger.responses["tools/evaluatePolicy"] = { |
| 77 | 79 | policy: "allowedWithPermission", |
| 78 | 80 | }; |