@@ -615,4 +615,125 @@ describe('Grid Pin Outlines', () => {
615
615
bottom : { x : 1781.5 , y : 555.5 , width : 1 , height : 5 } ,
616
616
} )
617
617
} )
618
+
619
+ it ( 'pinned top and left, grid rows and columns fully specified and not absolutely positioned, with a row start span' , async ( ) => {
620
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
621
+ top : 5 ,
622
+ left : 12 ,
623
+ gridRowStart : 'span 2' ,
624
+ gridColumnStart : 3 ,
625
+ gridRowEnd : 2 ,
626
+ gridColumnEnd : 3 ,
627
+ width : 50 ,
628
+ height : 50 ,
629
+ } )
630
+ expect ( result ) . toEqual ( { } )
631
+ } )
632
+ it ( 'pinned top and left, grid rows and columns fully specified and absolutely positioned, with a row start span' , async ( ) => {
633
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
634
+ position : 'absolute' ,
635
+ top : 5 ,
636
+ left : 12 ,
637
+ gridRowStart : 'span 2' ,
638
+ gridColumnStart : 3 ,
639
+ gridRowEnd : 2 ,
640
+ gridColumnEnd : 3 ,
641
+ width : 50 ,
642
+ height : 50 ,
643
+ } )
644
+ expect ( result ) . toEqual ( {
645
+ left : { x : 688.5 , y : 190.5 , width : 12 , height : 1 } ,
646
+ top : { x : 725.5 , y : 160.5 , width : 1 , height : 5 } ,
647
+ } )
648
+ } )
649
+ it ( 'pinned bottom and right, grid rows and columns fully specified and not absolutely positioned, with a row start span' , async ( ) => {
650
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
651
+ bottom : 5 ,
652
+ right : 12 ,
653
+ gridRowStart : 'span 2' ,
654
+ gridColumnStart : 3 ,
655
+ gridRowEnd : 2 ,
656
+ gridColumnEnd : 3 ,
657
+ width : 50 ,
658
+ height : 50 ,
659
+ } )
660
+ expect ( result ) . toEqual ( { } )
661
+ } )
662
+ it ( 'pinned bottom and right, grid rows and columns fully specified and absolutely positioned, with a row start span' , async ( ) => {
663
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
664
+ position : 'absolute' ,
665
+ bottom : 5 ,
666
+ right : 12 ,
667
+ gridRowStart : 'span 2' ,
668
+ gridColumnStart : 3 ,
669
+ gridRowEnd : 2 ,
670
+ gridColumnEnd : 3 ,
671
+ width : 50 ,
672
+ height : 50 ,
673
+ } )
674
+ expect ( result ) . toEqual ( {
675
+ right : { x : 777.5 , y : 240.5 , width : 12 , height : 1 } ,
676
+ bottom : { x : 751.5 , y : 266.5 , width : 1 , height : 5 } ,
677
+ } )
678
+ } )
679
+ it ( 'pinned top and left, grid rows and columns fully specified and not absolutely positioned, with a row end span' , async ( ) => {
680
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
681
+ top : 5 ,
682
+ left : 12 ,
683
+ gridRowStart : 2 ,
684
+ gridColumnStart : 3 ,
685
+ gridRowEnd : 'span 2' ,
686
+ gridColumnEnd : 3 ,
687
+ width : 50 ,
688
+ height : 50 ,
689
+ } )
690
+ expect ( result ) . toEqual ( { } )
691
+ } )
692
+ it ( 'pinned top and left, grid rows and columns fully specified and absolutely positioned, with a row end span' , async ( ) => {
693
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
694
+ position : 'absolute' ,
695
+ top : 5 ,
696
+ left : 12 ,
697
+ gridRowStart : 2 ,
698
+ gridColumnStart : 3 ,
699
+ gridRowEnd : 'span 2' ,
700
+ gridColumnEnd : 3 ,
701
+ width : 50 ,
702
+ height : 50 ,
703
+ } )
704
+ expect ( result ) . toEqual ( {
705
+ left : { x : 688.5 , y : 315.5 , width : 12 , height : 1 } ,
706
+ top : { x : 725.5 , y : 285.5 , width : 1 , height : 5 } ,
707
+ } )
708
+ } )
709
+ it ( 'pinned bottom and right, grid rows and columns fully specified and not absolutely positioned, with a row end span' , async ( ) => {
710
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
711
+ bottom : 5 ,
712
+ right : 12 ,
713
+ gridRowStart : 2 ,
714
+ gridColumnStart : 3 ,
715
+ gridRowEnd : 'span 2' ,
716
+ gridColumnEnd : 3 ,
717
+ width : 50 ,
718
+ height : 50 ,
719
+ } )
720
+ expect ( result ) . toEqual ( { } )
721
+ } )
722
+ it ( 'pinned bottom and right, grid rows and columns fully specified and absolutely positioned, with a row end span' , async ( ) => {
723
+ const result = await testGridOutlines ( 'storyboard/scene/grid/grid-child' , {
724
+ position : 'absolute' ,
725
+ bottom : 5 ,
726
+ right : 12 ,
727
+ gridRowStart : 2 ,
728
+ gridColumnStart : 3 ,
729
+ gridRowEnd : 'span 2' ,
730
+ gridColumnEnd : 3 ,
731
+ width : 50 ,
732
+ height : 50 ,
733
+ } )
734
+ expect ( result ) . toEqual ( {
735
+ right : { x : 777.5 , y : 470.5 , width : 12 , height : 1 } ,
736
+ bottom : { x : 751.5 , y : 496.5 , width : 1 , height : 5 } ,
737
+ } )
738
+ } )
618
739
} )
0 commit comments