@@ -512,6 +512,76 @@ describe("Timeline - getFocusDomRef", () => {
512512 } ) ;
513513} ) ;
514514
515+ describe ( "TimelineItem iconTooltip" , ( ) => {
516+ it ( "should render tooltip on the icon when iconTooltip is set" , ( ) => {
517+ cy . mount (
518+ < Timeline >
519+ < TimelineItem
520+ id = "itemWithTooltip"
521+ titleText = "Deployment"
522+ icon = { accept }
523+ iconTooltip = "Success"
524+ >
525+ Deployed successfully.
526+ </ TimelineItem >
527+ </ Timeline >
528+ ) ;
529+
530+ cy . get ( "#itemWithTooltip" )
531+ . shadow ( )
532+ . find ( "[ui5-icon]" )
533+ . should ( "have.attr" , "show-tooltip" )
534+ . and ( "exist" ) ;
535+
536+ cy . get ( "#itemWithTooltip" )
537+ . shadow ( )
538+ . find ( "[ui5-icon]" )
539+ . should ( "have.attr" , "accessible-name" , "Success" ) ;
540+ } ) ;
541+
542+ it ( "should not render tooltip on icon when iconTooltip is not set" , ( ) => {
543+ cy . mount (
544+ < Timeline >
545+ < TimelineItem
546+ id = "itemWithoutTooltip"
547+ titleText = "Deployment"
548+ icon = { accept }
549+ >
550+ Deployed successfully.
551+ </ TimelineItem >
552+ </ Timeline >
553+ ) ;
554+
555+ cy . get ( "#itemWithoutTooltip" )
556+ . shadow ( )
557+ . find ( "[ui5-icon]" )
558+ . should ( "not.have.attr" , "show-tooltip" ) ;
559+ } ) ;
560+
561+ it ( "should include iconTooltip in the accessible label of the bubble" , ( ) => {
562+ cy . mount (
563+ < Timeline >
564+ < TimelineItem
565+ id = "itemAccLabel"
566+ titleText = "Build"
567+ subtitleText = "Step 1"
568+ icon = { accept }
569+ iconTooltip = "Passed"
570+ name = "CI Pipeline"
571+ >
572+ Build completed.
573+ </ TimelineItem >
574+ </ Timeline >
575+ ) ;
576+
577+ cy . get ( "#itemAccLabel" )
578+ . shadow ( )
579+ . find ( ".ui5-tli-bubble" )
580+ . should ( "have.attr" , "aria-label" )
581+ . and ( "include" , "Passed" ) ;
582+ } ) ;
583+ } ) ;
584+
515585describe ( "Timeline Header Bar" , ( ) => {
516586 describe ( "Search functionality" , ( ) => {
517587 it ( "should show header bar when slotted" , ( ) => {
0 commit comments