Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
BindingContext = _viewModel = new CollectionViewViewModel(isScrollingFeatureTest: true);
_viewModel.ItemsSourceType = ItemsSourceType.ObservableCollectionT3;
_viewModel.ScrollToPosition = ScrollToPosition.MakeVisible;
#if WINDOWS
// Wait for any deferred DispatcherQueue.TryEnqueue callbacks from OnItemsVectorChanged
// (introduced by the fix in ItemsViewHandler.Windows.cs) to fire before resetting the
// scroll event labels, so the reset isn't overwritten by the deferred scroll.
await Task.Delay(300);
#endif
ResetScrollEventLabels();
Comment thread
HarishwaranVijayakumar marked this conversation as resolved.
await Navigation.PushAsync(new ScrollBehaviorOptionsPage(_viewModel));
}
Expand Down
5 changes: 5 additions & 0 deletions src/Controls/tests/TestCases.HostApp/Issues/Issue33614.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,11 @@ private void OnCollectionViewScrolled(object sender, ItemsViewScrolledEventArgs

private void OnScrollToButtonClicked(object sender, EventArgs e)
{
#if WINDOWS
// Disable animation on Windows to avoid flaky test results
_collectionView.ScrollTo(15, position: ScrollToPosition.Start, animate: false);
#else
_collectionView.ScrollTo(15, position: ScrollToPosition.Start, animate: true);
#endif
Comment thread
HarishwaranVijayakumar marked this conversation as resolved.
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -1223,7 +1223,7 @@ public void VerifyKeepLastItemInViewWithGroupedListWhenHorizontalGrid()
#endif
#endif

#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS // In windows, related issue: https://github.com/dotnet/maui/issues/34772
#if TEST_FAILS_ON_ANDROID
//[Android] KeepScrollOffset doesn't not works as expected when new items are added in CollectionView Issue Link: https://github.com/dotnet/maui/issues/29131
[Test]
[Category(UITestCategories.CollectionView)]
Expand Down Expand Up @@ -1577,7 +1577,6 @@ public void VerifyDefaultScrollToRequested()
}

// ScrollTo By Index Tests
#if TEST_FAILS_ON_WINDOWS // Related issue: https://github.com/dotnet/maui/issues/34772
[Test]
[Category(UITestCategories.CollectionView)]
public void VerifyScrollToByIndexWithMakeVisiblePositionAndVerticalList_Carrot()
Expand Down Expand Up @@ -1790,7 +1789,6 @@ public void VerifyScrollToByItemWithEndPositionAndVerticalList_Carrot()
Assert.That(App.WaitForElement("ItemLabel").GetText(), Is.EqualTo("Carrot"));
VerifyScreenshot();
}
#endif

// Grouped ScrollTo By Index Tests
#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_IOS // Issue - https://github.com/dotnet/maui/issues/17664
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
#if TEST_FAILS_ON_WINDOWS // Related issue: https://github.com/dotnet/maui/issues/34772
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
Expand All @@ -21,4 +20,3 @@ public void FirstVisibleItemIndexShouldBeCorrectAfterScrollTo()
Assert.That(firstIndexText, Is.EqualTo("FirstVisibleItemIndex: 15"));
}
}
#endif
Loading