Repository navigation
Improve AnchorMode tests - #67639
Improve AnchorMode tests#67639
AnchorMode tests#67639Conversation
There was a problem hiding this comment.
Pull request overview
Updates the Blazor virtualization E2E coverage to ensure the AnchorMode_End_LargeAppendAtBottom_StillFollows test actually validates End-mode auto-follow behavior after a large append, rather than forcing the scroll position in the assertion loop.
Changes:
- Removed the test’s manual
scrollTop = scrollHeightassignment from the polling assertion so it no longer “makes itself pass.” - Strengthened the scenario by additionally asserting that real items near the new end of the list (not provider placeholders) are materialized after the append.
Last row of 1k item 0-indexed list, after appending 100 items is 1099, not 1090.
|
Failing on delayed large append: variable-async-delay-large-append.mp4I suspect #67679 might fix it. |
|
The remaining failure is for in-memory items, with default item provider: |
AnchorMode_End_LargeAppendAtBottom_StillFollowsAnchorMode tests
|
/azp run aspnetcore-components-e2e |
|
Azure Pipelines: Successfully started running 1 pipeline(s). |
AnchorMode_End_LargeAppendAtBottom_StillFollowsThe existing
AnchorMode_End_LargeAppendAtBottom_StillFollowsE2E test did not actually verify auto-follow behavior. Its assertion re-scrolled the container to the bottom inside the polling loop.Because the test itself performed the scroll-to-bottom that the engine is supposed to do on append, the assertion would be always true, whether or not End-mode auto-follow worked. It provided no real regression coverage for the "append at bottom keeps following" behavior it was named for.
That exposed a problem with the scenario
variableHeight: True, useItemsProvider: Falsebuild1, build2.The
Virtualize.tschange adds a stickyreachedflag so that End-anchored re-pinning triggers when the viewport is at the bottom now or has reached it and is still following - fixing large/async appends that arrive after the momentary at-bottom measurement has gone stale, which the previous single-framewasAtBottomcheck missed and let the viewport drift off the tail.end-large-append.mp4
AsyncItemsProvider_DoesNotFlashPlaceholderRows_OnAnchoredEdgeGrowthandStartAnchoredPrepend_MovesViewportToNewHead_WithoutPlaceholderFlashwere flakyreport: #67822 (comment)
build
This was test setup problem, we swallowed the
OperationCanceledExceptionfrom a superseded gated fetch and returned an empty-but-successfulItemsProviderResult, which madeVirtualizerecord that window as "loaded with zero items" and leave permanent, never-re-fetched placeholder rows that the test'sBrowser.Equal(0, placeholders)assertion timed out waiting to clear.