Skip to content

Commit f0d91e7

Browse files
fix: Fix image preview for Windows paths in playground (#12136)
Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com>
1 parent 05404c7 commit f0d91e7

5 files changed

Lines changed: 593 additions & 86 deletions

File tree

src/frontend/src/components/core/playgroundComponent/chat-view/chat-messages/components/__tests__/chat-message.test.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -180,13 +180,13 @@ describe("ChatMessage Component", () => {
180180
chat: {
181181
...mockChat,
182182
message: "",
183-
files: ["/path/to/file.jpg"],
183+
files: ["/path/to/file.pdf"],
184184
},
185185
};
186186

187187
render(<ChatMessage {...propsWithFiles} />);
188-
// Should render UserMessage with file preview (shows loading icon for files)
189-
expect(screen.getByTestId("loading-icon")).toBeInTheDocument();
188+
// Should render UserMessage with file preview (non-image files show File icon)
189+
expect(screen.getByTestId("forwarded-icon")).toBeInTheDocument();
190190
});
191191

192192
it("renders bot message when no text and no files", () => {

0 commit comments

Comments
 (0)