From 515727435b6bb0f0866b03dd8c05b5afe28ee66f Mon Sep 17 00:00:00 2001 From: Steve Bilogan Date: Fri, 6 Dec 2024 10:53:28 -0500 Subject: [PATCH] chore: uno samples bump + adjust tests (#1296) --- samples/Directory.Packages.props | 20 +++++++++---------- .../Tests/ChipGroupTests.cs | 11 +++++++++- .../Tests/DrawerFlyoutTests.cs | 14 ++++++------- 3 files changed, 27 insertions(+), 18 deletions(-) diff --git a/samples/Directory.Packages.props b/samples/Directory.Packages.props index 354e6a4ee..51305bf58 100644 --- a/samples/Directory.Packages.props +++ b/samples/Directory.Packages.props @@ -29,19 +29,19 @@ - - - - - - + + + + + + - - - - + + + + diff --git a/src/Uno.Toolkit.RuntimeTests/Tests/ChipGroupTests.cs b/src/Uno.Toolkit.RuntimeTests/Tests/ChipGroupTests.cs index 217c743cc..3d1ae2272 100644 --- a/src/Uno.Toolkit.RuntimeTests/Tests/ChipGroupTests.cs +++ b/src/Uno.Toolkit.RuntimeTests/Tests/ChipGroupTests.cs @@ -25,6 +25,9 @@ internal class ChipGroupTests #region Selection via Toggle [TestMethod] +#if __ANDROID__ + [Ignore("Skip Android due to failures. Tracked by https://github.com/unoplatform/uno.toolkit.ui/issues/1300")] +#endif [DataRow(ChipSelectionMode.None, new[] { 1 }, null)] [DataRow(ChipSelectionMode.SingleOrNone, new[] { 1 }, 1)] [DataRow(ChipSelectionMode.SingleOrNone, new[] { 1, 1 }, null)] // deselection @@ -82,7 +85,7 @@ public async Task SingleMode_Selection() Assert.AreEqual(source[1], SUT.SelectedItem); } - #endregion +#endregion #region Selection via SelectedItem & SelectItems @@ -112,6 +115,9 @@ public async Task None_SetSelection() } [TestMethod] +#if __ANDROID__ + [Ignore("Skip Android due to failures. Tracked by https://github.com/unoplatform/uno.toolkit.ui/issues/1300")] +#endif public async Task Single_SetSelection() { var source = Enumerable.Range(0, 3).ToArray(); @@ -270,6 +276,9 @@ public async Task MultiToSingle_Selected_ShouldPreserveFirstSelection() #region Misc [TestMethod] +#if __ANDROID__ + [Ignore("Skip Android due to failures. Tracked by https://github.com/unoplatform/uno.toolkit.ui/issues/1300")] +#endif public async Task Initial_Selection() { var setup = XamlHelper.LoadXaml(""" diff --git a/src/Uno.Toolkit.RuntimeTests/Tests/DrawerFlyoutTests.cs b/src/Uno.Toolkit.RuntimeTests/Tests/DrawerFlyoutTests.cs index bde7e296a..d8b8c2403 100644 --- a/src/Uno.Toolkit.RuntimeTests/Tests/DrawerFlyoutTests.cs +++ b/src/Uno.Toolkit.RuntimeTests/Tests/DrawerFlyoutTests.cs @@ -143,12 +143,12 @@ public async Task OpenDirection_Layout(DrawerOpenDirection openDirection) } } }; - void Setup(DrawerFlyoutPresenter presenter) + void Setup(FlyoutPresenter presenter) { presenter.Background = new SolidColorBrush(Colors.Pink with { A = 127 }); - presenter.LightDismissOverlayBackground = new SolidColorBrush(Colors.SkyBlue); - presenter.OpenDirection = openDirection; - presenter.DrawerLength = new GridLength(0.5, GridUnitType.Star); + DrawerFlyoutPresenter.SetLightDismissOverlayBackground(presenter, new SolidColorBrush(Colors.SkyBlue)); + DrawerFlyoutPresenter.SetOpenDirection(presenter, openDirection); + DrawerFlyoutPresenter.SetDrawerLength(presenter, new GridLength(0.5, GridUnitType.Star)); } #endif @@ -226,9 +226,9 @@ private static IReadOnlyList GetOpenPopupsCompat() // this is a workaround to inject property without having to re-template everything. private class LambdaDrawerFlyout : Flyout { - private readonly Action _setup; + private readonly Action _setup; - public LambdaDrawerFlyout(Action setup) + public LambdaDrawerFlyout(Action setup) { _setup = setup; @@ -239,7 +239,7 @@ public LambdaDrawerFlyout(Action setup) protected override Control CreatePresenter() { var wrapper = base.CreatePresenter(); - if (wrapper.GetTemplateRoot() is DrawerFlyoutPresenter presenter) + if (wrapper is FlyoutPresenter presenter) { // note: the style is already applied in base.CreatePresenter(), so we can safely override from here. _setup(presenter);