diff --git a/client/src/components/Audio/TTS.tsx b/client/src/components/Audio/TTS.tsx index 665424d097..9af986ecd7 100644 --- a/client/src/components/Audio/TTS.tsx +++ b/client/src/components/Audio/TTS.tsx @@ -83,7 +83,6 @@ export function BrowserTTS({ preload="none" controlsList="nodownload nofullscreen noremoteplayback" className="hidden" - src={audioRef.current?.src} onError={(error) => { logger.error('Error fetching audio:', error); }} @@ -175,7 +174,6 @@ export function ExternalTTS({ preload="none" controlsList="nodownload nofullscreen noremoteplayback" className="hidden" - src={audioRef.current?.src} onError={(error) => { logger.error('Error fetching audio:', error); }} diff --git a/client/src/components/Audio/__tests__/TTS.spec.tsx b/client/src/components/Audio/__tests__/TTS.spec.tsx new file mode 100644 index 0000000000..1a673875d9 --- /dev/null +++ b/client/src/components/Audio/__tests__/TTS.spec.tsx @@ -0,0 +1,67 @@ +import { RecoilRoot } from 'recoil'; +import { render } from '@testing-library/react'; +import type { ReactElement } from 'react'; +import { BrowserTTS, ExternalTTS } from '../TTS'; + +/** + * Every assistant row mounts one of these, hidden, for its read-aloud button. Until the button + * is pressed the element must stay without a source: an `