git.iko.soy/typeable/elm-ui
on master help sign in
testing: allow implicit width/height testing (and in the process break a lot of tests!)
commit80e267c8904f3af95ca273e36705b58ac6d3a6a9 authorElm UI Automation <automation@elm-ui.com> dateSun 3 May 2020, 10:55 (6 years ago) parent77e154e
6 files changed+246−73
tests-rendering/automation/run.js+1−1 tests-rendering/src/Testable.elm+19 tests-rendering/src/Testable/Element.elm+220−67 tests-rendering/src/Testable/Element/Background.elm+2−1 tests-rendering/src/Testable/Element/Font.elm+2−1 tests-rendering/src/Testable/Runner.elm+2−3
tests-rendering/automation/run.js+1−1
@@ -287,7 +287,7 @@ function print_results(label, tests) {
287287 }
288288 failed = failed + 1;
289289 console.log(" " + chalk.red("fail") + " ->");
290− console.log(" " + tests[i].results[j][1].description);
290+ console.log(" " + tests[i].results[j].description);
291291 }
292292 }
293293 total_passed = total_passed + passed;
tests-rendering/src/Testable.elm+19
@@ -1,5 +1,6 @@
11module Testable exposing
22 ( Attr(..)
3+ , AttributeId(..)
34 , BoundingBox
45 , Element(..)
56 , Found
@@ -42,11 +43,27 @@ type Element msg
4243 | Empty
4344
4445
46+{-| We have an attribute id in order to remove tests when an overriding attribtue is assigned.
47+
48+Basically, we want to implictly test for height/width shrink.
49+
50+But we want to skip this test if width/height is already set.
51+
52+This allows us to do that by comparing identities.
53+
54+-}
55+type AttributeId
56+ = NoId
57+ | IsWidth
58+ | IsHeight
59+
60+
4561type Attr msg
4662 = Attr (Element.Attribute msg)
4763 | AttrTest
4864 { test : Surroundings -> List LayoutExpectation
4965 , label : String
66+ , id : AttributeId
5067 }
5168 | Batch (List (Attr msg))
5269 | Spacing Int
@@ -60,6 +77,7 @@ type Attr msg
6077 { test : Surroundings -> List LayoutExpectation
6178 , label : String
6279 , attr : Element.Attribute msg
80+ , id : AttributeId
6381 }
6482
6583
@@ -627,6 +645,7 @@ createAttributeTest parent cache level attrIndex surroundings attr =
627645 { label = nearby.label
628646 , test =
629647 nearby.test
648+ , id = NoId
630649 }
631650 )
632651 nearby.element
tests-rendering/src/Testable/Element.elm+220−67
@@ -58,7 +58,6 @@ In order to run the test:
5858
5959import Dict
6060import Element
61−import Expect
6261import Html.Attributes
6362import Testable
6463import Testable.Runner
@@ -67,7 +66,7 @@ import Testable.Runner
6766layout : List (Testable.Attr msg) -> Testable.Element Testable.Runner.Msg -> Testable.Runner.TestableProgram
6867layout attrs elem =
6968 Testable.Runner.program
70− [ ( "Open Case", elem )
69+ [ ( "Tests Run", elem )
7170 ]
7271
7372
@@ -77,18 +76,18 @@ text =
7776
7877
7978el : List (Testable.Attr msg) -> Testable.Element msg -> Testable.Element msg
80−el =
81− Testable.El
79+el attrs =
80+ Testable.El (implicitWidthHeightShrink attrs)
8281
8382
8483row : List (Testable.Attr msg) -> List (Testable.Element msg) -> Testable.Element msg
85−row =
86− Testable.Row
84+row attrs =
85+ Testable.Row (implicitWidthHeightShrink attrs)
8786
8887
8988column : List (Testable.Attr msg) -> List (Testable.Element msg) -> Testable.Element msg
90−column =
91− Testable.Column
89+column attrs =
90+ Testable.Column (implicitWidthHeightShrink attrs)
9291
9392
9493none : Testable.Element msg
@@ -102,8 +101,8 @@ paragraph =
102101
103102
104103textColumn : List (Testable.Attr msg) -> List (Testable.Element msg) -> Testable.Element msg
105−textColumn =
106− Testable.TextColumn
104+textColumn attrs =
105+ Testable.TextColumn (implicitWidthHeightShrink attrs)
107106
108107
109108{-| Old labeling mechanism that i removed to hastily
@@ -182,6 +181,7 @@ transparent on =
182181 else
183182 "opaque"
184183 , attr = Element.transparent on
184+ , id = Testable.NoId
185185 , test =
186186 \context ->
187187 let
@@ -204,9 +204,9 @@ transparent on =
204204{-| -}
205205isVisible : Testable.Attr msg
206206isVisible =
207− Testable.LabeledTest
207+ Testable.AttrTest
208208 { label = "is-visible"
209− , attr = Element.htmlAttribute (Html.Attributes.style "not" "applicable")
209+ , id = Testable.NoId
210210 , test =
211211 \context ->
212212 [ Testable.equal context.self.isVisible True ]
@@ -219,6 +219,7 @@ alpha a =
219219 Testable.LabeledTest
220220 { label = "alpha-" ++ String.fromFloat a
221221 , attr = Element.alpha a
222+ , id = Testable.NoId
222223 , test =
223224 \context ->
224225 let
@@ -237,6 +238,7 @@ padding pad =
237238 Testable.LabeledTest
238239 { label = "padding " ++ String.fromInt pad
239240 , attr = Element.padding pad
241+ , id = Testable.NoId
240242 , test =
241243 \found ->
242244 [ Testable.true ("Padding " ++ String.fromInt pad ++ " is present")
@@ -257,6 +259,7 @@ paddingXY x y =
257259 Testable.LabeledTest
258260 { label = "paddingXY " ++ String.fromInt x ++ ", " ++ String.fromInt y
259261 , attr = Element.paddingXY x y
262+ , id = Testable.NoId
260263 , test =
261264 \found ->
262265 [ Testable.true ("PaddingXY (" ++ String.fromInt x ++ ", " ++ String.fromInt y ++ ") is present")
@@ -332,6 +335,7 @@ widthHelper maybeMin maybeMax len =
332335 -- Pixel values should ignore min and max?
333336 Testable.LabeledTest
334337 { label = "width " ++ String.fromInt val ++ "px" ++ minLabel ++ maxLabel
338+ , id = Testable.IsWidth
335339 , attr =
336340 Element.width
337341 (Element.px val
@@ -353,6 +357,7 @@ widthHelper maybeMin maybeMax len =
353357
354358 else
355359 "width fill-" ++ String.fromInt portion ++ minLabel ++ maxLabel
360+ , id = Testable.IsWidth
356361 , attr =
357362 Element.width
358363 (Element.fillPortion portion
@@ -407,6 +412,7 @@ widthHelper maybeMin maybeMax len =
407412 |> addMin
408413 |> addMax
409414 )
415+ , id = Testable.IsWidth
410416 , test =
411417 \context ->
412418 let
@@ -428,12 +434,17 @@ widthHelper maybeMin maybeMax len =
428434 if totalChildren == 0 then
429435 -- TODO: The issue is that we have a hard time measuring `text` elements
430436 -- So if a element has a text child, then it's width isn't going to show up in the system.
431− [ expectRoundedEquality context.self.bbox.width context.self.bbox.width ]
437+ [ Testable.Todo "Calculate text size for width-shrink calculation"
438+ ]
432439
433440 else
434441 -- This fails if this element is actually a column
435442 -- So we need to capture what this element is in order to do this calculation.
436− [ expectRoundedEquality (totalChildren + horizontalPadding + spacingValue) context.self.bbox.width ]
443+ [ expectRoundedEquality
444+ { expected = totalChildren + horizontalPadding + spacingValue
445+ , found = context.self.bbox.width
446+ }
447+ ]
437448 }
438449
439450
@@ -502,6 +513,7 @@ heightHelper maybeMin maybeMax len =
502513 |> addMin
503514 |> addMax
504515 )
516+ , id = Testable.IsHeight
505517 , test =
506518 \found ->
507519 [ Testable.true ("exact height is exact: " ++ String.fromInt (floor found.self.bbox.height) ++ "," ++ String.fromInt val)
@@ -520,6 +532,7 @@ heightHelper maybeMin maybeMax len =
520532 |> addMin
521533 |> addMax
522534 )
535+ , id = Testable.IsHeight
523536 , test =
524537 \context ->
525538 [ if List.member context.location [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
@@ -568,16 +581,17 @@ heightHelper maybeMin maybeMax len =
568581 |> addMin
569582 |> addMax
570583 )
584+ , id = Testable.IsHeight
571585 , test =
572586 \context ->
573587 let
574− childWidth child =
588+ childHeight child =
575589 -- TODO: add margin values to heights
576590 child.bbox.height
577591
578592 totalChildren =
579593 context.children
580− |> List.map childWidth
594+ |> List.map childHeight
581595 |> List.sum
582596
583597 verticalPadding =
@@ -589,12 +603,17 @@ heightHelper maybeMin maybeMax len =
589603 if totalChildren == 0 then
590604 -- TODO: The issue is that we have a hard time measuring `text` elements
591605 -- So if a element has a text child, then it's height isn't going to show up in the system.
592− [ expectRoundedEquality context.self.bbox.height context.self.bbox.height ]
606+ [ Testable.Todo "Calculate expected height shrink"
607+ ]
593608
594609 else
595610 -- This fails if this element is actually a column
596611 -- So we need to capture what this element is in order to do this calculation.
597− [ expectRoundedEquality (totalChildren + verticalPadding + spacingValue) context.self.bbox.height ]
612+ [ expectRoundedEquality
613+ { expected = totalChildren + verticalPadding + spacingValue
614+ , found = context.self.bbox.height
615+ }
616+ ]
598617 }
599618
600619
@@ -615,6 +634,7 @@ spacing space =
615634 , Testable.LabeledTest
616635 { label = "spacing: " ++ String.fromInt space
617636 , attr = Element.spacing space
637+ , id = Testable.NoId
618638 , test =
619639 \found ->
620640 let
@@ -693,6 +713,7 @@ alignLeft =
693713 Testable.LabeledTest
694714 { label = "alignLeft"
695715 , attr = Element.alignLeft
716+ , id = Testable.NoId
696717 , test =
697718 \found ->
698719 [ if List.member found.location [ Testable.IsNearby Testable.OnLeft, Testable.IsNearby Testable.OnRight ] then
@@ -707,13 +728,15 @@ alignLeft =
707728 ]
708729 then
709730 expectRoundedEquality
710− found.self.bbox.left
711− found.parent.bbox.left
731+ { found = found.self.bbox.left
732+ , expected = found.parent.bbox.left
733+ }
712734
713735 else if List.length found.siblings == 0 then
714736 expectRoundedEquality
715− found.self.bbox.left
716− (found.parent.bbox.left + found.parent.bbox.padding.left)
737+ { found = found.self.bbox.left
738+ , expected = found.parent.bbox.left + found.parent.bbox.padding.left
739+ }
717740
718741 else
719742 case found.location of
@@ -731,13 +754,15 @@ alignLeft =
731754 |> List.sum
732755 in
733756 expectRoundedEquality
734− found.self.bbox.left
735− (found.parent.bbox.left + (found.parent.bbox.padding.left + widthsOnLeft + spacings))
757+ { found = found.self.bbox.left
758+ , expected = found.parent.bbox.left + (found.parent.bbox.padding.left + widthsOnLeft + spacings)
759+ }
736760
737761 _ ->
738762 expectRoundedEquality
739− found.self.bbox.left
740− (found.parent.bbox.left + found.parent.bbox.padding.left)
763+ { found = found.self.bbox.left
764+ , expected = found.parent.bbox.left + found.parent.bbox.padding.left
765+ }
741766 ]
742767 }
743768
@@ -748,6 +773,7 @@ centerX =
748773 Testable.LabeledTest
749774 { label = "centerX"
750775 , attr = Element.centerX
776+ , id = Testable.NoId
751777 , test =
752778 \found ->
753779 let
@@ -764,8 +790,9 @@ centerX =
764790
765791 else if List.length found.siblings == 0 then
766792 [ expectRoundedEquality
767− selfCenter
768− parentCenter
793+ { found = selfCenter
794+ , expected = parentCenter
795+ }
769796 ]
770797
771798 else
@@ -800,12 +827,17 @@ centerX =
800827 )
801828 in
802829 [ expectRoundedEquality
803− selfCenter
804− expectedCenter
830+ { found = selfCenter
831+ , expected = expectedCenter
832+ }
805833 ]
806834
807835 _ ->
808− [ expectRoundedEquality selfCenter parentCenter ]
836+ [ expectRoundedEquality
837+ { found = selfCenter
838+ , expected = parentCenter
839+ }
840+ ]
809841 }
810842
811843
@@ -815,6 +847,7 @@ alignRight =
815847 Testable.LabeledTest
816848 { label = "alignRight"
817849 , attr = Element.alignRight
850+ , id = Testable.NoId
818851 , test =
819852 \found ->
820853 if List.member found.location [ Testable.IsNearby Testable.OnLeft, Testable.IsNearby Testable.OnRight ] then
@@ -829,14 +862,16 @@ alignRight =
829862 ]
830863 then
831864 [ expectRoundedEquality
832− found.self.bbox.right
833− found.parent.bbox.right
865+ { found = found.self.bbox.right
866+ , expected = found.parent.bbox.right
867+ }
834868 ]
835869
836870 else if List.length found.siblings == 0 then
837871 [ expectRoundedEquality
838− found.self.bbox.right
839− (found.parent.bbox.right + found.parent.bbox.padding.right)
872+ { found = found.self.bbox.right
873+ , expected = found.parent.bbox.right + found.parent.bbox.padding.right
874+ }
840875 ]
841876
842877 else
@@ -855,14 +890,16 @@ alignRight =
855890 |> List.sum
856891 in
857892 [ expectRoundedEquality
858− found.self.bbox.right
859− (found.parent.bbox.right - (found.parent.bbox.padding.right + widthsOnRight + spacings))
893+ { found = found.self.bbox.right
894+ , expected = found.parent.bbox.right - (found.parent.bbox.padding.right + widthsOnRight + spacings)
895+ }
860896 ]
861897
862898 _ ->
863899 [ expectRoundedEquality
864− found.self.bbox.right
865− (found.parent.bbox.right + found.parent.bbox.padding.right)
900+ { found = found.self.bbox.right
901+ , expected = found.parent.bbox.right + found.parent.bbox.padding.right
902+ }
866903 ]
867904 }
868905
@@ -873,6 +910,7 @@ alignTop =
873910 Testable.LabeledTest
874911 { label = "alignTop"
875912 , attr = Element.alignTop
913+ , id = Testable.NoId
876914 , test =
877915 \found ->
878916 if List.member found.location [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
@@ -887,14 +925,16 @@ alignTop =
887925 ]
888926 then
889927 [ expectRoundedEquality
890− found.self.bbox.top
891− found.parent.bbox.top
928+ { found = found.self.bbox.top
929+ , expected = found.parent.bbox.top
930+ }
892931 ]
893932
894933 else if List.length found.siblings == 0 then
895934 [ expectRoundedEquality
896− found.self.bbox.top
897− (found.parent.bbox.top + found.parent.bbox.padding.top)
935+ { found = found.self.bbox.top
936+ , expected = found.parent.bbox.top + found.parent.bbox.padding.top
937+ }
898938 ]
899939
900940 else
@@ -913,14 +953,16 @@ alignTop =
913953 |> List.sum
914954 in
915955 [ expectRoundedEquality
916− found.self.bbox.top
917− (found.parent.bbox.top + (found.parent.bbox.padding.top + heightsAbove + spacings))
956+ { found = found.self.bbox.top
957+ , expected = found.parent.bbox.top + (found.parent.bbox.padding.top + heightsAbove + spacings)
958+ }
918959 ]
919960
920961 _ ->
921962 [ expectRoundedEquality
922− found.self.bbox.top
923− found.parent.bbox.top
963+ { found = found.self.bbox.top
964+ , expected = found.parent.bbox.top
965+ }
924966 ]
925967 }
926968
@@ -931,6 +973,7 @@ alignBottom =
931973 Testable.LabeledTest
932974 { label = "alignBottom"
933975 , attr = Element.alignBottom
976+ , id = Testable.NoId
934977 , test =
935978 \found ->
936979 if List.member found.location [ Testable.IsNearby Testable.Above, Testable.IsNearby Testable.Below ] then
@@ -945,14 +988,16 @@ alignBottom =
945988 ]
946989 then
947990 [ expectRoundedEquality
948− found.self.bbox.bottom
949− found.parent.bbox.bottom
991+ { found = found.self.bbox.bottom
992+ , expected = found.parent.bbox.bottom
993+ }
950994 ]
951995
952996 else if List.length found.siblings == 0 then
953997 [ expectRoundedEquality
954− found.self.bbox.bottom
955− (found.parent.bbox.bottom + found.parent.bbox.padding.bottom)
998+ { found = found.self.bbox.bottom
999+ , expected = found.parent.bbox.bottom + found.parent.bbox.padding.bottom
1000+ }
9561001 ]
9571002
9581003 else
@@ -971,22 +1016,25 @@ alignBottom =
9711016 |> List.sum
9721017 in
9731018 [ expectRoundedEquality
974− found.self.bbox.bottom
975− (found.parent.bbox.bottom - (found.parent.bbox.padding.bottom + heightsBelow + spacings))
1019+ { found = found.self.bbox.bottom
1020+ , expected = found.parent.bbox.bottom - (found.parent.bbox.padding.bottom + heightsBelow + spacings)
1021+ }
9761022 ]
9771023
9781024 _ ->
9791025 [ expectRoundedEquality
980− found.self.bbox.bottom
981− (found.parent.bbox.bottom + found.parent.bbox.padding.bottom)
1026+ { found = found.self.bbox.bottom
1027+ , expected = found.parent.bbox.bottom + found.parent.bbox.padding.bottom
1028+ }
9821029 ]
9831030 }
9841031
9851032
986−expectRoundedEquality x y =
1033+expectRoundedEquality : { expected : Float, found : Float } -> Testable.LayoutExpectation
1034+expectRoundedEquality { expected, found } =
9871035 Testable.true
988− ("within 1 of each other " ++ floatToString x ++ ", " ++ floatToString y)
989− (abs (x - y) < 1)
1036+ ("expected " ++ floatToString expected ++ ", found " ++ floatToString found)
1037+ (abs (expected - found) < 1)
9901038
9911039
9921040floatToString : Float -> String
@@ -1000,6 +1048,7 @@ centerY =
10001048 Testable.LabeledTest
10011049 { label = "centerY"
10021050 , attr = Element.centerY
1051+ , id = Testable.NoId
10031052 , test =
10041053 \found ->
10051054 let
@@ -1014,8 +1063,9 @@ centerY =
10141063
10151064 else if List.length found.siblings == 0 then
10161065 [ expectRoundedEquality
1017− selfCenter
1018− parentCenter
1066+ { found = selfCenter
1067+ , expected = parentCenter
1068+ }
10191069 ]
10201070
10211071 else
@@ -1050,12 +1100,17 @@ centerY =
10501100 )
10511101 in
10521102 [ expectRoundedEquality
1053− selfCenter
1054− expectedCenter
1103+ { found = selfCenter
1104+ , expected = expectedCenter
1105+ }
10551106 ]
10561107
10571108 _ ->
1058− [ expectRoundedEquality selfCenter parentCenter ]
1109+ [ expectRoundedEquality
1110+ { found = selfCenter
1111+ , expected = parentCenter
1112+ }
1113+ ]
10591114 }
10601115
10611116
@@ -1068,7 +1123,11 @@ above element =
10681123 , label = "above"
10691124 , test =
10701125 \found ->
1071− [ expectRoundedEquality found.self.bbox.bottom found.parent.bbox.top ]
1126+ [ expectRoundedEquality
1127+ { found = found.self.bbox.bottom
1128+ , expected = found.parent.bbox.top
1129+ }
1130+ ]
10721131 }
10731132
10741133
@@ -1081,7 +1140,11 @@ below element =
10811140 , label = "below"
10821141 , test =
10831142 \found ->
1084− [ expectRoundedEquality found.self.bbox.top found.parent.bbox.bottom ]
1143+ [ expectRoundedEquality
1144+ { found = found.self.bbox.top
1145+ , expected = found.parent.bbox.bottom
1146+ }
1147+ ]
10851148 }
10861149
10871150
@@ -1094,7 +1157,11 @@ onRight element =
10941157 , label = "onRight"
10951158 , test =
10961159 \found ->
1097− [ expectRoundedEquality found.self.bbox.left found.parent.bbox.right ]
1160+ [ expectRoundedEquality
1161+ { found = found.self.bbox.left
1162+ , expected = found.parent.bbox.right
1163+ }
1164+ ]
10981165 }
10991166
11001167
@@ -1107,7 +1174,11 @@ onLeft element =
11071174 , label = "onLeft"
11081175 , test =
11091176 \found ->
1110− [ expectRoundedEquality found.self.bbox.right found.parent.bbox.left ]
1177+ [ expectRoundedEquality
1178+ { found = found.self.bbox.right
1179+ , expected = found.parent.bbox.left
1180+ }
1181+ ]
11111182 }
11121183
11131184
@@ -1173,3 +1244,85 @@ behindContent element =
11731244 \found ->
11741245 [ withinHelper found ]
11751246 }
1247+
1248+
1249+
1250+{- Implicit width/height calcualtions -}
1251+
1252+
1253+implicitWidthHeightShrink attrs =
1254+ let
1255+ withImplicits =
1256+ implicitTest (widthHelper Nothing Nothing Shrink)
1257+ :: implicitTest (heightHelper Nothing Nothing Shrink)
1258+ :: attrs
1259+ in
1260+ skipOverridden withImplicits
1261+
1262+
1263+attrId attr =
1264+ case attr of
1265+ Testable.LabeledTest details ->
1266+ details.id
1267+
1268+ Testable.AttrTest details ->
1269+ details.id
1270+
1271+ _ ->
1272+ Testable.NoId
1273+
1274+
1275+skipOverridden ls =
1276+ List.foldr
1277+ (\attr ( found, caught ) ->
1278+ let
1279+ ( skip, has ) =
1280+ case attrId attr of
1281+ Testable.NoId ->
1282+ ( False, found )
1283+
1284+ Testable.IsWidth ->
1285+ ( found.hasWidth
1286+ , { hasWidth = True
1287+ , hasHeight = found.hasHeight
1288+ }
1289+ )
1290+
1291+ Testable.IsHeight ->
1292+ ( found.hasHeight
1293+ , { hasWidth = found.hasWidth
1294+ , hasHeight = True
1295+ }
1296+ )
1297+ in
1298+ ( has
1299+ , if skip then
1300+ caught
1301+
1302+ else
1303+ attr :: caught
1304+ )
1305+ )
1306+ ( { hasWidth = False
1307+ , hasHeight = False
1308+ }
1309+ , []
1310+ )
1311+ ls
1312+ |> Tuple.second
1313+ |> List.reverse
1314+
1315+
1316+{-| This is taking a normal test and rmoving its ability to attach a real `Element` attribute.
1317+-}
1318+implicitTest attr =
1319+ case attr of
1320+ Testable.LabeledTest details ->
1321+ Testable.AttrTest
1322+ { test = details.test
1323+ , label = "Implicit -> " ++ details.label
1324+ , id = details.id
1325+ }
1326+
1327+ otherwise ->
1328+ otherwise
tests-rendering/src/Testable/Element/Background.elm+2−1
@@ -13,6 +13,7 @@ color clr =
1313 Testable.LabeledTest
1414 { label = "background color"
1515 , attr = Background.color clr
16+ , id = Testable.NoId
1617 , test =
1718 \context ->
1819 let
@@ -21,7 +22,7 @@ color clr =
2122 |> Dict.get "background-color"
2223 |> Maybe.withDefault "notfound"
2324 in
24− [ Testable.true ("expected: " ++ (Testable.formatColor clr ++ ", found:" ++ selfBackgroundColor))
25+ [ Testable.true ("expected " ++ (Testable.formatColor clr ++ ", found " ++ selfBackgroundColor))
2526 (Testable.compareFormattedColor clr selfBackgroundColor)
2627 ]
2728 }
tests-rendering/src/Testable/Element/Font.elm+2−1
@@ -5,7 +5,6 @@ module Testable.Element.Font exposing (color)
55import Dict
66import Element exposing (Color)
77import Element.Font as Font
8−import Expect
98import Testable
109
1110
@@ -14,6 +13,7 @@ color clr =
1413 Testable.LabeledTest
1514 { label = "font color-" ++ Testable.formatColor clr
1615 , attr = Font.color clr
16+ , id = Testable.NoId
1717 , test =
1818 \context ->
1919 let
@@ -33,6 +33,7 @@ size i =
3333 Testable.LabeledTest
3434 { label = "font size-" ++ String.fromInt i
3535 , attr = Font.size i
36+ , id = Testable.NoId
3637 , test =
3738 \context ->
3839 let
tests-rendering/src/Testable/Runner.elm+2−3
@@ -258,6 +258,7 @@ view model =
258258 , Border.dashed
259259 , Border.width 2
260260 , Border.color palette.lightGrey
261+ , Font.size 20
261262 , Element.inFront
262263 (Element.el
263264 [ Font.size 14
@@ -342,11 +343,9 @@ viewResult testable =
342343 , Element.spacing 16
343344 ]
344345 [ Element.el [ Font.size 24 ] (Element.text testable.label)
345− , Element.column [ Element.alignLeft, Element.spacing 20 ]
346− (List.map viewLayoutTest failing)
347346 , Element.column
348347 [ Element.alignLeft, Element.spacing 16 ]
349− (passing
348+ (testable.results
350349 |> groupBy .elementDomId
351350 |> List.map viewLayoutTestGroup
352351 )