Skip to content

Commit b90818a

Browse files
committed
fix: e2e test freeze on iOS
1 parent 9fda9eb commit b90818a

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

e2e/kit/016-aware-scroll-view-with-sticky-view.e2e.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ describe("AwareScrollView with StickyView test cases", () => {
4343
await scrollDownUntilElementIsVisible(
4444
"aware_scroll_sticky_view_scroll_container",
4545
"TextInput#9",
46-
0.2,
46+
{ x: 0, y: 0.2, checkScrollViewVisibility: false },
4747
);
4848
await waitAndTap("toggle_height");
4949
await waitForExpect(async () => {
960 Bytes
Loading

e2e/kit/helpers/actions/index.ts

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -121,13 +121,23 @@ export const switchToEmojiKeyboard = async () => {
121121
export const scrollDownUntilElementIsVisible = async (
122122
scrollViewId: string,
123123
elementId: string,
124-
startY = 0.5,
124+
{
125+
x,
126+
y,
127+
checkScrollViewVisibility,
128+
}: { x: number; y: number; checkScrollViewVisibility: boolean } = {
129+
x: NaN,
130+
y: 0.5,
131+
checkScrollViewVisibility: true,
132+
},
125133
): Promise<void> => {
126-
await waitForElementById(scrollViewId, TIMEOUT_FOR_LONG_OPERATIONS);
134+
if (checkScrollViewVisibility) {
135+
await waitForElementById(scrollViewId, TIMEOUT_FOR_LONG_OPERATIONS);
136+
}
127137
await waitFor(element(by.id(elementId)))
128138
.toBeVisible()
129139
.whileElement(by.id(scrollViewId))
130-
.scroll(100, "down", NaN, startY);
140+
.scroll(100, "down", x, y);
131141
};
132142

133143
export const scrollUpUntilElementIsBarelyVisible = async (

0 commit comments

Comments
 (0)