Skip to content

Commit

Permalink
Merge pull request #8058 from ajpinedam/anpi/fix.ios.commandbar.test
Browse files Browse the repository at this point in the history
Fix CommandBar iOS BackButton Test
  • Loading branch information
ajpinedam authored Feb 15, 2022
2 parents f4efc94 + 7ed3487 commit a2ce826
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -258,8 +258,7 @@ public void When_Navigated_CommandBarShouldHideBackButtonTitle_NativeFrame()

[Test]
[AutoRetry]
[ActivePlatforms(Platform.iOS)]
[Ignore("Disabled because image button is not loading properly https://github.com/unoplatform/uno/issues/8014")]
[ActivePlatforms(Platform.iOS)]
public void When_Navigated_CommandBarDisplayCustomBackButtonIcon_NativeFrame()
{
Run("UITests.Windows_UI_Xaml_Controls.CommandBar.BackButtonImage.CommandBar_Frame");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,12 @@ public void OnButtonClicked(object sender, object args)

var navigationBar = parent.FindFirstChild<UnoNavigationBar>();

var image = navigationBar.BackIndicatorImage;
ExpectedImage.Source = image;
var image = (UIDevice.CurrentDevice.CheckSystemVersion(13, 0))
? navigationBar.CompactAppearance.BackIndicatorImage
: navigationBar.BackIndicatorImage;

ExpectedImage.Source = image;
#endif
}
}
}
}

0 comments on commit a2ce826

Please sign in to comment.