forked from dotnet/maui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
69 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
21 changes: 21 additions & 0 deletions
21
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22633.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue22633 : _IssuesUITest | ||
{ | ||
public Issue22633(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "[iOS] Crash on when initializing a TabbedPage without children"; | ||
|
||
[Test] | ||
public void ExceptionShouldNotBeThrown() | ||
{ | ||
App.WaitForElement("label"); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<TabbedPage xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue22633" | ||
Title="Issue22633"> | ||
</TabbedPage> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
using System.Threading.Tasks; | ||
|
||
namespace Maui.Controls.Sample.Issues; | ||
|
||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 22633, "[iOS] Crash on when initializing a TabbedPage without children", PlatformAffected.iOS)] | ||
public partial class Issue22633 : TabbedPage | ||
{ | ||
public Issue22633() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
protected override void OnAppearing() | ||
{ | ||
base.OnAppearing(); | ||
_ = SimulateNavigationServiceAsync(); | ||
} | ||
|
||
async Task SimulateNavigationServiceAsync() | ||
{ | ||
// add a delay to simulate the navigation service | ||
await Task.Delay(100); | ||
|
||
Children.Add(new ContentPage | ||
{ | ||
Title = "Page1", | ||
Content = new VerticalStackLayout() | ||
{ | ||
new Label() { AutomationId = "label", Text = "Hello, World!" } | ||
} | ||
}); | ||
|
||
Children.Add(new ContentPage { Title = "Page2" }); | ||
} | ||
} |