@@ -148,6 +148,17 @@ describe('Message bar', () => {
148148 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Send' } ) ) ;
149149 expect ( screen . getByRole ( 'tooltip' , { name : 'Test' } ) ) . toBeTruthy ( ) ;
150150 } ) ;
151+ it ( 'can handle buttonProps tooltipProps appropriately for send' , ( ) => {
152+ render (
153+ < MessageBar
154+ onSendMessage = { jest . fn }
155+ alwayShowSendButton
156+ buttonProps = { { send : { tooltipProps : { isVisible : true } } } }
157+ />
158+ ) ;
159+ // isVisible, so no need for click
160+ expect ( screen . getByRole ( 'tooltip' , { name : 'Send' } ) ) . toBeTruthy ( ) ;
161+ } ) ;
151162 it ( 'can handle buttonProps props appropriately for send' , async ( ) => {
152163 render (
153164 < MessageBar
@@ -236,6 +247,17 @@ describe('Message bar', () => {
236247 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Attach' } ) ) ;
237248 expect ( screen . getByRole ( 'tooltip' , { name : 'Test' } ) ) . toBeTruthy ( ) ;
238249 } ) ;
250+ it ( 'can handle buttonProps tooltipProps appropriately for attach' , ( ) => {
251+ render (
252+ < MessageBar
253+ onSendMessage = { jest . fn }
254+ alwayShowSendButton
255+ buttonProps = { { attach : { tooltipProps : { isVisible : true } } } }
256+ />
257+ ) ;
258+ // isVisible, so no need for click
259+ expect ( screen . getByRole ( 'tooltip' , { name : 'Attach' } ) ) . toBeTruthy ( ) ;
260+ } ) ;
239261 it ( 'can handle buttonProps props appropriately for attach' , async ( ) => {
240262 render (
241263 < MessageBar
@@ -271,6 +293,18 @@ describe('Message bar', () => {
271293 await userEvent . click ( screen . getByRole ( 'button' , { name : 'Stop' } ) ) ;
272294 expect ( screen . getByRole ( 'tooltip' , { name : 'Test' } ) ) . toBeTruthy ( ) ;
273295 } ) ;
296+ it ( 'can handle buttonProps tooltipProps appropriately for stop' , ( ) => {
297+ render (
298+ < MessageBar
299+ onSendMessage = { jest . fn }
300+ hasStopButton
301+ handleStopButton = { jest . fn }
302+ buttonProps = { { stop : { tooltipProps : { isVisible : true } } } }
303+ />
304+ ) ;
305+ // isVisible, so no need for click
306+ expect ( screen . getByRole ( 'tooltip' , { name : 'Stop' } ) ) . toBeTruthy ( ) ;
307+ } ) ;
274308 it ( 'can handle buttonProps props appropriately for stop' , async ( ) => {
275309 render (
276310 < MessageBar
@@ -317,6 +351,17 @@ describe('Message bar', () => {
317351 const input = screen . getByRole ( 'textbox' , { name : / I a m l i s t e n i n g / i } ) ;
318352 expect ( input ) . toBeTruthy ( ) ;
319353 } ) ;
354+ it ( 'can handle buttonProps tooltipProps appropriately for microphone' , ( ) => {
355+ render (
356+ < MessageBar
357+ onSendMessage = { jest . fn }
358+ hasMicrophoneButton
359+ buttonProps = { { microphone : { tooltipProps : { isVisible : true } } } }
360+ />
361+ ) ;
362+ // isVisible, so no need for click
363+ expect ( screen . getByRole ( 'tooltip' , { name : 'Use microphone' } ) ) . toBeTruthy ( ) ;
364+ } ) ;
320365 it ( 'can handle buttonProps props appropriately for microphone' , async ( ) => {
321366 mockSpeechRecognition ( ) ;
322367 render (
0 commit comments