-
Notifications
You must be signed in to change notification settings - Fork 1.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed-Shell-TemplateView-Initial-Margin
- Loading branch information
1 parent
5b80786
commit 290749b
Showing
5 changed files
with
68 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
Binary file added
BIN
+13.6 KB
...es.Android.Tests/snapshots/android/VerifyTemplateViewMarginOnInitialDisplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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,40 @@ | ||
namespace Maui.Controls.Sample.Issues | ||
{ | ||
|
||
[Issue(IssueTracker.Github, 18423, "[Windows] Shell flyout template items do not have a margin applied on first show", PlatformAffected.UWP)] | ||
public partial class Issue18423Shell : Shell | ||
{ | ||
public Issue18423Shell() | ||
{ | ||
FlyoutBehavior = FlyoutBehavior.Flyout; | ||
|
||
ItemTemplate = new DataTemplate(() => | ||
{ | ||
return new Label | ||
{ | ||
AutomationId = "LabelWithMargin", | ||
Margin = new Thickness(20), | ||
Text = "Title" | ||
}; | ||
}); | ||
|
||
ShellContent shellContent = new ShellContent | ||
{ | ||
Title = "Home", | ||
ContentTemplate = new DataTemplate(typeof(Issue18423Page)), | ||
Route = "MainPage" | ||
}; | ||
|
||
Items.Add(shellContent); | ||
} | ||
} | ||
|
||
public partial class Issue18423Page : ContentPage | ||
{ | ||
public Issue18423Page() | ||
{ | ||
BackgroundColor = Colors.HotPink; | ||
this.AutomationId = "MainPage"; | ||
} | ||
} | ||
} |
25 changes: 25 additions & 0 deletions
25
src/Controls/tests/TestCases.Shared.Tests/Tests/Issues/Issue18423.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 UITest.Appium; | ||
using UITest.Core; | ||
|
||
namespace Microsoft.Maui.TestCases.Tests.Issues | ||
{ | ||
public class Issue18423 : _IssuesUITest | ||
{ | ||
public Issue18423(TestDevice testDevice) : base(testDevice) | ||
{ | ||
} | ||
|
||
public override string Issue => "[Windows] Shell flyout template items do not have a margin applied on first show"; | ||
|
||
[Test] | ||
[Category(UITestCategories.Shell)] | ||
public void VerifyTemplateViewMarginOnInitialDisplay() | ||
{ | ||
App.WaitForElement("MainPage"); | ||
App.TapShellFlyoutIcon(); | ||
App.WaitForElement("LabelWithMargin"); | ||
VerifyScreenshot(); | ||
} | ||
} | ||
} |
Binary file added
BIN
+13.3 KB
.../TestCases.iOS.Tests/snapshots/ios/VerifyTemplateViewMarginOnInitialDisplay.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.