From 6f47e65b0c531ffb078e78d27e403511ce6b7f1b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Zolt=C3=A1n=20Leh=C3=B3czky?= Date: Thu, 29 Aug 2024 18:00:58 +0200 Subject: [PATCH] Trying scrolling to Shepherd target in tests to prevent --- .../Extensions/TestCaseUITestContextExtensions.cs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs b/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs index 4525dfd..1978c17 100644 --- a/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs +++ b/Lombiq.Walkthroughs.Test.UI/Extensions/TestCaseUITestContextExtensions.cs @@ -46,7 +46,11 @@ void AssertStep(string header, string text, bool assertShepherdTargetIsNotBody = context.Exists(assertShepherdTargetIsNotBody ? _byShepherdTargetNotBody : _byShepherdTarget); } - Task ClickShepherdTargetAsync() => context.ClickReliablyOnUntilUrlChangeAsync(_byShepherdTarget); + Task ClickShepherdTargetAsync() + { + context.ScrollTo(_byShepherdTarget); + return context.ClickReliablyOnUntilUrlChangeAsync(_byShepherdTarget); + } Task FillInShepherdTargetWithRetriesAsync(string text) => context.FillInWithRetriesAsync(_byShepherdTarget, text);