diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
index 9f2fc6c54f1a..61d2bfa29c0c 100644
--- a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
+++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs
@@ -77,6 +77,7 @@ public override string ToString()
new GalleryPageFactory(() => new TimePickerCoreGalleryPage(), "Time Picker Gallery"),
new GalleryPageFactory(() => new WebViewCoreGalleryPage(), "WebView Gallery"),
new GalleryPageFactory(() => new SliderControlPage(), "Slider Feature Matrix"),
+ new GalleryPageFactory(() => new HeaderFooterMainPage(), "CollectionView Feature Matrix"),
};
public CorePageView(Page rootPage)
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewControlPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewControlPage.xaml
new file mode 100644
index 000000000000..5c49a597e156
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewControlPage.xaml
@@ -0,0 +1,28 @@
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewControlPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewControlPage.xaml.cs
new file mode 100644
index 000000000000..27e08b4408c5
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewControlPage.xaml.cs
@@ -0,0 +1,26 @@
+using System;
+using Microsoft.Maui.Controls;
+using System.Collections.ObjectModel;
+
+namespace Maui.Controls.Sample
+{
+ public partial class CollectionViewControlPage : ContentPage
+ {
+ private CollectionViewViewModel _viewModel;
+
+ public CollectionViewControlPage()
+ {
+ InitializeComponent();
+ _viewModel = new CollectionViewViewModel();
+ _viewModel.ItemsSourceType = ItemsSourceType.ObservableCollection5T;
+ BindingContext = _viewModel;
+ }
+
+ private async void NavigateToOptionsPage_Clicked(object sender, EventArgs e)
+ {
+ BindingContext = _viewModel = new CollectionViewViewModel();
+ _viewModel.ItemsSourceType = ItemsSourceType.ObservableCollection5T;
+ await Navigation.PushAsync(new CollectionViewOptionsPage(_viewModel));
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewOptionsPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewOptionsPage.xaml
new file mode 100644
index 000000000000..7460999f5a1e
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewOptionsPage.xaml
@@ -0,0 +1,275 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewOptionsPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewOptionsPage.xaml.cs
new file mode 100644
index 000000000000..ccf26c04cc54
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewOptionsPage.xaml.cs
@@ -0,0 +1,278 @@
+using System;
+using Microsoft.Maui.Controls;
+using System.Collections.ObjectModel;
+using Maui.Controls.Sample.CollectionViewGalleries;
+
+namespace Maui.Controls.Sample
+{
+ public partial class CollectionViewOptionsPage : ContentPage
+ {
+ private CollectionViewViewModel _viewModel;
+
+ public CollectionViewOptionsPage(CollectionViewViewModel viewModel)
+ {
+ InitializeComponent();
+ _viewModel = viewModel;
+ BindingContext = _viewModel;
+ }
+
+ private void ApplyButton_Clicked(object sender, EventArgs e)
+ {
+ Navigation.PopAsync();
+ }
+
+ private void OnEmptyViewChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (EmptyViewNone.IsChecked)
+ {
+ _viewModel.EmptyView = null;
+ }
+ else if (EmptyViewString.IsChecked)
+ {
+ _viewModel.EmptyView = "No Items Available(String)";
+ }
+ }
+
+ private void OnHeaderChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (HeaderNone.IsChecked)
+ {
+ _viewModel.Header = null;
+ }
+ else if (HeaderString.IsChecked)
+ {
+ _viewModel.Header = "CollectionView Header(String)";
+ }
+ else if (HeaderGrid.IsChecked)
+ {
+ Grid grid = new Grid
+ {
+ BackgroundColor = Colors.LightGray,
+ Padding = new Thickness(10)
+ };
+ grid.Children.Add(new Label
+ {
+ Text = "CollectionView Header(Grid View)",
+ FontSize = 18,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ TextColor = Colors.Blue,
+ AutomationId = "HeaderViewLabel"
+ });
+ _viewModel.Header = grid;
+ }
+ }
+
+ private void OnFooterChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (FooterNone.IsChecked)
+ {
+ _viewModel.Footer = null;
+ }
+ else if (FooterString.IsChecked)
+ {
+ _viewModel.Footer = "CollectionView Footer(String)";
+ }
+ else if (FooterGrid.IsChecked)
+ {
+ Grid grid = new Grid
+ {
+ BackgroundColor = Colors.LightGray,
+ Padding = new Thickness(10)
+ };
+ grid.Children.Add(new Label
+ {
+ Text = "CollectionView Footer(Grid View)",
+ FontSize = 18,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ TextColor = Colors.Red,
+ AutomationId = "FooterViewLabel"
+ });
+ _viewModel.Footer = grid;
+ }
+ }
+
+ private void OnHeaderTemplateChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (HeaderTemplateNone.IsChecked)
+ {
+ _viewModel.HeaderTemplate = null;
+ }
+ else if (HeaderTemplateGrid.IsChecked)
+ {
+ _viewModel.HeaderTemplate = new DataTemplate(() =>
+ {
+ Grid grid = new Grid
+ {
+ BackgroundColor = Colors.LightGray,
+ Padding = new Thickness(10)
+ };
+ grid.Children.Add(new Label
+ {
+ Text = "Header Template(Grid View)",
+ FontSize = 18,
+ FontAttributes = FontAttributes.Bold,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ TextColor = Colors.Blue,
+ AutomationId = "HeaderTemplateLabel"
+ });
+ return grid;
+ });
+ }
+ }
+
+ private void OnFooterTemplateChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (FooterTemplateNone.IsChecked)
+ {
+ _viewModel.FooterTemplate = null;
+ }
+ else if (FooterTemplateGrid.IsChecked)
+ {
+ _viewModel.FooterTemplate = new DataTemplate(() =>
+ {
+ Grid grid = new Grid
+ {
+ BackgroundColor = Colors.LightGray,
+ Padding = new Thickness(10)
+ };
+ grid.Children.Add(new Label
+ {
+ Text = "Footer Template(Grid View)",
+ FontSize = 18,
+ FontAttributes = FontAttributes.Bold,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ TextColor = Colors.Green,
+ AutomationId = "FooterTemplateLabel"
+ });
+ return grid;
+ });
+ }
+ }
+
+ private void OnGroupHeaderTemplateChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (GroupHeaderTemplateNone.IsChecked)
+ {
+ _viewModel.GroupHeaderTemplate = null;
+ }
+ else if (GroupHeaderTemplateGrid.IsChecked)
+ {
+ _viewModel.GroupHeaderTemplate = new DataTemplate(() =>
+ {
+ Grid grid = new Grid
+ {
+ BackgroundColor = Colors.LightGray,
+ Padding = new Thickness(10)
+ };
+ grid.Children.Add(new Label
+ {
+ Text = "Group Header Template(Grid View)",
+ FontSize = 18,
+ FontAttributes = FontAttributes.Bold,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ TextColor = Colors.Green,
+ AutomationId = "GroupHeaderTemplateLabel"
+ });
+ return grid;
+ });
+ }
+ }
+ private void OnGroupFooterTemplateChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (GroupFooterTemplateNone.IsChecked)
+ {
+ _viewModel.GroupFooterTemplate = null;
+ }
+ else if (GroupFooterTemplateGrid.IsChecked)
+ {
+ _viewModel.GroupFooterTemplate = new DataTemplate(() =>
+ {
+ Grid grid = new Grid
+ {
+ BackgroundColor = Colors.LightGray,
+ Padding = new Thickness(10)
+ };
+ grid.Children.Add(new Label
+ {
+ Text = "Group Footer Template(Grid View)",
+ FontSize = 18,
+ FontAttributes = FontAttributes.Bold,
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center,
+ TextColor = Colors.Red,
+ AutomationId = "GroupFooterTemplateLabel"
+ });
+ return grid;
+ });
+ }
+ }
+ private void OnIsGroupedChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (IsGroupedFalse.IsChecked)
+ {
+ _viewModel.IsGrouped = false;
+ }
+ else if (IsGroupedTrue.IsChecked)
+ {
+ _viewModel.IsGrouped = true;
+ }
+ }
+
+ private void OnItemTemplateChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (ItemTemplateNone.IsChecked)
+ {
+ _viewModel.ItemTemplate = null;
+ }
+ else if (ItemTemplateBasic.IsChecked)
+ {
+ _viewModel.ItemTemplate = new DataTemplate(() =>
+ {
+ var label = new Label();
+ label.SetBinding(Label.TextProperty, new Binding("Caption"));
+
+ return label;
+ });
+ }
+ }
+
+ private void OnItemsLayoutChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (ItemsLayoutVerticalList.IsChecked)
+ {
+ _viewModel.ItemsLayout = new LinearItemsLayout(ItemsLayoutOrientation.Vertical);
+ }
+ else if (ItemsLayoutHorizontalList.IsChecked)
+ {
+ _viewModel.ItemsLayout = new LinearItemsLayout(ItemsLayoutOrientation.Horizontal);
+ }
+ else if (ItemsLayoutVerticalGrid.IsChecked)
+ {
+ _viewModel.ItemsLayout = new GridItemsLayout(2, ItemsLayoutOrientation.Vertical); // 2 columns
+ }
+ else if (ItemsLayoutHorizontalGrid.IsChecked)
+ {
+ _viewModel.ItemsLayout = new GridItemsLayout(2, ItemsLayoutOrientation.Horizontal); // 2 rows
+ }
+ }
+
+ private void OnItemsSourceChanged(object sender, CheckedChangedEventArgs e)
+ {
+ if (!(sender is RadioButton radioButton) || !e.Value)
+ return;
+ if (radioButton == ItemsSourceObservableCollection25)
+ _viewModel.ItemsSourceType = ItemsSourceType.ObservableCollection25T;
+ else if (radioButton == ItemsSourceObservableCollection5)
+ _viewModel.ItemsSourceType = ItemsSourceType.ObservableCollection5T;
+ else if (radioButton == ItemsSourceGroupedList)
+ _viewModel.ItemsSourceType = ItemsSourceType.GroupedListT;
+ else if (radioButton == ItemsSourceNone)
+ _viewModel.ItemsSourceType = ItemsSourceType.None;
+ }
+ }
+}
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewViewModel.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewViewModel.cs
new file mode 100644
index 000000000000..76d61f1ed6f3
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/CollectionViewViewModel.cs
@@ -0,0 +1,293 @@
+using System;
+using System.Collections.Generic;
+using System.Collections.ObjectModel;
+using System.ComponentModel;
+using System.Linq;
+using System.Runtime.CompilerServices;
+using Microsoft.Maui.Controls;
+using Microsoft.Maui.Graphics;
+using Maui.Controls.Sample.CollectionViewGalleries;
+
+namespace Maui.Controls.Sample
+{
+ public class Grouping : ObservableCollection
+ {
+ public TKey Key { get; }
+
+ public Grouping(TKey key, IEnumerable items) : base(items)
+ {
+ Key = key;
+ }
+ }
+
+ public enum ItemsSourceType
+ {
+ None,
+ ObservableCollection25T,
+ ObservableCollection5T,
+ GroupedListT,
+ EmptyGroupedListT,
+ EmptyObservableCollectionT
+ }
+ public class CollectionViewViewModel : INotifyPropertyChanged
+ {
+ private object _emptyView;
+ private object _header;
+ private object _footer;
+ private DataTemplate _emptyViewTemplate;
+ private DataTemplate _headerTemplate;
+ private DataTemplate _footerTemplate;
+ private DataTemplate _groupHeaderTemplate;
+ private DataTemplate _groupFooterTemplate;
+ private DataTemplate _itemTemplate;
+ private IItemsLayout _itemsLayout = new LinearItemsLayout(ItemsLayoutOrientation.Vertical);
+ private ItemsSourceType _itemsSourceType = ItemsSourceType.None;
+ private bool _isGrouped = false;
+ private ObservableCollection _observableCollection25;
+ private ObservableCollection _observableCollection5;
+ private ObservableCollection _emptyObservableCollection;
+ private List> _groupedList;
+ private List> _emptyGroupedList;
+ public event PropertyChangedEventHandler PropertyChanged;
+
+ public CollectionViewViewModel()
+ {
+ LoadItems();
+ ItemTemplate = new DataTemplate(() =>
+ {
+ var stackLayout = new StackLayout
+ {
+ Padding = new Thickness(10),
+ HorizontalOptions = LayoutOptions.Center,
+ VerticalOptions = LayoutOptions.Center
+ };
+
+ var label = new Label
+ {
+ VerticalOptions = LayoutOptions.Center,
+ HorizontalOptions = LayoutOptions.Center
+ };
+ label.SetBinding(Label.TextProperty, "Caption");
+ stackLayout.Children.Add(label);
+ return stackLayout;
+ });
+
+ GroupHeaderTemplate = new DataTemplate(() =>
+ {
+ var stackLayout = new StackLayout
+ {
+ BackgroundColor = Colors.LightGray
+ };
+ var label = new Label
+ {
+ FontAttributes = FontAttributes.Bold,
+ FontSize = 18
+ };
+ label.SetBinding(Label.TextProperty, "Key");
+ stackLayout.Children.Add(label);
+ return stackLayout;
+ });
+ }
+
+ public object EmptyView
+ {
+ get => _emptyView;
+ set { _emptyView = value; OnPropertyChanged(); }
+ }
+
+ public object Header
+ {
+ get => _header;
+ set { _header = value; OnPropertyChanged(); }
+ }
+
+ public object Footer
+ {
+ get => _footer;
+ set { _footer = value; OnPropertyChanged(); }
+ }
+
+ public DataTemplate EmptyViewTemplate
+ {
+ get => _emptyViewTemplate;
+ set { _emptyViewTemplate = value; OnPropertyChanged(); }
+ }
+
+ public DataTemplate HeaderTemplate
+ {
+ get => _headerTemplate;
+ set { _headerTemplate = value; OnPropertyChanged(); }
+ }
+
+ public DataTemplate FooterTemplate
+ {
+ get => _footerTemplate;
+ set { _footerTemplate = value; OnPropertyChanged(); }
+ }
+
+ public DataTemplate GroupHeaderTemplate
+ {
+ get => _groupHeaderTemplate;
+ set { _groupHeaderTemplate = value; OnPropertyChanged(); }
+ }
+
+ public DataTemplate GroupFooterTemplate
+ {
+ get => _groupFooterTemplate;
+ set { _groupFooterTemplate = value; OnPropertyChanged(); }
+ }
+
+ public DataTemplate ItemTemplate
+ {
+ get => _itemTemplate;
+ set { _itemTemplate = value; OnPropertyChanged(); }
+ }
+
+ public IItemsLayout ItemsLayout
+ {
+ get => _itemsLayout;
+ set
+ {
+ if (_itemsLayout != value)
+ {
+ _itemsLayout = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ public ItemsSourceType ItemsSourceType
+ {
+ get => _itemsSourceType;
+ set
+ {
+ if (_itemsSourceType != value)
+ {
+ _itemsSourceType = value;
+ OnPropertyChanged();
+ OnPropertyChanged(nameof(ItemsSource));
+ }
+ }
+ }
+
+ public bool IsGrouped
+ {
+ get => _isGrouped;
+ set
+ {
+ if (_isGrouped != value)
+ {
+ _isGrouped = value;
+ OnPropertyChanged();
+ }
+ }
+ }
+
+ public object ItemsSource
+ {
+ get
+ {
+ return ItemsSourceType switch
+ {
+ ItemsSourceType.ObservableCollection25T => _observableCollection25,
+ ItemsSourceType.ObservableCollection5T => _observableCollection5,
+ ItemsSourceType.GroupedListT => _groupedList,
+ ItemsSourceType.EmptyGroupedListT => _emptyGroupedList,
+ ItemsSourceType.EmptyObservableCollectionT => _emptyObservableCollection,
+ ItemsSourceType.None => null,
+ _ => null
+ };
+ }
+ }
+
+
+ private void LoadItems()
+ {
+ _observableCollection25 = new ObservableCollection();
+ _observableCollection5 = new ObservableCollection();
+ AddItems(_observableCollection5, 5, "Fruits");
+ AddItems(_observableCollection25, 10, "Fruits");
+ AddItems(_observableCollection25, 10, "Vegetables");
+
+ _emptyObservableCollection = new ObservableCollection();
+
+ _groupedList = new List>
+ {
+ new Grouping("Fruits", new List()),
+ new Grouping("Vegetables", new List())
+ };
+
+ AddItems(_groupedList[0], 4, "Fruits");
+ AddItems(_groupedList[1], 4, "Vegetables");
+
+ _emptyGroupedList = new List>();
+ }
+
+
+ private void AddItems(IList list, int count, string category)
+ {
+ string[] fruits =
+ {
+ "Apple", "Banana", "Orange", "Grapes", "Mango",
+ "Pineapple", "Strawberry", "Blueberry", "Peach", "Cherry",
+ "Watermelon", "Papaya", "Kiwi", "Pear", "Plum",
+ "Avocado", "Fig", "Guava", "Lychee", "Pomegranate",
+ "Lime", "Lemon", "Coconut", "Apricot", "Blackberry"
+ };
+
+ string[] vegetables =
+ {
+ "Carrot", "Broccoli", "Spinach", "Potato", "Tomato",
+ "Cucumber", "Lettuce", "Onion", "Garlic", "Pepper",
+ "Zucchini", "Pumpkin", "Radish", "Beetroot", "Cabbage",
+ "Sweet Potato", "Turnip", "Cauliflower", "Celery", "Asparagus",
+ "Eggplant", "Chili", "Corn", "Peas", "Mushroom"
+ };
+
+ string[] items = category == "Fruits" ? fruits : vegetables;
+
+ for (int n = 0; n < count; n++)
+ {
+ list.Add(new CollectionViewTestItem(items[n % items.Length], n)); // Pass the index
+ }
+ }
+
+ protected void OnPropertyChanged([CallerMemberName] string propertyName = null)
+ {
+ if (propertyName == nameof(IsGrouped))
+ {
+ OnPropertyChanged(nameof(ItemsSource));
+ }
+
+ PropertyChanged?.Invoke(this, new PropertyChangedEventArgs(propertyName));
+ }
+
+ public class CustomDataTemplateSelector : DataTemplateSelector
+ {
+ public DataTemplate Template1 { get; set; }
+ public DataTemplate Template2 { get; set; }
+
+ protected override DataTemplate OnSelectTemplate(object item, BindableObject container)
+ {
+ if (item is CollectionViewTestItem testItem)
+ {
+ return testItem.Index % 2 == 0 ? Template1 : Template2;
+ }
+
+ return Template1;
+ }
+ }
+
+ public class CollectionViewTestItem
+ {
+ public string Caption { get; set; }
+ public int Index { get; set; }
+
+ public CollectionViewTestItem(string caption, int index)
+ {
+ Caption = caption;
+ Index = index;
+ }
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/HeaderFooterMainPage.xaml b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/HeaderFooterMainPage.xaml
new file mode 100644
index 000000000000..c98e25007ce5
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/HeaderFooterMainPage.xaml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/HeaderFooterMainPage.xaml.cs b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/HeaderFooterMainPage.xaml.cs
new file mode 100644
index 000000000000..dfdacdea8cc4
--- /dev/null
+++ b/src/Controls/tests/TestCases.HostApp/FeatureMatrix/CollectionView/HeaderFooterMainPage.xaml.cs
@@ -0,0 +1,26 @@
+using System;
+using Microsoft.Maui.Controls;
+
+namespace Maui.Controls.Sample
+{
+ public class HeaderFooterMainPage : NavigationPage
+ {
+ public HeaderFooterMainPage()
+ {
+ PushAsync(new HeaderFooterContentPage());
+ }
+ }
+
+ public partial class HeaderFooterContentPage : ContentPage
+ {
+ public HeaderFooterContentPage()
+ {
+ InitializeComponent();
+ }
+
+ private async void OnHeaderFooterViewButtonClicked(object sender, EventArgs e)
+ {
+ await Navigation.PushAsync(new CollectionViewControlPage());
+ }
+ }
+}
\ No newline at end of file
diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_HeaderFooterFeatureTests.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_HeaderFooterFeatureTests.cs
new file mode 100644
index 000000000000..5a1e132ac128
--- /dev/null
+++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/FeatureMatrix/CollectionView_HeaderFooterFeatureTests.cs
@@ -0,0 +1,1762 @@
+using NUnit.Framework;
+using UITest.Appium;
+using UITest.Core;
+
+
+namespace Microsoft.Maui.TestCases.Tests
+{
+ public class CollectionView_HeaderFooterFeatureTests : UITest
+ {
+ public const string HeaderFooterFeatureMatrix = "CollectionView Feature Matrix";
+
+ public CollectionView_HeaderFooterFeatureTests(TestDevice device)
+ : base(device)
+ {
+ }
+
+ protected override void FixtureSetup()
+ {
+ base.FixtureSetup();
+ App.NavigateToGallery(HeaderFooterFeatureMatrix);
+ }
+
+#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST //In CV2, unintended synchronization between the HeaderTemplate/FooterTemplate and Header/Footer views, related issue: https://github.com/dotnet/maui/issues/28504
+ [Test, Order(1)]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithItemsSourceObservableCollection25()
+ {
+ App.WaitForElementTillPageNavigationSettled("HeaderFooterViewButton");
+ App.Tap("HeaderFooterViewButton");
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceObservableCollection25");
+ App.Tap("ItemsSourceObservableCollection25");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollDown("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Pepper");
+ App.WaitForNoElement("CollectionView Header(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithItemsSourceObservableCollection5()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithItemsSourceNone()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithItemsSourceObservableCollection25()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceObservableCollection25");
+ App.Tap("ItemsSourceObservableCollection25");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollDown("CollectionViewControl",ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Pepper");
+ App.WaitForNoElement("CollectionView Header(Grid View)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithItemsSourceObservableCollection5()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceObservableCollection5");
+ App.Tap("ItemsSourceObservableCollection5");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithItemsSourceNone()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ }
+
+#if TEST_FAILS_ON_WINDOWS //related issues:https://github.com/dotnet/maui/issues/28022
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithEmptyViewString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("EmptyViewString");
+ App.Tap("EmptyViewString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("No Items Available(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithEmptyViewString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("EmptyViewString");
+ App.Tap("EmptyViewString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("No Items Available(String)");
+ }
+#endif
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithFooterString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithFooterView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithFooterView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithFooterString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+#if TEST_FAILS_ON_ANDROID //related issue: https://github.com/dotnet/maui/issues/28334
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWhenFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWhenFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS //In CV2 related issue: https://github.com/dotnet/maui/issues/28509, In windows related issue: https://github.com/dotnet/maui/issues/28824
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWhenGroupHeaderTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateGrid");
+ App.Tap("GroupHeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWhenGroupHeaderTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateGrid");
+ App.Tap("GroupHeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWhenGroupFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateGrid");
+ App.Tap("GroupFooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWhenGroupFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateGrid");
+ App.Tap("GroupFooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ }
+#endif
+
+#if TEST_FAILS_ON_WINDOWS //related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWhenHeaderTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWhenHeaderTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+#endif
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS //relate issue: https://github.com/dotnet/maui/issues/28824
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWhenIsGroupedTrueOrFalse()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedFalse");
+ App.Tap("IsGroupedFalse");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWhenIsGroupedTrueOrFalse()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedFalse");
+ App.Tap("IsGroupedFalse");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+#endif
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWhenBasicDataTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("ItemTemplateBasic");
+ App.Tap("ItemTemplateBasic");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWhenBasicDataTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemTemplateBasic");
+ App.Tap("ItemTemplateBasic");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ }
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST &&TEST_FAILS_ON_IOS //In windows, related issue: https://github.com/dotnet/maui/issues/27946 and In CV2, related issue: https://github.com/dotnet/maui/issues/28678
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithItemsLayoutVerticalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutVerticalGrid");
+ App.Tap("ItemsLayoutVerticalGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithItemsLayoutVerticalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutVerticalGrid");
+ App.Tap("ItemsLayoutVerticalGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithItemsLayoutHorizontalList()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalList");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithItemsLayoutHorizontalList()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalList");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderViewWithItemsLayoutHorizontalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalGrid");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderStringWithItemsLayoutHorizontalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalGrid");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+#endif
+
+
+#if TEST_FAILS_ON_ANDROID //related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWithItemsSourceObserableCollection5()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWithItemsSourceObserableCollection25()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceObservableCollection25");
+ App.Tap("ItemsSourceObservableCollection25");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollDown("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Pepper");
+ App.WaitForNoElement("Header Template(Grid View)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWithItemsSourceNone()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS //In windows related issue:https://github.com/dotnet/maui/issues/28022, In related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWhenEmptyViewString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("EmptyViewString");
+ App.Tap("EmptyViewString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("No Items Available(String)");
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID //related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTempalteWhenFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS //In CV2: related issue: https://github.com/dotnet/maui/issues/28824 and In windows: https://github.com/dotnet/maui/issues/28824
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWhenGroupFooterTemplate()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateGrid");
+ App.Tap("GroupFooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWhenGroupHeaderTemplate()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateGrid");
+ App.Tap("GroupHeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ }
+#endif
+#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS //In CV2, unintended synchronization between the HeaderTemplate/FooterTemplate and Header/Footer views, related issue: https://github.com/dotnet/maui/issues/28504
+//In windows, related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWhenHeaderString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWhenHeaderView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForNoElement("HeaderViewLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS //In all platforms, issue related: https://github.com/dotnet/maui/issues/28824 and CV2, related issues:https://github.com/dotnet/maui/issues/28504
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWhenIsGroupedTrueOrFalse()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedFalse");
+ App.Tap("IsGroupedFalse");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+#endif
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWhenBasicDataTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemTemplateBasic");
+ App.Tap("ItemTemplateBasic");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST &&TEST_FAILS_ON_IOS && TEST_FAILS_ON_ANDROID //In windows, related issue: https://github.com/dotnet/maui/issues/27946, In CV2, related issue: https://github.com/dotnet/maui/issues/28678 and In android related issue:https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWithItemsLayoutVerticalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutVerticalGrid");
+ App.Tap("ItemsLayoutVerticalGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWithItemsLayoutHorizontalList()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalList");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyHeaderTemplateWithItemsLayoutHorizontalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalGrid");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+#endif
+
+#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST //In CV2, unintended synchronization between the HeaderTemplate/FooterTemplate and Header/Footer views, related issue: https://github.com/dotnet/maui/issues/28504
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWithItemsSourceObservableCollection5()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWithItemsSourceNone()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWithItemsSourceObservableCollection25()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceObservableCollection25");
+ App.Tap("ItemsSourceObservableCollection25");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollDown("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Pepper");
+ App.WaitForElement("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWithItemsSourceObservableCollection5()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWithItemsSourceObservableCollection25()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceObservableCollection25");
+ App.Tap("ItemsSourceObservableCollection25");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("CollectionView Footer(Grid View)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollDown("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Pepper");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(Grid View)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWithItemsSourceNone()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS //In android related issue:https://github.com/dotnet/maui/issues/28622, In windows related issue:https://github.com/dotnet/maui/issues/28022 and In CV2, related issue: https://github.com/dotnet/maui/issues/28604
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenEmptyViewString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("EmptyViewString");
+ App.Tap("EmptyViewString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("No Items Available(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenEmptyViewString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("EmptyViewString");
+ App.Tap("EmptyViewString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("No Items Available(String)");
+ }
+#endif
+
+#if TEST_FAILS_ON_WINDOWS //In Windows related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS//In CV2 related issues:https://github.com/dotnet/maui/issues/28509
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenGroupFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateGrid");
+ App.Tap("GroupFooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Fruits");
+ App.WaitForElementTillPageNavigationSettled("Vegetables");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenGroupFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateGrid");
+ App.Tap("GroupFooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Fruits");
+ App.WaitForElementTillPageNavigationSettled("Vegetables");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenGroupHeaderTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateGrid");
+ App.Tap("GroupHeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenGroupHeaderTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateGrid");
+ App.Tap("GroupHeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateLabel");
+ }
+#endif
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenHeaderString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenHeaderString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenHeaderView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenHeaderView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+
+#if TEST_FAILS_ON_ANDROID //related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenHeaderTemplate()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenHeaderTemplate()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS //related isssue: https://github.com/dotnet/maui/issues/28824
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenIsGroupedTrueOrFalse()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedFalse");
+ App.Tap("IsGroupedFalse");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenIsGroupedTrueOrFalse()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedFalse");
+ App.Tap("IsGroupedFalse");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+#endif
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWhenBasicDataTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("ItemTemplateBasic");
+ App.Tap("ItemTemplateBasic");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWhenBasicDataTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemTemplateBasic");
+ App.Tap("ItemTemplateBasic");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST &&TEST_FAILS_ON_IOS //In windows, related issue: https://github.com/dotnet/maui/issues/27946 and In CV2, related issue: https://github.com/dotnet/maui/issues/28678
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWithItemsLayoutVerticalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutVerticalGrid");
+ App.Tap("ItemsLayoutVerticalGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWithItemsLayoutVerticalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutVerticalGrid");
+ App.Tap("ItemsLayoutVerticalGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWithItemsLayoutHorizontalList()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalList");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWithItemsLayoutHorizontalList()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalList");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterStringWithItemsLayoutHorizontalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalGrid");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterViewWithItemsLayoutHorizontalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalGrid");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterViewLabel");
+ }
+#endif
+#endif
+
+#if TEST_FAILS_ON_ANDROID //related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWithItemsSourceObservableCollections5()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+#endif
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWithItemsSourceObservableCollections25()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceObservableCollection25");
+ App.Tap("ItemsSourceObservableCollection25");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("Footer Template(Grid View)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollDown("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Pepper");
+ App.WaitForElementTillPageNavigationSettled("Footer Template(Grid View)");
+ }
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWithItemsSourceNone()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS //In windows related issue:https://github.com/dotnet/maui/issues/28022, In android: https://github.com/dotnet/maui/issues/28101 and In CV2, related issue: https://github.com/dotnet/maui/issues/28604 and https://github.com/dotnet/maui/issues/28504
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenEmptyViewString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceNone");
+ App.Tap("ItemsSourceNone");
+ App.WaitForElementTillPageNavigationSettled("EmptyViewString");
+ App.Tap("EmptyViewString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("No Items Available(String)");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS //In Windows, related issue: https://github.com/dotnet/maui/issues/28337 and In CV2, related issue: https://github.com/dotnet/maui/issues/28504
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenFooterString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("FooterString");
+ App.Tap("FooterString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForNoElement("CollectionView Footer(String)");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenFooterView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("FooterGrid");
+ App.Tap("FooterGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForNoElement("FooterViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_IOS && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_WINDOWS //In CV2 related issues: https://github.com/dotnet/maui/issues/28509 and In windows, related issue: https://github.com/dotnet/maui/issues/28824
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenGroupFooterTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateGrid");
+ App.Tap("GroupFooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Fruits");
+ App.WaitForElementTillPageNavigationSettled("Vegetables");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ App.WaitForElementTillPageNavigationSettled("GroupFooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenGroupHeaderTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("ItemsSourceGroupedList");
+ App.Tap("ItemsSourceGroupedList");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateGrid");
+ App.Tap("GroupHeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Potato");
+ App.WaitForElementTillPageNavigationSettled("GroupHeaderTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS //In android,related issue: https://github.com/dotnet/maui/issues/28337 and In CV2, reltaed issue:https://github.com/dotnet/maui/issues/28504
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenHeaderString()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderString");
+ App.Tap("HeaderString");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("CollectionView Header(String)");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenHeaderView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderGrid");
+ App.Tap("HeaderGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderViewLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID //In android,related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenHeaderTemplate()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateGrid");
+ App.Tap("HeaderTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("HeaderTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+#endif
+
+#if TEST_FAILS_ON_ANDROID && TEST_FAILS_ON_CATALYST && TEST_FAILS_ON_IOS && TEST_FAILS_ON_WINDOWS //related issue: https://github.com/dotnet/maui/issues/28824
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenIsGroupedTrueOrFalse()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedTrue");
+ App.Tap("IsGroupedTrue");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("IsGroupedFalse");
+ App.Tap("IsGroupedFalse");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ }
+#endif
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWhenBasicDataTemplateView()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemTemplateBasic");
+ App.Tap("ItemTemplateBasic");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ }
+
+#if TEST_FAILS_ON_WINDOWS && TEST_FAILS_ON_CATALYST &&TEST_FAILS_ON_IOS && TEST_FAILS_ON_ANDROID //In windows, related issue: https://github.com/dotnet/maui/issues/27946, In CV2, related issue: https://github.com/dotnet/maui/issues/28678, In android related issue: https://github.com/dotnet/maui/issues/28337
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWithItemsLayoutVerticalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutVerticalGrid");
+ App.Tap("ItemsLayoutVerticalGrid");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWithItemsLayoutHorizontalList()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalList");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+ }
+
+ [Test]
+ [Category(UITestCategories.CollectionView)]
+ public void VerifyFooterTemplateWithItemsLayoutHorizontalGrid()
+ {
+ App.WaitForElementTillPageNavigationSettled("Options");
+ App.Tap("Options");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateGrid");
+ App.Tap("FooterTemplateGrid");
+ App.WaitForElementTillPageNavigationSettled("ItemsLayoutHorizontalGrid");
+ App.Tap("ItemsLayoutHorizontalList");
+ App.WaitForElementTillPageNavigationSettled("Apply");
+ App.Tap("Apply");
+ App.WaitForElementTillPageNavigationSettled("Apple");
+ App.ScrollRight("CollectionViewControl", ScrollStrategy.Gesture, 0.9, 500);
+ App.WaitForElementTillPageNavigationSettled("Mango");
+ App.WaitForElementTillPageNavigationSettled("FooterTemplateLabel");
+
+ }
+#endif
+#endif
+ }
+}
\ No newline at end of file