From 18e00c2f308094635dfbf3dc88b4ef26668e48a2 Mon Sep 17 00:00:00 2001 From: Alex Korban Date: Mon, 4 May 2020 07:41:23 +1200 Subject: [PATCH] Add test for issue 197 --- .../open/StackedScrollingColumnsHeight.elm | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) create mode 100644 tests-rendering/cases/open/StackedScrollingColumnsHeight.elm diff --git a/tests-rendering/cases/open/StackedScrollingColumnsHeight.elm b/tests-rendering/cases/open/StackedScrollingColumnsHeight.elm new file mode 100644 index 0000000..afc6055 --- /dev/null +++ b/tests-rendering/cases/open/StackedScrollingColumnsHeight.elm @@ -0,0 +1,44 @@ +module StackedScrollingColumnsHeight exposing (..) + +{-| + + +# Column height can be set incorrectly for two stacked columns with scrollbarY + + + +Both red and green columns should always have equal height. + +Currently, the height is set incorrectly if only one column has enough content to scroll. + +Both columns are correctly set to the same height only if neither has enough content +to scroll or if both have enough content to scroll. + +-} + +import Html exposing (Html) +import Testable.Element exposing (..) +import Testable.Element.Background as Background + + +main : Html msg +main = + layout [ height fill ] <| + column [ height fill ] + [ column + [ height fill + , scrollbarY + , Background.color (rgb 0 255 0) + ] + <| + List.map (\_ -> text "Hello") <| + List.range 1 20 + , column + [ height fill + , scrollbarY + , Background.color (rgb 255 0 0) + ] + <| + List.map (\_ -> text "Hello") <| + List.range 1 3 + ]