@@ -19,6 +19,7 @@ module Testable exposing
19 , formatColorWithAlpha
19 , formatColorWithAlpha
21 , getSpacing
21 , getSpacing
22+ , getSpacingFromAttributes
22 , runTests
23 , runTests
23 , textHeight
24 , textHeight
24 , toElement
25 , toElement
@@ -481,6 +482,10 @@ createTest { siblings, parent, cache, level, element, location, parentSpacing }
483 levelToString level
484 levelToString level
488+ Debug.log "element" element
485 testChildren : Found -> List (Element msg) -> List LayoutTest
490 testChildren : Found -> List (Element msg) -> List LayoutTest
486 testChildren found children =
491 testChildren found children =
@@ -620,6 +625,7 @@ createTest { siblings, parent, cache, level, element, location, parentSpacing }
621 attributeTests =
626 attributeTests =
622 attributes
627 attributes
628+ |> Debug.log "attributes"
623 |> List.indexedMap
629 |> List.indexedMap
624 -- Found -> Dict String Found -> List Int -> Int -> Surroundings -> Attr msg -> List Test
630 -- Found -> Dict String Found -> List Int -> Int -> Surroundings -> Attr msg -> List Test
625 (\i attr ->
631 (\i attr ->
@@ -698,8 +704,13 @@ createAttributeTest :
698 -> List LayoutTest
704 -> List LayoutTest
699createAttributeTest parent cache level attrIndex surroundings attr =
705createAttributeTest parent cache level attrIndex surroundings attr =
708+ Debug.log "attribute test" attr
702− "#" ++ levelToString level
712+ ++ levelToString level
713+ |> Debug.log "domid"
704 case attr of
715 case attr of
705 Attr _ ->
716 Attr _ ->
@@ -739,7 +750,7 @@ createAttributeTest parent cache level attrIndex surroundings attr =
740 Batch batch ->
751 Batch batch ->
742− |> List.indexedMap (\i attribute -> createAttributeTest parent cache (attrIndex :: level) i surroundings attribute)
753+ |> List.indexedMap (\i attribute -> createAttributeTest parent cache level i surroundings attribute)
743 |> List.concat
754 |> List.concat
745 LabeledTest { label, test } ->
756 LabeledTest { label, test } ->
@@ -812,6 +823,21 @@ formatColor (Internal.Rgba red green blue alpha) =
826+getSpacingFromAttributes attrs =
831+ (Spacing i) :: remain ->
834+ (Batch batched) :: remain ->
835+ getSpacingFromAttributes (batched ++ remain)
838+ getSpacingFromAttributes remain
815getSpacing : Element msg -> Maybe Int
841getSpacing : Element msg -> Maybe Int
816getSpacing el =
842getSpacing el =