diff --git a/components/sender/__tests__/index.test.tsx b/components/sender/__tests__/index.test.tsx
index b1f0d88b..efdbfa05 100644
--- a/components/sender/__tests__/index.test.tsx
+++ b/components/sender/__tests__/index.test.tsx
@@ -138,4 +138,34 @@ describe('Sender Component', () => {
const { container } = render();
expect(container.querySelector('textarea')).toHaveAttribute('readonly');
});
+
+ describe('allowSpeech', () => {
+ it('allowSpeech prop enables speech input', () => {
+ const { container } = render();
+ const speechButton = container.querySelector('.ant-sender-actions-btn');
+ expect(speechButton).toBeInTheDocument();
+ });
+
+ it('custom speech input using allowSpeech prop', () => {
+ const onRecordingChange = jest.fn();
+ const { container } = render(
+ ,
+ );
+ const speechButton = container.querySelector('.ant-sender-actions-btn');
+ fireEvent.click(speechButton!);
+ expect(onRecordingChange).toHaveBeenCalledWith(true);
+ });
+
+ it('speech button functionality', () => {
+ const { container } = render();
+ const speechButton = container.querySelector('.ant-sender-actions-btn');
+ fireEvent.click(speechButton!);
+ expect(container.querySelector('.ant-sender-actions-btn')).toBeInTheDocument();
+ });
+ });
});