In the first test, when setHeightByRows(10) is called, it seems that the height calculation or rendering process may not have completed immediately, causing the last visible row index assertion to fail.
In the second test, when setHeightByRows(10) is called for the second time, it appears that the grid is already rendered or has completed the necessary height calculations. As a result, the last visible row index is correctly determined, and the assertion passes.
The following test fails (last visible row index is 9, the 10th column is only partially visible)
However, a second call to
setHeightByRows
yields the expected result:In the first test, when
setHeightByRows(10)
is called, it seems that the height calculation or rendering process may not have completed immediately, causing the last visible row index assertion to fail.In the second test, when
setHeightByRows(10)
is called for the second time, it appears that the grid is already rendered or has completed the necessary height calculations. As a result, the last visible row index is correctly determined, and the assertion passes.