diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png new file mode 100644 index 0000000000..f7b1f8f340 --- /dev/null +++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:ab52bec79719ace02730d00df93a6b9a56c44e872c0692f54e3a46f7afe2bd60 +size 17965 diff --git a/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png new file mode 100644 index 0000000000..e3e39f4290 --- /dev/null +++ b/redwood-layout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:26725a79d818ef332b6de3184c58bb91143616cd2965402179598098d1a45f02 +size 17885 diff --git a/redwood-layout-shared-test/src/commonMain/kotlin/app/cash/redwood/layout/AbstractFlexContainerTest.kt b/redwood-layout-shared-test/src/commonMain/kotlin/app/cash/redwood/layout/AbstractFlexContainerTest.kt index dd4ee56b18..54e7b9d59d 100644 --- a/redwood-layout-shared-test/src/commonMain/kotlin/app/cash/redwood/layout/AbstractFlexContainerTest.kt +++ b/redwood-layout-shared-test/src/commonMain/kotlin/app/cash/redwood/layout/AbstractFlexContainerTest.kt @@ -325,6 +325,27 @@ abstract class AbstractFlexContainerTest { snapshotter(container.value).snapshot() } + @Test fun testRowWithFixedWidthHasChildWithFixedHeight() { + val container = flexContainer(FlexDirection.Row).apply { + crossAxisAlignment(CrossAxisAlignment.Start) + modifier = WidthImpl(200.dp) + width(Constraint.Fill) + height(Constraint.Fill) + } + + widgetFactory.text("A ".repeat(10)).apply { + modifier = HeightImpl(50.dp) + container.children.insert(0, this) + } + + widgetFactory.text("B ".repeat(100)).apply { + container.children.insert(1, this) + } + + container.onEndChanges() + snapshotter(container.value).snapshot() + } + @Test fun testChildWithUpdatedProperty() { val container = flexContainer(FlexDirection.Column) val snapshotter = snapshotter(container.value) diff --git a/redwood-layout-uiview/RedwoodLayoutUIViewTests/__Snapshots__/UIViewFlexContainerTestHost/testRowWithFixedWidthHasChildWithFixedHeight.1.png b/redwood-layout-uiview/RedwoodLayoutUIViewTests/__Snapshots__/UIViewFlexContainerTestHost/testRowWithFixedWidthHasChildWithFixedHeight.1.png new file mode 100644 index 0000000000..3d812d4022 --- /dev/null +++ b/redwood-layout-uiview/RedwoodLayoutUIViewTests/__Snapshots__/UIViewFlexContainerTestHost/testRowWithFixedWidthHasChildWithFixedHeight.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:28323ea14fc2568de0fbff26fa5fd19ce21e3c8181562fdeef6f59012acbf7c9 +size 76024 diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png new file mode 100644 index 0000000000..f55cccdfee --- /dev/null +++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:8272d3c8d6c493d5fae4d2f7d99dc935ffcc075de5f4de31785a97c284a18a9d +size 17855 diff --git a/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png new file mode 100644 index 0000000000..4bb95f0a39 --- /dev/null +++ b/redwood-layout-view/src/test/snapshots/images/app.cash.redwood.layout.view_ViewFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b543031c3253b13747496937c05d4a4cdde4954e4b3481e4d4423c0eeb4d8825 +size 17776 diff --git a/redwood-lazylayout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiLazyListTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png b/redwood-lazylayout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiLazyListTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png new file mode 100644 index 0000000000..bc9da29136 --- /dev/null +++ b/redwood-lazylayout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiLazyListTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3fb06f6053b382ce2c67a0be3030e7c108dd95208ac7b96160151fc7b30be215 +size 9382 diff --git a/redwood-lazylayout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiLazyListTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png b/redwood-lazylayout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiLazyListTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png new file mode 100644 index 0000000000..2942a83145 --- /dev/null +++ b/redwood-lazylayout-composeui/src/test/snapshots/images/app.cash.redwood.layout.composeui_ComposeUiLazyListTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1fcad431314a7c24c44287d461ee39dbdf686870f5b9b00b82e944106020067b +size 9380 diff --git a/redwood-lazylayout-uiview/RedwoodLazylayoutUIViewTests/__Snapshots__/UIViewLazyListAsFlexContainerTestHost/testRowWithFixedWidthHasChildWithFixedHeight.1.png b/redwood-lazylayout-uiview/RedwoodLazylayoutUIViewTests/__Snapshots__/UIViewLazyListAsFlexContainerTestHost/testRowWithFixedWidthHasChildWithFixedHeight.1.png new file mode 100644 index 0000000000..7c865c778b --- /dev/null +++ b/redwood-lazylayout-uiview/RedwoodLazylayoutUIViewTests/__Snapshots__/UIViewLazyListAsFlexContainerTestHost/testRowWithFixedWidthHasChildWithFixedHeight.1.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7abfc284becf9c9be90c3c524bf1d145c865a470fb59e6081bc53962b3927f25 +size 75639 diff --git a/redwood-lazylayout-view/src/test/snapshots/images/app.cash.redwood.lazylayout.view_ViewLazyListAsFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png b/redwood-lazylayout-view/src/test/snapshots/images/app.cash.redwood.lazylayout.view_ViewLazyListAsFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png new file mode 100644 index 0000000000..782020d596 --- /dev/null +++ b/redwood-lazylayout-view/src/test/snapshots/images/app.cash.redwood.lazylayout.view_ViewLazyListAsFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[LTR].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:bc440224b1ca2b16951775ff0a18a37a67cc7f8d8845c5018f07b7366afb49b3 +size 9171 diff --git a/redwood-lazylayout-view/src/test/snapshots/images/app.cash.redwood.lazylayout.view_ViewLazyListAsFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png b/redwood-lazylayout-view/src/test/snapshots/images/app.cash.redwood.lazylayout.view_ViewLazyListAsFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png new file mode 100644 index 0000000000..0d5280e6c7 --- /dev/null +++ b/redwood-lazylayout-view/src/test/snapshots/images/app.cash.redwood.lazylayout.view_ViewLazyListAsFlexContainerTest_testRowWithFixedWidthHasChildWithFixedHeight[RTL].png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:19efec1555c96a989cc6300e67c62df5f1c63e0bdb21efaba8129d51ebd11054 +size 9160