From e20ba8f2db99627ba6798dee682cceb6ba478a0a Mon Sep 17 00:00:00 2001 From: kirillzyusko Date: Tue, 31 Dec 2024 11:00:18 +0100 Subject: [PATCH] e2e: another desperate attempt to make e2e tests working --- e2e/kit/helpers/actions/index.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/e2e/kit/helpers/actions/index.ts b/e2e/kit/helpers/actions/index.ts index 95f3bc51c7..317ab65f4f 100644 --- a/e2e/kit/helpers/actions/index.ts +++ b/e2e/kit/helpers/actions/index.ts @@ -140,8 +140,10 @@ export const scrollUpUntilElementIsBarelyVisible = async ( elementId: string, threshold = 10, ): Promise => { - // wait for all interactions to be completed to get precise layout metrics - await delay(500); + // scroll a little bit to update the frame, otherwise + // we may read out of date frame on Android + await element(by.id(scrollViewId)).scroll(1, "up", 0.01, 0.5); + await element(by.id(scrollViewId)).scroll(1, "up", 0.01, 0.5); const preference = getDevicePreference(); const { frame } = (await element(by.id(elementId)).getAttributes()) as { frame: Frame;