Commit 9c820d6
[Components][E2E] Stabilize NonZeroStartIndex_ScrollToMiddleThenMeasure test setup (#66290)
* Stabilize NonZeroStartIndex_ScrollToMiddleThenMeasure E2E test setup
Apply the same retry-based scroll stabilization pattern from PR #66194
to NonZeroStartIndex_ScrollToMiddleThenMeasure. The test was racing in
server mode because it set scrollTop and then immediately checked the
rendered items, but the async virtualization update had not finished yet.
The fix computes the target offset up front, then retries both the
scroll assignment and the rendered-index check inside a single
Browser.True() loop before calling WaitForScrollStabilization.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Apply review feedback: fix spacing and reuse ScrollToOffsetWithStabilization helper
- Fix missing space around = in targetScrollTop assignment
- Extract scroll+retry logic into generalized ScrollToOffsetWithStabilization overload
- Reuse the helper in NonZeroStartIndex_ScrollToMiddleThenMeasure instead of duplicating
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Fix bad merge: remove stale CanElevateEffectiveMaxItemCount quarantine, restore missing PrependItems quarantine
The merge from main incorrectly re-introduced a quarantine for
CanElevateEffectiveMaxItemCount_WhenOverscanExceedsMax (#65962) which
was already fixed and unquarantined by #66291 on main. It also dropped
the DynamicContent_PrependItemsWhileScrolledToMiddle quarantine (#66308)
that was added by #66312 on main.
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
* Use MutationObserver instead of scroll retry loop in NonZeroStartIndex test
Replace the retry-based ScrollToOffsetWithStabilization call with a
single scrollTop assignment followed by a MutationObserver that waits
for Blazor's DOM update to settle. This makes the test more
deterministic: it scrolls once and waits for the effect, rather than
retrying the scroll which could mask real bugs where the component
fails to handle the initial scroll correctly.
The MutationObserver waits for a 200ms quiet period after the last
DOM mutation, with a 2s fallback timeout. After that, scroll position
stabilization is verified, and the item index assertion is a hard
assert (not a retry loop).
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
---------
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>1 parent 765e192 commit 9c820d6
2 files changed
Lines changed: 45 additions & 28 deletions
Lines changed: 0 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
104 | 104 | | |
105 | 105 | | |
106 | 106 | | |
107 | | - | |
108 | | - | |
109 | | - | |
110 | | - | |
111 | 107 | | |
112 | 108 | | |
113 | 109 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
753 | 753 | | |
754 | 754 | | |
755 | 755 | | |
| 756 | + | |
| 757 | + | |
| 758 | + | |
| 759 | + | |
| 760 | + | |
| 761 | + | |
| 762 | + | |
| 763 | + | |
| 764 | + | |
| 765 | + | |
| 766 | + | |
| 767 | + | |
| 768 | + | |
| 769 | + | |
| 770 | + | |
| 771 | + | |
| 772 | + | |
| 773 | + | |
| 774 | + | |
| 775 | + | |
756 | 776 | | |
757 | 777 | | |
758 | 778 | | |
| |||
769 | 789 | | |
770 | 790 | | |
771 | 791 | | |
772 | | - | |
773 | | - | |
774 | | - | |
775 | | - | |
776 | | - | |
777 | | - | |
778 | | - | |
779 | | - | |
780 | | - | |
781 | | - | |
| 792 | + | |
782 | 793 | | |
783 | 794 | | |
784 | 795 | | |
| |||
1615 | 1626 | | |
1616 | 1627 | | |
1617 | 1628 | | |
1618 | | - | |
| 1629 | + | |
1619 | 1630 | | |
1620 | 1631 | | |
1621 | 1632 | | |
1622 | 1633 | | |
1623 | 1634 | | |
1624 | 1635 | | |
1625 | 1636 | | |
1626 | | - | |
| 1637 | + | |
| 1638 | + | |
| 1639 | + | |
| 1640 | + | |
| 1641 | + | |
| 1642 | + | |
| 1643 | + | |
| 1644 | + | |
| 1645 | + | |
| 1646 | + | |
| 1647 | + | |
| 1648 | + | |
| 1649 | + | |
| 1650 | + | |
| 1651 | + | |
| 1652 | + | |
| 1653 | + | |
| 1654 | + | |
1627 | 1655 | | |
1628 | 1656 | | |
1629 | | - | |
1630 | | - | |
1631 | | - | |
1632 | | - | |
1633 | | - | |
1634 | | - | |
1635 | | - | |
1636 | | - | |
1637 | | - | |
1638 | | - | |
1639 | | - | |
1640 | | - | |
| 1657 | + | |
| 1658 | + | |
| 1659 | + | |
| 1660 | + | |
| 1661 | + | |
1641 | 1662 | | |
1642 | 1663 | | |
1643 | 1664 | | |
| |||
0 commit comments