From 82fdde048231c28336787743cda2b565d50dccd6 Mon Sep 17 00:00:00 2001 From: Noel De Martin <noel@moodle.com> Date: Tue, 25 Jan 2022 17:39:01 +0100 Subject: [PATCH] MOBILE-3833 behat: Improve loading more items Without using a smooth scroll, the scroll jumps straight to the loader and sometimes it makes tests fail. Using smooth scrolling is closer to what a user would do and it fixes this problem. --- tests/behat/app_behat_runtime.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/behat/app_behat_runtime.js b/tests/behat/app_behat_runtime.js index fac2f2dd1..0f61bcc3c 100644 --- a/tests/behat/app_behat_runtime.js +++ b/tests/behat/app_behat_runtime.js @@ -617,7 +617,7 @@ return 'ERROR: All items are already loaded'; } - infiniteLoading.scrollIntoView(); + infiniteLoading.scrollIntoView({ behavior: 'smooth' }); // Wait 100ms await new Promise(resolve => setTimeout(resolve, 100));