@@ -10,6 +10,7 @@ module Testable.Element exposing
15 , expectRoundedEquality
16 , expectRoundedEquality
@@ -20,6 +21,7 @@ module Testable.Element exposing
20 , isVisible
21 , isVisible
25 , moveDown
27 , moveDown
@@ -36,10 +38,14 @@ module Testable.Element exposing
42 , textColumn
47 , textColumn
43 , transparent
49 , transparent
@@ -63,11 +69,16 @@ import Testable
63import Testable.Runner
69import Testable.Runner
72+{-| This is used when we want to run all tests in a test suite instead of one at a time.
74+toProgram : Testable.Runner.Testable -> Testable.Runner.TestableProgram
76+ Testable.Runner.program [ testable ]
66−layout : List (Testable.Attr msg) -> Testable.Element Testable.Runner.Msg -> Testable.Runner.TestableProgram
79+layout : List (Testable.Attr msg) -> Testable.Element Testable.Runner.Msg -> Testable.Runner.Testable
67layout attrs elem =
80layout attrs elem =
68− Testable.Runner.program
81+ Testable.Runner.testable "Test" elem
69− [ ( "Tests Run", elem )
73text : String -> Testable.Element msg
84text : String -> Testable.Element msg
@@ -96,13 +107,60 @@ none =
98paragraph : List (Testable.Attr msg) -> List (Testable.Element msg) -> Testable.Element msg
109paragraph : List (Testable.Attr msg) -> List (Testable.Element msg) -> Testable.Element msg
99−paragraph =
110+paragraph attrs =
113+ implicitTest (widthHelper Nothing Nothing (Fill 1))
114+ :: implicitTest (heightHelper Nothing Nothing Shrink)
100− Testable.Paragraph
117+ Testable.Paragraph (skipOverridden withImplicits)
103textColumn : List (Testable.Attr msg) -> List (Testable.Element msg) -> Testable.Element msg
120textColumn : List (Testable.Attr msg) -> List (Testable.Element msg) -> Testable.Element msg
104textColumn attrs =
121textColumn attrs =
124+ implicitTest (widthHelper (Just 500) (Just 750) (Fill 1))
125+ :: implicitTest (heightHelper Nothing Nothing Shrink)
128+ Testable.TextColumn (skipOverridden withImplicits)
132+ List (Testable.Attr msg)
135+ , label : Testable.Element msg
137+ -> Testable.Element msg
139+ Testable.Link details.url
105− Testable.TextColumn (implicitWidthHeightShrink attrs)
140+ (implicitWidthHeightShrink attrs)
145+ Testable.Attr Element.clip
149+scrollbars : Testable.Attr msg
151+ Testable.Attr Element.scrollbars
155+scrollbarY : Testable.Attr msg
157+ Testable.Attr Element.scrollbarY
161+scrollbarX : Testable.Attr msg
163+ Testable.Attr Element.scrollbarX
108{-| Old labeling mechanism that i removed to hastily
166{-| Old labeling mechanism that i removed to hastily
@@ -276,6 +334,11 @@ paddingXY x y =
338+ List.filter Tuple.first ls
339+ |> List.map Tuple.second
279widthHelper maybeMin maybeMax len =
342widthHelper maybeMin maybeMax len =
281 addMin l =
344 addMin l =
@@ -344,7 +407,10 @@ widthHelper maybeMin maybeMax len =
346 \found ->
409 \found ->
410+ [ expectRoundedEquality
411+ { expected = toFloat val
347− [ Testable.true "exact width is exact" (floor found.self.bbox.width == val)
412+ , found = found.self.bbox.width
348 , Testable.true "min/max is upheld" (minMaxTest (floor found.self.bbox.width))
414 , Testable.true "min/max is upheld" (minMaxTest (floor found.self.bbox.width))
@@ -366,7 +432,7 @@ widthHelper maybeMin maybeMax len =
368 \context ->
434 \context ->
369− if List.member context.location [ Testable.IsNearby Testable.OnRight, Testable.IsNearby Testable.OnLeft ] then
435+ if List.member context.parentLayout [ Testable.IsNearby Testable.OnRight, Testable.IsNearby Testable.OnLeft ] then
370 [ Testable.true "width fill doesn't apply to onright/onleft elements" True ]
436 [ Testable.true "width fill doesn't apply to onright/onleft elements" True ]
@@ -374,33 +440,93 @@ widthHelper maybeMin maybeMax len =
374 parentAvailableWidth =
440 parentAvailableWidth =
375 context.parent.bbox.width - (context.self.bbox.padding.left + context.self.bbox.padding.right)
441 context.parent.bbox.width - (context.self.bbox.padding.left + context.self.bbox.padding.right)
377− [ case context.location of
444+ [ case context.parentLayout of
378− Testable.IsNearby _ ->
445+ Testable.IsNearby _ ->
379− Testable.true "Nearby Element has fill width"
446+ [ Testable.true "Nearby Element has fill width"
380− ((floor context.parent.bbox.width == floor context.self.bbox.width)
447+ ((floor context.parent.bbox.width == floor context.self.bbox.width)
381− || minMaxTest (floor context.self.bbox.width)
448+ || minMaxTest (floor context.self.bbox.width)
384− Testable.InColumn ->
452+ Testable.InColumn ->
385− Testable.true "Element within column has fill width"
453+ [ Testable.true "Element within column has fill width"
386− ((floor parentAvailableWidth == floor context.self.bbox.width)
454+ ((floor parentAvailableWidth == floor context.self.bbox.width)
387− || minMaxTest (floor context.self.bbox.width)
455+ || minMaxTest (floor context.self.bbox.width)
390− Testable.InEl ->
459+ Testable.InEl ->
391− Testable.true "Element within element has fill width" <|
460+ [ Testable.true "Element within element has fill width" <|
392− (floor parentAvailableWidth == floor context.self.bbox.width)
461+ (floor parentAvailableWidth == floor context.self.bbox.width)
393− || minMaxTest (floor context.self.bbox.width)
462+ || minMaxTest (floor context.self.bbox.width)
397− spacePerPortion =
467+ spacePerPortion =
398− parentAvailableWidth / toFloat (List.length context.siblings + 1)
468+ parentAvailableWidth / toFloat (List.length context.siblings + 1)
400− Testable.true "element has fill width" <|
470+ [ Testable.true "element has fill width" <|
401− (floor spacePerPortion == floor context.self.bbox.width)
471+ (floor spacePerPortion == floor context.self.bbox.width)
402− || minMaxTest (floor context.self.bbox.width)
472+ || minMaxTest (floor context.self.bbox.width)
474+ , [ Testable.lessThanOrEqual "not larger than parent"
475+ context.self.bbox.width
476+ context.parent.bbox.width
478+ , case context.selfElement of
479+ Testable.Paragraph _ _ ->
480+ -- A paragraph with width fill
481+ -- we want to test for correct text wrapping here.
489+ |> List.map childWidth
490+ |> List.append (List.map .width context.self.textMetrics)
494+ context.self.bbox.padding.left + context.self.bbox.padding.right
496+ totalCalculatedWidth =
497+ totalChildren + horizontalPadding
500+ if boxChildrenHeight > 20 then
501+ ceiling (boxChildrenHeight / 20)
504+ ceiling (totalCalculatedWidth / context.self.bbox.width)
514+ [ Testable.true "text wrapping, checking height"
515+ -- all we're doing here is testing if wrapping is occurring
516+ -- not the exact height, which is a little tricky to calculate perfectly without more information.
517+ (if expectedLines > 1 then
518+ context.self.bbox.height >= (20 * 2)
521+ -- then it's less than 2 ~ line heights
522+ -- there's some weird variance here which makes it hard to be exact.
523+ context.self.bbox.height < (20 * 2)
406 Shrink ->
532 Shrink ->
@@ -415,36 +541,208 @@ widthHelper maybeMin maybeMax len =
415 , id = Testable.IsWidth
541 , id = Testable.IsWidth
417 \context ->
543 \context ->
544+ case context.selfElement of
419− childWidth child =
547+ childWidth child =
420− -- TODO: add margin values to widths
421− child.bbox.width
548+ child.bbox.width
423− totalChildren =
550+ totalChildren =
424− context.children
551+ context.children
425− |> List.map childWidth
552+ |> List.map childWidth
553+ |> List.append (List.map .width context.self.textMetrics)
426− |> List.sum
554+ |> List.sum
428− horizontalPadding =
556+ horizontalPadding =
429− context.self.bbox.padding.left + context.self.bbox.padding.right
557+ context.self.bbox.padding.left + context.self.bbox.padding.right
432− toFloat context.parentSpacing * (toFloat (List.length context.children) - 1)
434− if totalChildren == 0 then
559+ listIf
435− -- TODO: The issue is that we have a hard time measuring `text` elements
560+ [ ( (context.parentLayout /= Testable.InParagraph)
436− -- So if a element has a text child, then it's width isn't going to show up in the system.
561+ && (context.parentLayout /= Testable.InTextCol)
437− [ Testable.Todo "Calculate text size for width-shrink calculation"
562+ , Testable.rounded "equals children"
563+ { expected = totalChildren + horizontalPadding
564+ , found = context.self.bbox.width
567+ , ( context.parentLayout /= Testable.AtRoot
568+ , Testable.lessThanOrEqual "not larger than parent"
569+ context.self.bbox.width
570+ context.parent.bbox.width
440− else
574+ Testable.Link _ _ _ ->
441− -- This fails if this element is actually a column
575+ let
442− -- So we need to capture what this element is in order to do this calculation.
576+ childWidth child =
581+ |> List.map childWidth
582+ |> List.append (List.map .width context.self.textMetrics)
586+ context.self.bbox.padding.left + context.self.bbox.padding.right
589+ [ ( (context.parentLayout /= Testable.InParagraph)
590+ && (context.parentLayout /= Testable.InTextCol)
591+ , Testable.rounded "equals children"
592+ { expected = totalChildren + horizontalPadding
593+ , found = context.self.bbox.width
596+ , ( context.parentLayout /= Testable.AtRoot
597+ , Testable.lessThanOrEqual "not larger than parent"
598+ context.self.bbox.width
599+ context.parent.bbox.width
603+ Testable.Row rowAttrs _ ->
604+ -- width of row is the sum of all children widths
605+ -- both text elements and others.
612+ |> List.map childWidth
613+ |> List.append (List.map .width context.self.textMetrics)
617+ context.self.bbox.padding.left + context.self.bbox.padding.right
620+ Testable.getSpacingFromAttributes rowAttrs
623+ toFloat spacingAmount * (toFloat (List.length context.children) - 1)
627+ , expectRoundedEquality
628+ { expected = totalChildren + horizontalPadding + totalSpacing
629+ , found = context.self.bbox.width
632+ , ( context.parentLayout /= Testable.AtRoot
633+ , Testable.lessThanOrEqual "not larger than parent"
634+ context.self.bbox.width
635+ context.parent.bbox.width
639+ Testable.Column _ _ ->
640+ -- The width of the column is the width of the widest child.
644+ + context.self.bbox.padding.left
645+ + context.self.bbox.padding.right
651+ + context.self.bbox.padding.left
652+ + context.self.bbox.padding.right
654+ context.self.textMetrics
658+ |> List.map childWidth
659+ |> List.append textChildren
663+ , expectRoundedEquality
664+ { expected = Maybe.withDefault 0 (List.maximum allChildren)
665+ , found = context.self.bbox.width
668+ , ( context.parentLayout /= Testable.AtRoot
669+ , Testable.lessThanOrEqual "not larger than parent"
670+ context.self.bbox.width
671+ context.parent.bbox.width
675+ Testable.TextColumn _ _ ->
676+ -- The width of the column is the width of the widest child.
680+ + context.self.bbox.padding.left
681+ + context.self.bbox.padding.right
687+ + context.self.bbox.padding.left
688+ + context.self.bbox.padding.right
690+ context.self.textMetrics
694+ |> List.map childWidth
695+ |> List.append textChildren
699+ , expectRoundedEquality
700+ { expected = Maybe.withDefault 0 (List.maximum allChildren)
701+ , found = context.self.bbox.width
704+ , ( context.parentLayout /= Testable.AtRoot
705+ , Testable.lessThanOrEqual "not larger than parent"
706+ context.self.bbox.width
707+ context.parent.bbox.width
711+ Testable.Paragraph _ _ ->
712+ -- This should be the size it's text,
713+ -- unless it takes up all available space, in which case it should wrap.
720+ |> List.map childWidth
721+ |> List.append (List.map .width context.self.textMetrics)
725+ context.self.bbox.padding.left + context.self.bbox.padding.right
443− [ expectRoundedEquality
729+ , expectRoundedEquality
444− { expected = totalChildren + horizontalPadding + spacingValue
730+ { expected = totalChildren + horizontalPadding
445− , found = context.self.bbox.width
731+ , found = context.self.bbox.width
734+ , ( context.parentLayout /= Testable.AtRoot
735+ , Testable.lessThanOrEqual "not larger than parent"
736+ context.self.bbox.width
737+ context.parent.bbox.width
@@ -516,8 +814,10 @@ heightHelper maybeMin maybeMax len =
516 , id = Testable.IsHeight
814 , id = Testable.IsHeight
518 \found ->
816 \found ->
519− [ Testable.true ("exact height is exact: " ++ String.fromInt (floor found.self.bbox.height) ++ "," ++ String.fromInt val)
817+ [ expectRoundedEquality
818+ { expected = toFloat val
520− (floor found.self.bbox.height == val)
819+ , found = found.self.bbox.height
521 , Testable.true "min/max holds true"
821 , Testable.true "min/max holds true"
522 (minMaxTest (floor found.self.bbox.height))
822 (minMaxTest (floor found.self.bbox.height))
@@ -535,7 +835,7 @@ heightHelper maybeMin maybeMax len =
535 , id = Testable.IsHeight
835 , id = Testable.IsHeight
537 \context ->
837 \context ->
538− [ if List.member context.location [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
838+ [ if List.member context.parentLayout [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
539 Testable.true "height fill doesn't apply to above/below elements" True
839 Testable.true "height fill doesn't apply to above/below elements" True
@@ -543,7 +843,7 @@ heightHelper maybeMin maybeMax len =
543 parentAvailableHeight =
843 parentAvailableHeight =
544 context.parent.bbox.height - (context.self.bbox.padding.top + context.self.bbox.padding.bottom)
844 context.parent.bbox.height - (context.self.bbox.padding.top + context.self.bbox.padding.bottom)
546− case context.location of
846+ case context.parentLayout of
547 Testable.IsNearby _ ->
847 Testable.IsNearby _ ->
548 Testable.true "Nearby Element has fill height"
848 Testable.true "Nearby Element has fill height"
549 ((floor context.parent.bbox.height == floor context.self.bbox.height)
849 ((floor context.parent.bbox.height == floor context.self.bbox.height)
@@ -584,36 +884,131 @@ heightHelper maybeMin maybeMax len =
584 , id = Testable.IsHeight
884 , id = Testable.IsHeight
586 \context ->
886 \context ->
887+ case context.selfElement of
588− childHeight child =
890+ childHeight child =
589− -- TODO: add margin values to heights
590− child.bbox.height
891+ child.bbox.height
593− context.children
893+ if List.isEmpty context.children then
594− |> List.map childHeight
894+ -- context.self.textMetrics
895+ -- |> List.map Testable.textHeight
595− |> List.sum
896+ -- |> List.sum
596−
897+ -- TODO: apparently the font metrics we have are for the literal characters rendered
597− verticalPadding =
898+ -- not for the font itself.
598− context.self.bbox.padding.top + context.self.bbox.padding.bottom
899+ [ Testable.todo "calculate height from actual text metrics"
601− toFloat context.parentSpacing * (toFloat (List.length context.children) - 1)
603− if totalChildren == 0 then
604− -- TODO: The issue is that we have a hard time measuring `text` elements
605− -- So if a element has a text child, then it's height isn't going to show up in the system.
606− [ Testable.Todo "Calculate expected height shrink"
610− -- This fails if this element is actually a column
903+ [ expectRoundedEquality
611− -- So we need to capture what this element is in order to do this calculation.
904+ { expected =
906+ |> List.map childHeight
908+ |> (\h -> h + context.self.bbox.padding.top + context.self.bbox.padding.bottom)
909+ , found = context.self.bbox.height
911+ , Testable.lessThanOrEqual "not larger than parent"
912+ context.self.bbox.height
913+ context.parent.bbox.height
916+ Testable.Link _ _ _ ->
921+ if List.isEmpty context.children then
922+ -- context.self.textMetrics
923+ -- |> List.map Testable.textHeight
925+ -- TODO: apparently the font metrics we have are for the literal characters rendered
926+ -- not for the font itself.
927+ [ Testable.todo "calculate height from actual text metrics"
931+ [ expectRoundedEquality
934+ |> List.map childHeight
936+ |> (\h -> h + context.self.bbox.padding.top + context.self.bbox.padding.bottom)
937+ , found = context.self.bbox.height
939+ , Testable.lessThanOrEqual "not larger than parent"
940+ context.self.bbox.height
941+ context.parent.bbox.height
949+ if List.isEmpty context.children then
950+ -- context.self.textMetrics
951+ -- |> List.map Testable.textHeight
953+ -- TODO: apparently the font metrics we have are for the literal characters rendered
954+ -- not for the font itself.
955+ [ Testable.todo "calculate height from actual text metrics" ]
958+ [ expectRoundedEquality
961+ |> List.map childHeight
963+ |> Maybe.withDefault 0
964+ |> (\h -> h + context.self.bbox.padding.top + context.self.bbox.padding.bottom)
965+ , found = context.self.bbox.height
967+ , Testable.lessThanOrEqual "not larger than parent"
968+ context.self.bbox.height
969+ context.parent.bbox.height
972+ Testable.Column colAttrs _ ->
979+ |> List.map childHeight
980+ |> List.append (List.map Testable.textHeight context.self.textMetrics)
984+ context.self.bbox.padding.top + context.self.bbox.padding.bottom
987+ Testable.getSpacingFromAttributes colAttrs
990+ toFloat spacingAmount * (toFloat (List.length context.children) - 1)
612− [ expectRoundedEquality
992+ [ expectRoundedEquality
613− { expected = totalChildren + verticalPadding + spacingValue
993+ { expected = totalChildren + verticalPadding + totalSpacing
614− , found = context.self.bbox.height
994+ , found = context.self.bbox.height
996+ , Testable.lessThanOrEqual "not larger than parent"
997+ context.self.bbox.height
998+ context.parent.bbox.height
1001+ Testable.TextColumn _ _ ->
1004+ Testable.Paragraph _ _ ->
@@ -716,11 +1111,11 @@ alignLeft =
716 , id = Testable.NoId
1111 , id = Testable.NoId
717 , test =
1112 , test =
718 \found ->
1113 \found ->
719− [ if List.member found.location [ Testable.IsNearby Testable.OnLeft, Testable.IsNearby Testable.OnRight ] then
1114+ [ if List.member found.parentLayout [ Testable.IsNearby Testable.OnLeft, Testable.IsNearby Testable.OnRight ] then
720 Testable.true "alignLeft doesn't apply to elements that are onLeft or onRight" True
1115 Testable.true "alignLeft doesn't apply to elements that are onLeft or onRight" True
723− List.member found.location
1118+ List.member found.parentLayout
724 [ Testable.IsNearby Testable.InFront
1119 [ Testable.IsNearby Testable.InFront
725 , Testable.IsNearby Testable.Behind
1120 , Testable.IsNearby Testable.Behind
726 , Testable.IsNearby Testable.Above
1121 , Testable.IsNearby Testable.Above
@@ -739,7 +1134,7 @@ alignLeft =
742− case found.location of
1137+ case found.parentLayout of
743 Testable.InRow ->
1138 Testable.InRow ->
745 siblingsOnLeft =
1140 siblingsOnLeft =
@@ -785,7 +1180,7 @@ centerX =
785 parentCenter =
1180 parentCenter =
786 found.parent.bbox.left + (found.parent.bbox.width / 2)
1181 found.parent.bbox.left + (found.parent.bbox.width / 2)
788− if List.member found.location [ Testable.IsNearby Testable.OnRight, Testable.IsNearby Testable.OnLeft ] then
1183+ if List.member found.parentLayout [ Testable.IsNearby Testable.OnRight, Testable.IsNearby Testable.OnLeft ] then
789 [ Testable.true "centerX doesn't apply to elements that are onLeft or onRight" True ]
1184 [ Testable.true "centerX doesn't apply to elements that are onLeft or onRight" True ]
791 else if List.length found.siblings == 0 then
1186 else if List.length found.siblings == 0 then
@@ -796,7 +1191,7 @@ centerX =
799− case found.location of
1194+ case found.parentLayout of
800 Testable.InRow ->
1195 Testable.InRow ->
802 siblingsOnLeft =
1197 siblingsOnLeft =
@@ -850,11 +1245,11 @@ alignRight =
850 , id = Testable.NoId
1245 , id = Testable.NoId
851 , test =
1246 , test =
852 \found ->
1247 \found ->
853− if List.member found.location [ Testable.IsNearby Testable.OnLeft, Testable.IsNearby Testable.OnRight ] then
1248+ if List.member found.parentLayout [ Testable.IsNearby Testable.OnLeft, Testable.IsNearby Testable.OnRight ] then
854 [ Testable.true "alignRight doesn't apply to elements that are onLeft or onRight" True ]
1249 [ Testable.true "alignRight doesn't apply to elements that are onLeft or onRight" True ]
857− List.member found.location
1252+ List.member found.parentLayout
858 [ Testable.IsNearby Testable.InFront
1253 [ Testable.IsNearby Testable.InFront
859 , Testable.IsNearby Testable.Behind
1254 , Testable.IsNearby Testable.Behind
860 , Testable.IsNearby Testable.Above
1255 , Testable.IsNearby Testable.Above
@@ -875,7 +1270,7 @@ alignRight =
878− case found.location of
1273+ case found.parentLayout of
879 Testable.InRow ->
1274 Testable.InRow ->
881 siblingsOnRight =
1276 siblingsOnRight =
@@ -913,11 +1308,11 @@ alignTop =
913 , id = Testable.NoId
1308 , id = Testable.NoId
914 , test =
1309 , test =
915 \found ->
1310 \found ->
916− if List.member found.location [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
1311+ if List.member found.parentLayout [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
917 [ Testable.true "alignTop doesn't apply to elements that are above or below" True ]
1312 [ Testable.true "alignTop doesn't apply to elements that are above or below" True ]
920− List.member found.location
1315+ List.member found.parentLayout
921 [ Testable.IsNearby Testable.InFront
1316 [ Testable.IsNearby Testable.InFront
922 , Testable.IsNearby Testable.Behind
1317 , Testable.IsNearby Testable.Behind
923 , Testable.IsNearby Testable.OnRight
1318 , Testable.IsNearby Testable.OnRight
@@ -938,7 +1333,7 @@ alignTop =
941− case found.location of
1336+ case found.parentLayout of
942 Testable.InColumn ->
1337 Testable.InColumn ->
944 siblingsAbove =
1339 siblingsAbove =
@@ -976,11 +1371,11 @@ alignBottom =
976 , id = Testable.NoId
1371 , id = Testable.NoId
977 , test =
1372 , test =
978 \found ->
1373 \found ->
979− if List.member found.location [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
1374+ if List.member found.parentLayout [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
980 [ Testable.true "alignBottom doesn't apply to elements that are above or below" True ]
1375 [ Testable.true "alignBottom doesn't apply to elements that are above or below" True ]
983− List.member found.location
1378+ List.member found.parentLayout
984 [ Testable.IsNearby Testable.InFront
1379 [ Testable.IsNearby Testable.InFront
985 , Testable.IsNearby Testable.Behind
1380 , Testable.IsNearby Testable.Behind
986 , Testable.IsNearby Testable.OnRight
1381 , Testable.IsNearby Testable.OnRight
@@ -1001,7 +1396,7 @@ alignBottom =
1004− case found.location of
1399+ case found.parentLayout of
1005 Testable.InColumn ->
1400 Testable.InColumn ->
1007 siblingsBelow =
1402 siblingsBelow =
@@ -1058,7 +1453,7 @@ centerY =
1058 parentCenter =
1453 parentCenter =
1059 found.parent.bbox.top + (found.parent.bbox.height / 2)
1454 found.parent.bbox.top + (found.parent.bbox.height / 2)
1061− if List.member found.location [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
1456+ if List.member found.parentLayout [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
1062 [ Testable.true "centerY doesn't apply to elements that are above or below" True ]
1457 [ Testable.true "centerY doesn't apply to elements that are above or below" True ]
1064 else if List.length found.siblings == 0 then
1459 else if List.length found.siblings == 0 then
@@ -1069,7 +1464,7 @@ centerY =
1072− case found.location of
1467+ case found.parentLayout of
1073 Testable.InColumn ->
1468 Testable.InColumn ->
1075 siblingsOnTop =
1470 siblingsOnTop =