diff --git a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs index fd179a9a7f10..aee1b1dbd1c5 100644 --- a/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs +++ b/src/Controls/tests/TestCases.HostApp/CoreViews/CorePageView.cs @@ -193,6 +193,25 @@ public Task NavigateToGalleryPage(string pageTitle) return Task.FromResult(false); } + /// + /// Attempts to retrieve a gallery page by title. + /// + /// The title of the gallery page to find. + /// The Page instance if found; otherwise, null. + /// + /// This method searches for a matching gallery page by title (case-insensitive). + /// If a match is found, it invokes the associated Realize factory to create the page. + /// + public Page TryToGetGalleryPage(string pageTitle) + { + if (_titleToPage.TryGetValue(pageTitle.ToLowerInvariant(), out GalleryPageFactory pageFactory)) + { + return pageFactory.Realize(); + } + + return null; + } + public async Task NavigateToTest(string pageTitle) { var testCaseScreen = new TestCases.TestCaseScreen(); diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53179.cs b/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53179.cs index 72cf90036024..7492c94d8de3 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53179.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53179.cs @@ -22,7 +22,7 @@ class TestPage : ContentPage public TestPage(int index) { - nextBtn = new Button { AutomationId = "Next Page", Text = "Next Page" }; + nextBtn = new Button { AutomationId = $"Next Page {index}", Text = $"Next Page {index}" }; rmBtn = new Button { AutomationId = "Remove previous pages", Text = "Remove previous pages" }; popBtn = new Button { AutomationId = "Back", Text = "Back" }; diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53834.cs b/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53834.cs index bd1bc6b42b4c..5519e0828f68 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53834.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla53834.cs @@ -44,6 +44,7 @@ protected override void Init() lstView = new ListView() { IsGroupingEnabled = true, + VerticalScrollBarVisibility = ScrollBarVisibility.Never, HasUnevenRows = true, ItemTemplate = new DataTemplate(typeof(MyViewCell)), GroupHeaderTemplate = new DataTemplate(typeof(MyHeaderViewCell)), diff --git a/src/Controls/tests/TestCases.HostApp/Issues/CollectionViewVisibility.cs b/src/Controls/tests/TestCases.HostApp/Issues/CollectionViewVisibility.cs deleted file mode 100644 index 9a064a8fd411..000000000000 --- a/src/Controls/tests/TestCases.HostApp/Issues/CollectionViewVisibility.cs +++ /dev/null @@ -1,31 +0,0 @@ -namespace Maui.Controls.Sample.Issues -{ - // InitiallyInvisbleCollectionViewSurvivesiOSLayoutNonsense(src\Compatibility\ControlGallery\src\Issues.Shared\Issue12714.cs) - [Issue(IssueTracker.None, 12714, "iOS application suspended at UICollectionViewFlowLayout.PrepareLayout() when using IsVisible = false", PlatformAffected.iOS)] - public class CollectionViewVisibility : ContentPage - { - const string Success = "Success"; - const string Show = "Show"; - - public CollectionViewVisibility() - { - var items = new List() { "uno", "dos", "tres", Success }; - var cv = new CollectionView - { - ItemsSource = items, - IsVisible = false, - ItemsLayout = new GridItemsLayout(2, ItemsLayoutOrientation.Vertical) - }; - - var layout = new StackLayout() { Margin = 40 }; - - var button = new Button { AutomationId = Show, Text = Show }; - button.Clicked += (sender, args) => { cv.IsVisible = !cv.IsVisible; }; - - layout.Children.Add(button); - layout.Children.Add(cv); - - Content = layout; - } - } -} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue18161.xaml.cs b/src/Controls/tests/TestCases.HostApp/Issues/Issue18161.xaml.cs index bfe8c771cb5b..b4b49cb67164 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue18161.xaml.cs +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue18161.xaml.cs @@ -13,6 +13,9 @@ async void Issue18161_Loaded(object sender, EventArgs e) { // https://github.com/dotnet/maui/issues/13496 await Task.Yield(); +#if MACCATALYST + await Task.Delay(500); // Add delay for MacCatalyst when page is loaded directly as window root +#endif this.IsPresented = true; } diff --git a/src/Controls/tests/TestCases.HostApp/Issues/Issue19657.xaml b/src/Controls/tests/TestCases.HostApp/Issues/Issue19657.xaml index 470b8552a130..4d679ac53424 100644 --- a/src/Controls/tests/TestCases.HostApp/Issues/Issue19657.xaml +++ b/src/Controls/tests/TestCases.HostApp/Issues/Issue19657.xaml @@ -2,6 +2,7 @@ @@ -20,7 +21,7 @@