diff --git a/build/ios-uitest-run.sh b/build/ios-uitest-run.sh index d4b41e3baa14..6bb53b2c4a41 100755 --- a/build/ios-uitest-run.sh +++ b/build/ios-uitest-run.sh @@ -43,6 +43,7 @@ else namespace = 'SamplesApp.UITests.Microsoft_UI_Xaml_Controls.NumberBoxTests' or \ namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.TextBoxTests' or \ namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.PivotTests' or \ + namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.CommandBarTests' or \ namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.ComboBoxTests' or \ namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Media_Animation.DoubleAnimation_Tests' or \ namespace = 'SamplesApp.UITests.Windows_UI_Xaml_Controls.BorderTests' diff --git a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.NativeCommandBar.cs b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.NativeCommandBar.cs index bf4cd20b633c..d120ec3c3afe 100644 --- a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.NativeCommandBar.cs +++ b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.NativeCommandBar.cs @@ -9,7 +9,7 @@ using Uno.UITest.Helpers; using Uno.UITest.Helpers.Queries; -namespace SamplesApp.UITests.Windows_UI_Xaml_Controls.ComboBoxTests +namespace SamplesApp.UITests.Windows_UI_Xaml_Controls.CommandBarTests { [TestFixture] public partial class NativeCommandBar_Tests : SampleControlUITestBase @@ -62,5 +62,27 @@ public void NativeCommandBar_Content_Alignment_Automated() TakeScreenshot("Left"); } + + [Test] + [AutoRetry] + public void When_TextBlock_Centred_Native_Frame() + { + Run("UITests.Windows_UI_Xaml_Controls.CommandBar.CommandBar_Native_Frame"); + + _app.WaitForElement("NavigateInitialButton"); + _app.FastTap("NavigateInitialButton"); + + _app.WaitForElement("NavigateDetailButton"); + _app.FastTap("NavigateDetailButton"); + + _app.WaitForElement("NavigateBackButton"); + _app.FastTap("NavigateBackButton"); + + _app.WaitForElement("CommandBarTitleText"); + var rect = _app.GetRect("CommandBarTitleText"); + + Assert.Greater(rect.Height, 1); + + } } } diff --git a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.XamlCommandBar.cs b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.XamlCommandBar.cs index df86393d16df..b224b9b3eab7 100644 --- a/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.XamlCommandBar.cs +++ b/src/SamplesApp/SamplesApp.UITests/Windows_UI_Xaml_Controls/CommandBarTests/UnoSamples_Tests.XamlCommandBar.cs @@ -9,7 +9,7 @@ using Uno.UITest.Helpers; using Uno.UITest.Helpers.Queries; -namespace SamplesApp.UITests.Windows_UI_Xaml_Controls.ComboBoxTests +namespace SamplesApp.UITests.Windows_UI_Xaml_Controls.CommandBarTests { [TestFixture] public partial class XamlCommandBar_Tests : SampleControlUITestBase diff --git a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems index 657e920316bf..5c647627d475 100644 --- a/src/SamplesApp/UITests.Shared/UITests.Shared.projitems +++ b/src/SamplesApp/UITests.Shared/UITests.Shared.projitems @@ -545,6 +545,10 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -557,6 +561,14 @@ Designer MSBuild:Compile + + Designer + MSBuild:Compile + + + Designer + MSBuild:Compile + Designer MSBuild:Compile @@ -3398,6 +3410,9 @@ ComboBox_VisibleBounds.xaml + + CommandBar_Native_Frame.xaml + CommandBar_Native_With_Content.xaml @@ -3410,6 +3425,12 @@ BitmapIcon_Generic.xaml + + Page_Detail.xaml + + + Page_With_CommandBar_TextBlock.xaml + ContentControlNoTemplateNoContent.xaml diff --git a/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/CommandBar/CommandBar_Native_Frame.xaml b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/CommandBar/CommandBar_Native_Frame.xaml new file mode 100644 index 000000000000..1ab840391396 --- /dev/null +++ b/src/SamplesApp/UITests.Shared/Windows_UI_Xaml_Controls/CommandBar/CommandBar_Native_Frame.xaml @@ -0,0 +1,24 @@ + + + + + + + + +