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
72 additions
and
0 deletions.
There are no files selected for viewing
17 changes: 17 additions & 0 deletions
17
src/Controls/samples/Controls.Sample.UITests/Issues/Issue19159.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,17 @@ | ||
<?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:local="clr-namespace:Maui.Controls.Sample.Issues" | ||
x:Class="Maui.Controls.Sample.Issues.Issue19159"> | ||
<TabBar> | ||
<Tab> | ||
<ShellContent | ||
Title="Page 1" | ||
ContentTemplate="{x:DataTemplate local:Issue19159ContentPage}"> | ||
</ShellContent> | ||
<ShellContent | ||
Title="Page 2" | ||
ContentTemplate="{x:DataTemplate local:Issue19159ContentPage}"/> | ||
</Tab> | ||
</TabBar> | ||
</Shell> |
30 changes: 30 additions & 0 deletions
30
src/Controls/samples/Controls.Sample.UITests/Issues/Issue19159.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,30 @@ | ||
using Microsoft.Maui.Controls; | ||
using Microsoft.Maui.Controls.Xaml; | ||
|
||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
[XamlCompilation(XamlCompilationOptions.Compile)] | ||
[Issue(IssueTracker.Github, 19159, "Top tab bar on Shell hides content", PlatformAffected.iOS)] | ||
public partial class Issue19159 : Shell | ||
{ | ||
public Issue19159() | ||
{ | ||
InitializeComponent(); | ||
} | ||
} | ||
|
||
public class Issue19159ContentPage : ContentPage | ||
{ | ||
public Issue19159ContentPage() | ||
{ | ||
Content = new StackLayout() | ||
{ | ||
AutomationId = "page", | ||
HorizontalOptions = LayoutOptions.Fill, | ||
VerticalOptions = LayoutOptions.Fill, | ||
BackgroundColor = new Microsoft.Maui.Graphics.Color(255, 0, 0), | ||
Margin = new Microsoft.Maui.Thickness(10) | ||
}; | ||
} | ||
} | ||
} |
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 UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.AppiumTests.Issues | ||
{ | ||
public class Issue19159 : _IssuesUITest | ||
{ | ||
public Issue19159(TestDevice device) : base(device) | ||
{ | ||
} | ||
|
||
public override string Issue => "Top tab bar on Shell hides content"; | ||
|
||
[Test] | ||
public void ContentShouldNotBeOverlaidByTopBar() | ||
{ | ||
this.IgnoreIfPlatforms(new TestDevice[] { TestDevice.Mac, TestDevice.Windows | TestDevice.Android }); | ||
_ = App.WaitForElement("page1"); | ||
|
||
// The content should not be overlaid by top bar | ||
App.Screenshot(); | ||
} | ||
} | ||
} |