chore: update data test id chat input
This commit is contained in:
parent
07b1101736
commit
5155f19c9b
@ -472,7 +472,7 @@ const ChatInput = ({ model, className, initialMessage }: ChatInputProps) => {
|
|||||||
rows={1}
|
rows={1}
|
||||||
maxRows={10}
|
maxRows={10}
|
||||||
value={prompt}
|
value={prompt}
|
||||||
data-test-id={'chat-input'}
|
data-testid={'chat-input'}
|
||||||
onChange={(e) => {
|
onChange={(e) => {
|
||||||
setPrompt(e.target.value)
|
setPrompt(e.target.value)
|
||||||
// Count the number of newlines to estimate rows
|
// Count the number of newlines to estimate rows
|
||||||
|
|||||||
@ -75,6 +75,10 @@ vi.mock('@/services/models', () => ({
|
|||||||
stopAllModels: vi.fn(),
|
stopAllModels: vi.fn(),
|
||||||
}))
|
}))
|
||||||
|
|
||||||
|
vi.mock('../MovingBorder', () => ({
|
||||||
|
MovingBorder: ({ children }: { children: React.ReactNode }) => <div data-testid="moving-border">{children}</div>,
|
||||||
|
}))
|
||||||
|
|
||||||
describe('ChatInput', () => {
|
describe('ChatInput', () => {
|
||||||
const mockSendMessage = vi.fn()
|
const mockSendMessage = vi.fn()
|
||||||
const mockSetPrompt = vi.fn()
|
const mockSetPrompt = vi.fn()
|
||||||
@ -361,7 +365,7 @@ describe('ChatInput', () => {
|
|||||||
renderWithRouter()
|
renderWithRouter()
|
||||||
})
|
})
|
||||||
|
|
||||||
const textarea = screen.getByRole('textbox')
|
const textarea = screen.getByTestId('chat-input')
|
||||||
expect(textarea).toBeDisabled()
|
expect(textarea).toBeDisabled()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user