diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18161.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18161.cs new file mode 100644 index 000000000000..2cbbf8d769da --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18161.cs @@ -0,0 +1,25 @@ +using NUnit.Framework; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests.Issues; + +public class Issue18161 : _IssuesUITest +{ + public Issue18161(TestDevice device) + : base(device) + { } + + public override string Issue => "Toggling FlyoutLayoutBehavior on Android causes the app to crash"; + + [Test] + [Category(UITestCategories.FlyoutPage)] + public void NoExceptionShouldBeThrown() + { + App.WaitForElement("ToggleBehaviour"); + App.Tap("ToggleBehaviour"); + App.Tap("ToggleBehaviour"); + + //The test passes if no exception is thrown + } +} \ No newline at end of file diff --git a/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20858.cs b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20858.cs new file mode 100644 index 000000000000..acb1c771f4ba --- /dev/null +++ b/src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue20858.cs @@ -0,0 +1,28 @@ +#if ANDROID || IOS +using NUnit.Framework; +using UITest.Appium; +using UITest.Core; + +namespace Microsoft.Maui.TestCases.Tests.Issues; + +public class Issue20858 : _IssuesUITest +{ + public Issue20858(TestDevice device) + : base(device) + { } + + public override string Issue => "FlyoutPage Android app crashing on orientation change when flyout is open"; + + [Test] + [Category(UITestCategories.FlyoutPage)] + public void NoExceptionShouldBeThrown() + { + App.SetOrientationPortrait(); + App.WaitForElement("OpenFlyout"); + App.Tap("OpenFlyout"); + App.SetOrientationLandscape(); + + //The test passes if no exception is thrown + } +} +#endif \ No newline at end of file diff --git a/src/Controls/tests/TestCases/Issues/Issue18161.xaml b/src/Controls/tests/TestCases/Issues/Issue18161.xaml new file mode 100644 index 000000000000..762c497588c3 --- /dev/null +++ b/src/Controls/tests/TestCases/Issues/Issue18161.xaml @@ -0,0 +1,24 @@ + + + + + +