Skip to content

Commit

Permalink
chore: fix iOS ci build
Browse files Browse the repository at this point in the history
  • Loading branch information
ajpinedam committed Nov 12, 2024
1 parent a5efb78 commit aff2b96
Showing 1 changed file with 11 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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]
Expand Down Expand Up @@ -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<ImplicitTextBlock>();

var buttonLabel1 =
#if __IOS__
closeButton1.FindFirstChild<ImplicitTextBlock>();
#else
((ContentPresenter)closeButton1.GetTemplateChild("ContentPresenter")).FindFirstChild<ImplicitTextBlock>();
#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.");
Expand Down

0 comments on commit aff2b96

Please sign in to comment.