From b3bfb7bf5e4dd7868bf1fd5e4642b5b3f1604c28 Mon Sep 17 00:00:00 2001 From: Shane Neuville Date: Wed, 26 Jun 2019 09:57:26 -0600 Subject: [PATCH] wait for animation to complete (#6652) --- .../Remotes/BaseViewContainerRemote.cs | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/Xamarin.Forms.Core.UITests.Shared/Remotes/BaseViewContainerRemote.cs b/Xamarin.Forms.Core.UITests.Shared/Remotes/BaseViewContainerRemote.cs index ed6f67f..22ada59 100644 --- a/Xamarin.Forms.Core.UITests.Shared/Remotes/BaseViewContainerRemote.cs +++ b/Xamarin.Forms.Core.UITests.Shared/Remotes/BaseViewContainerRemote.cs @@ -1,6 +1,7 @@ using System; using System.Linq; using System.Runtime.CompilerServices; +using System.Threading; using Xamarin.UITest; using Xamarin.UITest.Queries; @@ -145,6 +146,26 @@ namespace Xamarin.Forms.Core.UITests public T GetProperty(BindableProperty formProperty) { + T returnValue = GetPropertyFromBindableProperty(formProperty); + int loopCount = 0; + while(loopCount < 5) + { + Thread.Sleep(100); + T newValue = GetPropertyFromBindableProperty(formProperty); + + if(newValue.Equals(returnValue)) + break; + else + returnValue = newValue; + + loopCount++; + } + + return returnValue; + } + + T GetPropertyFromBindableProperty(BindableProperty formProperty) + { Tuple property = formProperty.GetPlatformPropertyQuery(); string[] propertyPath = property.Item1; bool isOnParentRenderer = property.Item2; -- 2.7.4