@@ -419,8 +419,45 @@ describe("Slots", () => {
419419 . find ( "div[id='content-6'] > .ui5-shellbar-separator-end" )
420420 . should ( "not.exist" ) ;
421421 } ) ;
422- } ) ;
423422
423+ it ( "Should hide separators at S breakpoint regardless of content visibility" , ( ) => {
424+ cy . viewport ( 1920 , 1080 ) ;
425+
426+ cy . mount (
427+ < ShellBar id = "shellbar" primaryTitle = "Product Title" >
428+ < Button slot = "content" > Start Button 1</ Button >
429+ < Button slot = "content" > Start Button 2</ Button >
430+ < ShellBarSpacer slot = "content" />
431+ < Button slot = "content" > End Button 1</ Button >
432+ < Button slot = "content" > End Button 2</ Button >
433+ </ ShellBar >
434+ ) ;
435+
436+ // At large viewport, separators should be visible
437+ cy . get ( "[ui5-shellbar]" ) // get the shellbar again to reset the DOM ref after remount
438+ . shadow ( )
439+ . find ( ".ui5-shellbar-content-items > .ui5-shellbar-separator-start" )
440+ . should ( "exist" ) ;
441+ cy . get ( "[ui5-shellbar]" )
442+ . shadow ( )
443+ . find ( ".ui5-shellbar-content-items > .ui5-shellbar-separator-end" )
444+ . should ( "exist" ) ;
445+
446+ // Resize to S breakpoint (< 600px)
447+ cy . viewport ( 500 , 1080 ) ;
448+
449+ // At S breakpoint, separators should be hidden even if content items are still visible
450+ cy . get ( "[ui5-shellbar]" ) . should ( "have.prop" , "breakpointSize" , "S" ) ;
451+ cy . get ( "[ui5-shellbar]" )
452+ . shadow ( )
453+ . find ( ".ui5-shellbar-content-items > .ui5-shellbar-separator-start" )
454+ . should ( "not.exist" ) ;
455+ cy . get ( "[ui5-shellbar]" )
456+ . shadow ( )
457+ . find ( ".ui5-shellbar-content-items > .ui5-shellbar-separator-end" )
458+ . should ( "not.exist" ) ;
459+ } ) ;
460+ } ) ;
424461 describe ( "Search field slot" , ( ) => {
425462 it ( "Test search button is not visible when the search field slot is empty" , ( ) => {
426463 cy . mount (
0 commit comments