How to test a LazyColumn items?
# compose
m
How to test a LazyColumn items?
The tree from testRule:
Copy code
Printing with useUnmergedTree = 'true'
    Node #1 at (l=0.0, t=210.0, r=1080.0, b=762.0)px
     |-Node #2 at (l=32.0, t=273.0, r=1048.0, b=415.0)px
     | Actions = [OnClick]
     | MergeDescendants = 'true'
     |  |-Node #3 at (l=174.0, t=291.0, r=365.0, b=348.0)px
     |  | Text = 'Channel 1'
     |  | Actions = [GetTextLayoutResult]
     |  |-Node #5 at (l=174.0, t=348.0, r=387.0, b=397.0)px
     |    Text = 'Description 1'
     |    Actions = [GetTextLayoutResult]
     |-Node #7 at (l=32.0, t=415.0, r=1048.0, b=557.0)px
     | Actions = [OnClick]
     | MergeDescendants = 'true'
     |  |-Node #8 at (l=174.0, t=433.0, r=365.0, b=490.0)px
     |  | Text = 'Channel 2'
     |  | Actions = [GetTextLayoutResult]
     |  |-Node #10 at (l=174.0, t=490.0, r=387.0, b=539.0)px
     |    Text = 'Description 2'
     |    Actions = [GetTextLayoutResult]
     |-Node #12 at (l=32.0, t=557.0, r=1048.0, b=699.0)px
       Actions = [OnClick]
       MergeDescendants = 'true'
        |-Node #13 at (l=174.0, t=575.0, r=365.0, b=632.0)px
        | Text = 'Channel 3'
        | Actions = [GetTextLayoutResult]
        |-Node #15 at (l=174.0, t=632.0, r=387.0, b=681.0)px
          Text = 'Description 3'
          Actions = [GetTextLayoutResult]
Copy code
composeTestRule.onNodeWithText("Channel 1").assertExists()
returns
Copy code
Reason: Expected exactly '1' node but could not find any node that satisfies: (Text = 'Channel 1' (ignoreCase: true))
FIXED Did forget to use
useUnmergedTree = true