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
4 changed files
with
88 additions
and
1 deletion.
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
22 changes: 22 additions & 0 deletions
22
src/Controls/tests/TestCases.HostApp/Issues/Issue22570.xaml
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,22 @@ | ||
<?xml version="1.0" encoding="utf-8" ?> | ||
<Shell xmlns="http://schemas.microsoft.com/dotnet/2021/maui" | ||
xmlns:x="http://schemas.microsoft.com/winfx/2009/xaml" | ||
x:Class="Maui.Controls.Sample.Issues.Issue22570"> | ||
<TabBar Route="main" | ||
Title="Tabs"> | ||
<ShellContent | ||
Title="Home" | ||
Route="Home"> | ||
<ContentPage> | ||
<VerticalStackLayout> | ||
<Button Text="Navigate to a subpage" | ||
AutomationId="button" | ||
Clicked="Button_Clicked"/> | ||
</VerticalStackLayout> | ||
</ContentPage> | ||
</ShellContent> | ||
<ShellContent Title="Foo" Route="Foo"> | ||
<ContentPage/> | ||
</ShellContent> | ||
</TabBar> | ||
</Shell> |
36 changes: 36 additions & 0 deletions
36
src/Controls/tests/TestCases.HostApp/Issues/Issue22570.xaml.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,36 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 22570, "[iOS] Cross TabBar navigation broken", PlatformAffected.iOS)] | ||
public partial class Issue22570 : Shell | ||
{ | ||
public Issue22570() | ||
{ | ||
InitializeComponent(); | ||
Routing.RegisterRoute("Bar", typeof(Issue22570Page)); | ||
} | ||
|
||
void Button_Clicked(object sender, System.EventArgs e) | ||
{ | ||
_ = GoToAsync("//main/Foo/Bar"); | ||
} | ||
|
||
public class Issue22570Page : ContentPage | ||
{ | ||
public Issue22570Page() | ||
{ | ||
Content = new VerticalStackLayout() | ||
{ | ||
new Label() | ||
{ | ||
Text = "Hello, World!", | ||
AutomationId = "label" | ||
} | ||
}; | ||
} | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue22570.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,25 @@ | ||
using NUnit.Framework; | ||
using NUnit.Framework.Legacy; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue22570 : _IssuesUITest | ||
{ | ||
public Issue22570(TestDevice device) | ||
: base(device) | ||
{ } | ||
|
||
public override string Issue => "[iOS] Cross TabBar navigation broken"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Shell)] | ||
public void Issue22570Test() | ||
{ | ||
App.WaitForElement("button"); | ||
App.Click("button"); | ||
App.WaitForElement("label"); | ||
} | ||
} | ||
} |