Skip to content

Commit 9ca2015

Browse files
Shalini-AshokanPureWeen
authored andcommitted
[Testing] Fix Bugzilla41842 test by replacing raw Page with ContentPage (#31862)
* Modified the test * Modified the test case
1 parent 419e7bb commit 9ca2015

File tree

2 files changed

+6
-7
lines changed

2 files changed

+6
-7
lines changed

src/Controls/tests/TestCases.HostApp/Issues/Bugzilla/Bugzilla41842.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ protected override void Init()
88
{
99
FlyoutLayoutBehavior = FlyoutLayoutBehavior.Split;
1010

11-
Flyout = new Page() { Title = "Flyout" };
11+
Flyout = new ContentPage() { Title = "Flyout", Content = new Label { Text = "Flyout Content", AutomationId = "FlyoutLabel" } };
1212

13-
Detail = new NavigationPage(new Page());
13+
Detail = new NavigationPage(new ContentPage());
1414
Detail = new NavigationPage(new ContentPage { Content = new Label { AutomationId = "Success", Text = "Success" } });
1515
}
1616
}

src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Bugzilla/Bugzilla41842.cs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,17 +12,16 @@ public Bugzilla41842(TestDevice testDevice) : base(testDevice)
1212

1313
public override string Issue => "Set FlyoutPage.Detail = New Page() twice will crash the application when set FlyoutLayoutBehavior = FlyoutLayoutBehavior.Split";
1414

15-
// Crash after navigation
16-
/*
1715
[Test]
18-
[Ignore("The sample is crashing.")]
1916
[Category(UITestCategories.FlyoutPage)]
2017
[Category(UITestCategories.Compatibility)]
21-
[FailsOnAllPlatformsWhenRunningOnXamarinUITest("The sample is crashing. More information: https://github.com/dotnet/maui/issues/21205")]
2218
public void Bugzilla41842Test()
2319
{
20+
#if MACCATALYST
21+
App.WaitForElement("FlyoutLabel");
22+
#else
2423
App.WaitForElement("Success");
24+
#endif
2525
}
26-
*/
2726
}
2827
}

0 commit comments

Comments
 (0)