From e8d9df14128834f142d3868b03008343d6a87bae Mon Sep 17 00:00:00 2001 From: eriklimakc Date: Wed, 25 Sep 2024 12:02:23 +0100 Subject: [PATCH] chore: Add delay to wait element --- testing/TestHarness/TestHarness.UITest/AppExtensions.cs | 6 +++--- .../Ext/Navigation/Apps/ToDo/Given_Apps_ToDo.cs | 3 --- 2 files changed, 3 insertions(+), 6 deletions(-) diff --git a/testing/TestHarness/TestHarness.UITest/AppExtensions.cs b/testing/TestHarness/TestHarness.UITest/AppExtensions.cs index cd9bece7d..f1c545e68 100644 --- a/testing/TestHarness/TestHarness.UITest/AppExtensions.cs +++ b/testing/TestHarness/TestHarness.UITest/AppExtensions.cs @@ -3,16 +3,16 @@ // TODO: Remove commented code if it works in CI public static class AppExtensions { - public const int UIWaitTimeInMilliseconds = 1000; + public const int UIWaitTimeInMilliseconds = 5000; public static async Task TapAndWait(this IApp app, string elementToTap, string elementToWaitFor ) { app.WaitElement(elementToTap); - //await Task.Delay(UIWaitTimeInMilliseconds); + await Task.Delay(UIWaitTimeInMilliseconds); app.FastTap(elementToTap); app.WaitElement(elementToWaitFor); - //await Task.Delay(UIWaitTimeInMilliseconds); + await Task.Delay(UIWaitTimeInMilliseconds); } public static async Task SelectElementIndexAndWait(this IApp app, string listName, string indexToSelect, string elementToWaitFor) diff --git a/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Apps/ToDo/Given_Apps_ToDo.cs b/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Apps/ToDo/Given_Apps_ToDo.cs index 4ea4ff727..ad349b654 100644 --- a/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Apps/ToDo/Given_Apps_ToDo.cs +++ b/testing/TestHarness/TestHarness.UITest/Ext/Navigation/Apps/ToDo/Given_Apps_ToDo.cs @@ -82,14 +82,11 @@ public async Task When_ToDo_Narrow_Nav_ContentControl() // Login await App.TapAndWait("LoginButton", "HomeNavigationBar"); - await Task.Delay(5000); // Select a task list await App.TapAndWait("SelectTaskList2Button", "TaskListNavigationBar"); - await Task.Delay(5000); await App.TapAndWait("SelectActiveTask1Button", "TaskNavigationBar"); - await Task.Delay(5000); await App.TapAndWait("DetailsBackButton", "TaskListNavigationBar"); }