From aff2b969cfef4f4f8f9b27d225b9bbeb495481e3 Mon Sep 17 00:00:00 2001 From: Andres Pineda Date: Wed, 6 Nov 2024 23:15:20 -0500 Subject: [PATCH] chore: fix iOS ci build --- .../Microsoft_UI_Xaml_Controls/Given_TabView.cs | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_TabView.cs b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_TabView.cs index 54a7cb925cc1..ca9ba43dc45e 100644 --- a/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_TabView.cs +++ b/src/Uno.UI.RuntimeTests/Tests/Microsoft_UI_Xaml_Controls/Given_TabView.cs @@ -17,6 +17,10 @@ using static Uno.UI.Extensions.ViewExtensions; using static Private.Infrastructure.TestServices; +#if __IOS__ +using UIKit; +#endif + namespace Uno.UI.RuntimeTests.Tests.Microsoft_UI_Xaml_Controls; [TestClass] @@ -176,7 +180,13 @@ public async Task When_Items_Should_ShowHeader() Assert.IsTrue(headerPresenter1.ActualHeight > 0, "TabViewItem header for index 0 should have a non-zero height."); var closeButton1 = (Button)tabviewItem1.GetTemplateChild("CloseButton"); - var buttonLabel1 = ((ContentPresenter)closeButton1.GetTemplateChild("ContentPresenter")).FindFirstChild(); + + var buttonLabel1 = +#if __IOS__ + closeButton1.FindFirstChild(); +#else + ((ContentPresenter)closeButton1.GetTemplateChild("ContentPresenter")).FindFirstChild(); +#endif Assert.IsTrue(buttonLabel1.ActualWidth > 0, "TabViewItem Button for index 0 should have a non-zero width."); Assert.IsTrue(buttonLabel1.ActualHeight > 0, "TabViewItem Button for index 0 should have a non-zero height.");