Skip to content

bug(iOS): scrollTo(edge) is failing when there's an overlay view although the view is scrollable #3769

@asafkorem

Description

@asafkorem

What happened?

Test Failed: View is not scrollable at the given start point. Start point (view coordinates): {137.19999999999999, 24}
- Full error: View is not visible around point.
- view point: {137.19999999999999, 24}
- visible bounds: {{116.5, 0}, {414, 48}}
- view bounds: {{0, 0}, {414, 48}}
---
Error: Error Domain=DetoxErrorDomain Code=0 "View “<RCTCustomScrollView: 0x7fcbfb957600>” is not visible: View does not pass visibility percent threshold (100)" UserInfo={NSLocalizedDescription=View “<RCTCustomScrollView: 0x7fcbfb957600>” is not visible: View does not pass visibility percent threshold (100)}
----
More about scroll action API here: https://wix.github.io/Detox/docs/api/actions-on-element/#scrolloffset-direction-startpositionx-startpositiony

See internal support case (Wix employees only): https://wix.slack.com/archives/C1Y4D9BK8/p1670500144347379

The view should be scrollable, and the error is coming from here: https://github.com/wix/Detox/blob/master/detox/ios/Detox/Utilities/UIView%2BDetoxUtils.m#L299

I suspect that there's a wrong calculation on this test, and this might be a redundant check also, because a visible area is already calculated.
This error should be solved on the XCUITest transition also, which may affect the priority of this bug-fix.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions