diff --git a/src/Controls/src/Core/Handlers/Items/Android/MauiRecyclerView.cs b/src/Controls/src/Core/Handlers/Items/Android/MauiRecyclerView.cs index 9b97f1732340..2c2a75a63074 100644 --- a/src/Controls/src/Core/Handlers/Items/Android/MauiRecyclerView.cs +++ b/src/Controls/src/Core/Handlers/Items/Android/MauiRecyclerView.cs @@ -390,13 +390,6 @@ public virtual void ScrollTo(ScrollToRequestEventArgs args) var position = DetermineTargetPosition(args); - // The collection view includes a header at the zeroth index, so the collection view scrolling is not correct using the index. - bool hasHeader = ItemsViewAdapter.ItemsSource.HasHeader; - if (hasHeader) - { - position += 1; - } - if (args.IsAnimated) { ScrollHelper.AnimateScrollToPosition(position, args.ScrollToPosition); diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/DarkTheme_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/DarkTheme_VerifyVisualState.png index 20fbfc484f84..4c9f347061c0 100644 Binary files a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/DarkTheme_VerifyVisualState.png and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/DarkTheme_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/LightTheme_VerifyVisualState.png b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/LightTheme_VerifyVisualState.png index 4bed392556db..da580192eefe 100644 Binary files a/src/Controls/tests/TestCases.Android.Tests/snapshots/android/LightTheme_VerifyVisualState.png and b/src/Controls/tests/TestCases.Android.Tests/snapshots/android/LightTheme_VerifyVisualState.png differ diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21708.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21708.cs index f4552ff97b3c..502bacf22b77 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21708.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue21708.cs @@ -1,4 +1,6 @@ -using NUnit.Framework; +#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS // Issue: https://github.com/dotnet/maui/issues/26798 + +using NUnit.Framework; using UITest.Appium; using UITest.Core; @@ -20,4 +22,5 @@ public void VerifyCollectionViewVerticalOffset() App.Tap("Empty"); Assert.That(App.FindElement("Label").GetText(), Is.EqualTo("0")); } -} \ No newline at end of file +} +#endif \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs index e75b2c1706e4..0e96a7ddbc1c 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22715.cs @@ -21,14 +21,7 @@ public void PageShouldNotScroll() { App.WaitForElement("EntNumber").GetRect(); App.WaitForElement("TopLabel").GetRect(); - if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp)) - { - VerifyScreenshot(cropBottom: 1400); - } - else - { - VerifyScreenshot(); - } + VerifyScreenshot(cropBottom: 1400); } } #endif diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23158.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23158.cs index 8392c274ec2f..4ce67e1c5c8a 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23158.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue23158.cs @@ -30,13 +30,10 @@ public void ValidateEntryClearButtonVisibilityBehavior() App.DismissKeyboard(); #endif - if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp)) - { - VerifyScreenshot(cropBottom: 1400); - } - else - { - VerifyScreenshot(); - } +#if IOS + VerifyScreenshot(cropBottom: 1400); +#else + VerifyScreenshot(); +#endif } } \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27750.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27750.cs index 890c3ef685d6..869ba0a31754 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27750.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27750.cs @@ -18,14 +18,11 @@ public void EditorShouldNotMoveToBottom() { App.WaitForElement("Editor"); App.Tap("Editor"); - if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp)) - { - VerifyScreenshot(cropBottom:1400); - } - else - { - VerifyScreenshot(); - } +#if IOS + VerifyScreenshot(cropBottom: 1400); +#else + VerifyScreenshot(); +#endif } } } diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28827.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28827.cs index aa461914f578..d187279d629d 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28827.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue28827.cs @@ -1,5 +1,5 @@ -#if TEST_FAILS_ON_WINDOWS // NullReferenceException occurs when switching isGrouped to true -// refer to https://github.com/dotnet/maui/issues/28824 +#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS // NullReferenceException occurs when switching isGrouped to true +// refer to https://github.com/dotnet/maui/issues/29141, https://github.com/dotnet/maui/issues/28824 using NUnit.Framework; using UITest.Appium; using UITest.Core; diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31680.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31680.cs index a7ccc726ed2c..85766dbbb815 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31680.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue31680.cs @@ -22,6 +22,16 @@ public void CollectionViewInsideCarouselViewShouldNotThrowIndexOutOfRangeExcepti // but the issue can be consistently reproduced manually with each scroll. App.ScrollDown("MainCollectionView", ScrollStrategy.Gesture, 0.99, swipeSpeed: 50, true); App.ScrollDown("MainCollectionView", ScrollStrategy.Gesture, 0.99, swipeSpeed: 50, true); +#if MACCATALYST + // MacCatalyst needs more scroll gestures to reach the bottom. + for (int i = 0; i < 5; i++) + { + App.ScrollDown("MainCollectionView", ScrollStrategy.Gesture, 0.99, swipeSpeed: 50, true); + + if (App.FindElements("Footer").Count > 0) + break; + } +#endif App.ScrollTo("Footer"); App.WaitForElement("Footer"); } diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32223.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32223.cs index 7f94d6c02617..d8511af48c54 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32223.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue32223.cs @@ -12,6 +12,7 @@ public Issue32223(TestDevice testDevice) : base(testDevice) public override string Issue => "[Android] CollectionView items do not reorder correctly when using an item DataTemplateSelector"; [Test] + [Retry(5)] [Category(UITestCategories.CollectionView)] public void CanReorderWithItemDataTemplateSelector() { diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33523.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33523.cs index d593a69a8cbb..d148110b1651 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33523.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33523.cs @@ -1,3 +1,5 @@ +#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS // Issue: https://github.com/dotnet/maui/issues/34190 + using NUnit.Framework; using UITest.Appium; using UITest.Core; @@ -39,3 +41,4 @@ public void OnBackButtonPressedShouldFireForShellNavigationBarButton() } } } +#endif \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33688.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33688.cs index bed95e2a4c37..39f7e8bb77c5 100644 --- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33688.cs +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue33688.cs @@ -35,7 +35,14 @@ public void BackButtonBehaviorTriggersWithCollectionView() #if ANDROID || WINDOWS App.TapBackArrow(); #elif IOS || MACCATALYST - App.TapBackArrow("Main"); + if (App is AppiumIOSApp iosApp && HelperExtensions.IsIOS26OrHigher(iosApp)) + { + App.TapBackArrow(); + } + else + { + App.TapBackArrow("Main"); + } #endif // Wait for navigation back and verify BackButtonBehavior was triggered diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/EmptyViewShouldRemeasureWhenParentLayoutChanges.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/EmptyViewShouldRemeasureWhenParentLayoutChanges.png new file mode 100644 index 000000000000..479d0728d785 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/EmptyViewShouldRemeasureWhenParentLayoutChanges.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ImageShouldScaleProperly.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ImageShouldScaleProperly.png new file mode 100644 index 000000000000..265b612cc87a Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/ImageShouldScaleProperly.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/Issue25558VerifyImageButtonAspects.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/Issue25558VerifyImageButtonAspects.png new file mode 100644 index 000000000000..b2aab5eb4afc Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/Issue25558VerifyImageButtonAspects.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/Issue31445DuplicateTitleIconDoesNotAppear.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/Issue31445DuplicateTitleIconDoesNotAppear.png new file mode 100644 index 000000000000..573fe1b51a67 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/Issue31445DuplicateTitleIconDoesNotAppear.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyEditorVerticalTextAlignmentWhenVisibilityToggled.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyEditorVerticalTextAlignmentWhenVisibilityToggled.png new file mode 100644 index 000000000000..921750f8dcfd Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyEditorVerticalTextAlignmentWhenVisibilityToggled.png differ diff --git a/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyEditorsNotVisible.png b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyEditorsNotVisible.png new file mode 100644 index 000000000000..e7d181ddf7f5 Binary files /dev/null and b/src/Controls/tests/TestCases.iOS.Tests/snapshots/ios-26/VerifyEditorsNotVisible.png differ