@@ -537,11 +537,9 @@ describe('Layout', () => {
537537
538538 it ( 'decreases size when inlining wide side elements' , ( ) => {
539539 const items = [
540- { id : 1 , type : 'probe' , position : 'side' , width : - 2 } ,
541- { id : 2 , type : 'probe' , position : 'side' , width : - 1 } ,
542- { id : 3 , type : 'probe' , position : 'side' } ,
543- { id : 4 , type : 'probe' , position : 'side' , width : 1 } ,
544- { id : 5 , type : 'probe' , position : 'side' , width : 2 }
540+ { id : 1 , type : 'probe' , position : 'side' } ,
541+ { id : 2 , type : 'probe' , position : 'side' , width : 1 } ,
542+ { id : 3 , type : 'probe' , position : 'side' , width : 2 }
545543 ] ;
546544 window . matchMedia . mockViewportWidth ( 500 ) ;
547545 const { container} = renderInEntry (
@@ -564,17 +562,15 @@ describe('Layout', () => {
564562 ) ;
565563
566564 expect ( container . textContent ) . toEqual (
567- '[inline xs 1 ][inline sm 2 ][inline md 3 4 ][inline lg 5 ]'
565+ '[inline md 1 2 ][inline lg 3 ]'
568566 ) ;
569567 } ) ;
570568
571569 it ( 'decreases size when inlining wide sticky elements' , ( ) => {
572570 const items = [
573- { id : 1 , type : 'probe' , position : 'sticky' , width : - 2 } ,
574- { id : 2 , type : 'probe' , position : 'sticky' , width : - 1 } ,
575- { id : 3 , type : 'probe' , position : 'sticky' } ,
576- { id : 4 , type : 'probe' , position : 'sticky' , width : 1 } ,
577- { id : 5 , type : 'probe' , position : 'sticky' , width : 2 }
571+ { id : 1 , type : 'probe' , position : 'sticky' } ,
572+ { id : 2 , type : 'probe' , position : 'sticky' , width : 1 } ,
573+ { id : 3 , type : 'probe' , position : 'sticky' , width : 2 }
578574 ] ;
579575 window . matchMedia . mockViewportWidth ( 500 ) ;
580576 const { container} = renderInEntry (
@@ -597,9 +593,10 @@ describe('Layout', () => {
597593 ) ;
598594
599595 expect ( container . textContent ) . toEqual (
600- '[inline xs 1 ][inline sm 2 ][inline md 3 4 ][inline lg 5 ]'
596+ '[inline md 1 2 ][inline lg 3 ]'
601597 ) ;
602598 } ) ;
599+
603600 } ) ;
604601
605602 describe ( 'in center variant' , ( ) => {
@@ -1384,6 +1381,56 @@ describe('Layout', () => {
13841381
13851382 expect ( findParentWithClass ( getByTestId ( 'probe' ) , twoColumnStyles [ 'restrict-xs' ] ) ) . not . toBeNull ( ) ;
13861383 } ) ;
1384+
1385+ it ( 'does not decrease size of inlined side element with width below md' , ( ) => {
1386+ const items = [
1387+ { id : 2 , type : 'probe' , position : 'side' , width : - 2 }
1388+ ] ;
1389+ window . matchMedia . mockViewportWidth ( 500 ) ;
1390+ const { getByTestId} = renderInEntry (
1391+ < Layout sectionProps = { { layout : 'left' } } items = { items } >
1392+ { children => children }
1393+ </ Layout > ,
1394+ {
1395+ seed : {
1396+ themeOptions : {
1397+ properties : {
1398+ root : {
1399+ twoColumnStickyBreakpoint : '950px'
1400+ }
1401+ }
1402+ }
1403+ }
1404+ }
1405+ ) ;
1406+
1407+ expect ( findParentWithClass ( getByTestId ( 'probe' ) , twoColumnStyles [ 'restrict-xs' ] ) ) . not . toBeNull ( ) ;
1408+ } ) ;
1409+
1410+ it ( 'does not decrease size of inlined sticky element with width below md' , ( ) => {
1411+ const items = [
1412+ { id : 2 , type : 'probe' , position : 'sticky' , width : - 2 }
1413+ ] ;
1414+ window . matchMedia . mockViewportWidth ( 500 ) ;
1415+ const { getByTestId} = renderInEntry (
1416+ < Layout sectionProps = { { layout : 'left' } } items = { items } >
1417+ { children => children }
1418+ </ Layout > ,
1419+ {
1420+ seed : {
1421+ themeOptions : {
1422+ properties : {
1423+ root : {
1424+ twoColumnStickyBreakpoint : '950px'
1425+ }
1426+ }
1427+ }
1428+ }
1429+ }
1430+ ) ;
1431+
1432+ expect ( findParentWithClass ( getByTestId ( 'probe' ) , twoColumnStyles [ 'restrict-xs' ] ) ) . not . toBeNull ( ) ;
1433+ } ) ;
13871434 } ) ;
13881435
13891436 describe ( 'width classes in centered variant' , ( ) => {
0 commit comments