From c6e32c9237a0b82c641560fb6bac3dca683e27f1 Mon Sep 17 00:00:00 2001
From: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
Date: Fri, 14 Feb 2025 20:41:47 +0530
Subject: [PATCH 1/7] Fixed the Border Rendering issues in
CollectionViewHandler2
---
.../TestCases.HostApp/Issues/Issue27608.xaml | 41 +++++++++++++++++++
.../Issues/Issue27608.xaml.cs | 15 +++++++
.../Tests/Issues/Issue27608.cs | 24 +++++++++++
3 files changed, 80 insertions(+)
create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml
create mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml.cs
create mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs
diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml
new file mode 100644
index 0000000000000..387883a9650fb
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml
@@ -0,0 +1,41 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml.cs
new file mode 100644
index 0000000000000..5bba4d1015a9c
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml.cs
@@ -0,0 +1,15 @@
+namespace Maui.Controls.Sample.Issues
+{
+ [Issue(IssueTracker.Github, 27608, "Items shapes are sometimes rendered incorrectly using CollectionView2Handler", PlatformAffected.iOS)]
+ public partial class Issue27608 : ContentPage
+ {
+ public Issue27608()
+ {
+ InitializeComponent();
+ const int count = 50;
+ Items = Enumerable.Range(1, count).ToList();
+ BindingContext = this;
+ }
+ public List Items { get; }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs
new file mode 100644
index 0000000000000..6c5b76c8aa8dd
--- /dev/null
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs
@@ -0,0 +1,24 @@
+using System.Threading;
+using NUnit.Framework;
+using UITest.Appium;
+using UITest.Core;
+
+namespace Microsoft.Maui.TestCases.Tests.Issues
+{
+ public class Issue27608 : _IssuesUITest
+ {
+ public Issue27608(TestDevice device) : base(device) { }
+
+ public override string Issue => "Items shapes are sometimes rendered incorrectly using CollectionView2Handler";
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void CollectionViewBorderItemsShouldRenderCorrectly()
+ {
+ App.WaitForElement("CollectionView");
+ App.ScrollRight("CollectionView", swipePercentage: 0.99);
+ Thread.Sleep(1000);
+ VerifyScreenshot();
+ }
+ }
+}
\ No newline at end of file
From 9a00d41c0b693362bf5b65232576125ee4074581 Mon Sep 17 00:00:00 2001
From: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
Date: Fri, 14 Feb 2025 21:07:55 +0530
Subject: [PATCH 2/7] Remove the unwanted namspace
---
.../tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs | 1 -
1 file changed, 1 deletion(-)
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs
index 6c5b76c8aa8dd..eb8f077b43d11 100644
--- a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs
@@ -1,4 +1,3 @@
-using System.Threading;
using NUnit.Framework;
using UITest.Appium;
using UITest.Core;
From c28174da3e3e80d3ba1f480b7753f7c263b656e9 Mon Sep 17 00:00:00 2001
From: Ahamed-Ali <102580874+Ahamed-Ali@users.noreply.github.com>
Date: Mon, 17 Feb 2025 12:54:28 +0530
Subject: [PATCH 3/7] Removed UI test and added the device test
---
.../CollectionView/CollectionViewTests.cs | 3 ++
.../CollectionView/CollectionViewTests.iOS.cs | 48 +++++++++++++++++++
.../TestCases.HostApp/Issues/Issue27608.xaml | 41 ----------------
.../Issues/Issue27608.xaml.cs | 15 ------
.../Tests/Issues/Issue27608.cs | 23 ---------
5 files changed, 51 insertions(+), 79 deletions(-)
delete mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml
delete mode 100644 src/Controls/tests/TestCases.HostApp/Issues/Issue27608.xaml.cs
delete mode 100644 src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue27608.cs
diff --git a/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.cs b/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.cs
index a4d646438d679..473a12c236fb8 100644
--- a/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.cs
+++ b/src/Controls/tests/DeviceTests/Elements/CollectionView/CollectionViewTests.cs
@@ -10,6 +10,7 @@
using Microsoft.Maui.Controls;
using Microsoft.Maui.Controls.Handlers.Compatibility;
using Microsoft.Maui.Controls.Handlers.Items;
+using Microsoft.Maui.Controls.Handlers.Items2;
using Microsoft.Maui.Controls.Platform;
using Microsoft.Maui.DeviceTests.Stubs;
using Microsoft.Maui.Graphics;
@@ -44,8 +45,10 @@ void SetupBuilder()
handlers.AddHandler