Skip to content

Conversation

@Divyansh-Jaiswal
Copy link

This PR improves the scrollUntilVisible implementation to handle edge cases in fragment-based layouts and slow-loading content.

Key changes

Retry limit added: Loops are capped at 10 retries to prevent infinite loops in CI pipelines.

Slow UI support: Added waitForAnimationToEnd after each swipe to ensure elements have time to render after scrolling.

Explicit final assertion: Ensures tests fail clearly if the element is never found, improving test reliability.

Benefits

Works reliably with fragment-based layouts.

Prevents CI hangs due to infinite loops.

Handles network-loaded or animation-heavy screens gracefully.

Provides clear failure messages when elements are missing.

This PR improves the scrollUntilVisible implementation to handle edge cases in fragment-based layouts and slow-loading content.

Key changes


Retry limit added: Loops are capped at 10 retries to prevent infinite loops in CI pipelines.

Slow UI support: Added waitForAnimationToEnd after each swipe to ensure elements have time to render after scrolling.

Explicit final assertion: Ensures tests fail clearly if the element is never found, improving test reliability.

Benefits

Works reliably with fragment-based layouts.

Prevents CI hangs due to infinite loops.

Handles network-loaded or animation-heavy screens gracefully.

Provides clear failure messages when elements are missing.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant