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
3 changed files
with
69 additions
and
0 deletions.
There are no files selected for viewing
13 changes: 13 additions & 0 deletions
13
src/Controls/samples/Controls.Sample.UITests/Issues/Issue20199.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,13 @@ | ||
<?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" | ||
xmlns:ns="clr-namespace:Maui.Controls.Sample.Issues" | ||
x:Class="Maui.Controls.Sample.Issues.Issue20199"> | ||
<TabBar> | ||
<ShellContent | ||
Title="Home page" | ||
ContentTemplate="{DataTemplate ns:Issue20199Page}" | ||
Route="MainPage"> | ||
</ShellContent> | ||
</TabBar> | ||
</Shell> |
29 changes: 29 additions & 0 deletions
29
src/Controls/samples/Controls.Sample.UITests/Issues/Issue20199.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,29 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 20199, "[iOS] Page titles do not appear until navigating when pushing a modal page at startup", PlatformAffected.iOS)] | ||
public partial class Issue20199 : Shell | ||
{ | ||
public Issue20199() | ||
{ | ||
InitializeComponent(); | ||
} | ||
|
||
protected override async void OnAppearing() | ||
{ | ||
base.OnAppearing(); | ||
|
||
var closeModalPageButton = new Button() { Text = "Hide", AutomationId = "button" }; | ||
closeModalPageButton.Clicked += (s, e) => Navigation.PopAsync(); | ||
|
||
var modalPage = new ContentPage() { Content = closeModalPageButton }; | ||
|
||
await Navigation.PushModalAsync(modalPage); | ||
} | ||
} | ||
|
||
public class Issue20199Page : ContentPage { } | ||
} |
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,27 @@ | ||
using NUnit.Framework; | ||
using UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.AppiumTests.Issues | ||
{ | ||
public class Issue20199 : _IssuesUITest | ||
{ | ||
public override string Issue => "[iOS] Page titles do not appear until navigating when pushing a modal page at startup"; | ||
|
||
public Issue20199(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
[Test] | ||
public void TitleViewShouldBeVisible() | ||
{ | ||
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Android, TestDevice.Mac, TestDevice.Windows }); | ||
|
||
_ = App.WaitForElement("button"); | ||
App.Click("button"); | ||
|
||
// The test passes if the 'Home Page' title is visible | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |