From 5155f19c9b0d04f42d75677708a64fab0ce80251 Mon Sep 17 00:00:00 2001 From: Faisal Amir Date: Tue, 19 Aug 2025 22:56:16 +0700 Subject: [PATCH] chore: update data test id chat input --- web-app/src/containers/ChatInput.tsx | 2 +- web-app/src/containers/__tests__/ChatInput.test.tsx | 6 +++++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/web-app/src/containers/ChatInput.tsx b/web-app/src/containers/ChatInput.tsx index 51023e792..8f788446d 100644 --- a/web-app/src/containers/ChatInput.tsx +++ b/web-app/src/containers/ChatInput.tsx @@ -472,7 +472,7 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => { rows={1} maxRows={10} value={prompt} - data-test-id={'chat-input'} + data-testid={'chat-input'} onChange={(e) => { setPrompt(e.target.value) // Count the number of newlines to estimate rows diff --git a/web-app/src/containers/__tests__/ChatInput.test.tsx b/web-app/src/containers/__tests__/ChatInput.test.tsx index 2ed26fc56..4b7e34d26 100644 --- a/web-app/src/containers/__tests__/ChatInput.test.tsx +++ b/web-app/src/containers/__tests__/ChatInput.test.tsx @@ -75,6 +75,10 @@ vi.mock('@/services/models', () => ({ stopAllModels: vi.fn(), })) +vi.mock('../MovingBorder', () => ({ + MovingBorder: ({ children }: { children: React.ReactNode }) =>
{children}
, +})) + describe('ChatInput', () => { const mockSendMessage = vi.fn() const mockSetPrompt = vi.fn() @@ -361,7 +365,7 @@ describe('ChatInput', () => { renderWithRouter() }) - const textarea = screen.getByRole('textbox') + const textarea = screen.getByTestId('chat-input') expect(textarea).toBeDisabled() })