From 672e9802d56dca563a78102326128bc8cca9c70c Mon Sep 17 00:00:00 2001 From: Mike Corsaro Date: Wed, 3 Jan 2024 15:28:43 -0800 Subject: [PATCH] Modify `FlyoutHeaderAdaptsToMinimumHeight` test to work better on CI --- .../tests/DeviceTests/Elements/Shell/ShellFlyoutTests.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Controls/tests/DeviceTests/Elements/Shell/ShellFlyoutTests.cs b/src/Controls/tests/DeviceTests/Elements/Shell/ShellFlyoutTests.cs index 9a51b1efdbe8..d345c948147c 100644 --- a/src/Controls/tests/DeviceTests/Elements/Shell/ShellFlyoutTests.cs +++ b/src/Controls/tests/DeviceTests/Elements/Shell/ShellFlyoutTests.cs @@ -109,7 +109,11 @@ await RunShellTest(shell => { await OpenFlyout(handler); var flyoutFrame = GetFrameRelativeToFlyout(handler, shell.FlyoutHeader as IView); - AssertionExtensions.CloseEnough(flyoutFrame.Height, 30); + + await AssertionExtensions.AssertEventually(() => + { + return Math.Abs(30 - flyoutFrame.Height) < 0.2; + }, message: $"Expected: {30}. Actual: {flyoutFrame.Height}. Diff: {Math.Abs(30 - flyoutFrame.Height)}"); }); }