Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Interactive touch outside React-Native-Navigation Overlay when detox run #2834

Closed
1 task done
hqdai opened this issue Jun 14, 2021 · 15 comments · Fixed by #3115
Closed
1 task done

Interactive touch outside React-Native-Navigation Overlay when detox run #2834

hqdai opened this issue Jun 14, 2021 · 15 comments · Fixed by #3115

Comments

@hqdai
Copy link

hqdai commented Jun 14, 2021

Description

I'm using React-native-navigation (RNN) with an overlay is showing as alert, my issue is when manual test, I can't touch outside the alert message, that is correct, but when detox runs for automation test, it can touch and scroll outside the alert area.

So, the problem is why Detox can interact outside the overlay area ...

  • I have tested this issue on the latest Detox release and it still reproduces.

Reproduction

To reproduce, please check out my pet project and just do the test run. You can see detox can scroll even though the alert message is shown on top. Please be noted that I've turned option: interceptTouchOutside: true already.

Screen.Recording.2021-06-14.at.15.43.23.mov

Interactive 2.zip

Environment:

  • Detox: 18.16.0
  • React Native: 0.64.1
  • Node: 14.10.1
  • Device: iPhone 12 (Simulator)
  • Xcode: 12
  • iOS: 14.5
  • macOS: 11.3
@noomorph
Copy link
Collaborator

@hqdai, sorry for replying late.
Thanks for providing the example project.
Hopefully we can check it next week.

@stale
Copy link

stale bot commented Jul 18, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Jul 18, 2021
@stale
Copy link

stale bot commented Jul 25, 2021

The issue has been closed for inactivity.

@stale stale bot closed this as completed Jul 25, 2021
@hqdai
Copy link
Author

hqdai commented Jul 29, 2021

@hqdai, sorry for replying late.
Thanks for providing the example project.
Hopefully we can check it next week.

Thank you @noomorph :D, it seems the issue still happens. Please reopen the issue.

@d4vidi d4vidi reopened this Aug 1, 2021
@stale stale bot removed the 🏚 stale label Aug 1, 2021
@d4vidi
Copy link
Collaborator

d4vidi commented Aug 1, 2021

@hqdai Detox has super powers 😄
I wonder whether it is plausible that touch events get somehow associated with specific views (based on interactability & visibility). @alon-ha would you mind taking a look into this sometime next week? There's an example project here ready to go.

@alon-ha
Copy link
Contributor

alon-ha commented Aug 8, 2021

Will check it this week and update

@stale
Copy link

stale bot commented Sep 7, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Sep 7, 2021
@phuongwd
Copy link

phuongwd commented Sep 9, 2021

Not stale,

@stale stale bot removed the 🏚 stale label Sep 9, 2021
@phuongwd
Copy link

phuongwd commented Sep 9, 2021

Hello @alon-ha,
Could you please give me an update?

Many thanks

@d4vidi
Copy link
Collaborator

d4vidi commented Sep 9, 2021

No updates so far, we apologize.

@phuongwd
Copy link

phuongwd commented Sep 12, 2021

No updates so far, we apologize.

No problems, just checking to update our progress 😊

Thanks for quick response 😍

@stale
Copy link

stale bot commented Oct 12, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Oct 12, 2021
@phuongwd
Copy link

Not stale

@stale stale bot removed the 🏚 stale label Oct 14, 2021
@d4vidi d4vidi added this to the Q4/2021 Bugathon milestone Oct 20, 2021
@stale
Copy link

stale bot commented Nov 19, 2021

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs.
If you believe the issue is still relevant, please test on the latest Detox and report back.

Thank you for your contributions!

For more information on bots in this reporsitory, read this discussion.

@stale stale bot added the 🏚 stale label Nov 19, 2021
asafkorem added a commit to asafkorem/Detox that referenced this issue Nov 29, 2021
Failed test: `scroll interactions -> should not be intractable when overlay is shown`.
asafkorem added a commit to asafkorem/Detox that referenced this issue Nov 29, 2021
…t visible.

This fixes the bug reported on this issue: wix#2834.
asafkorem added a commit to asafkorem/Detox that referenced this issue Nov 29, 2021
@asafkorem
Copy link
Contributor

asafkorem commented Nov 29, 2021

Thanks @hqdai for reaching out with this bug report!
This PR solves the bug you described.

asafkorem added a commit to asafkorem/Detox that referenced this issue Nov 29, 2021
asafkorem added a commit to asafkorem/Detox that referenced this issue Nov 29, 2021
Failed test: `scroll interactions -> should not be intractable when overlay is shown`.
asafkorem added a commit to asafkorem/Detox that referenced this issue Nov 29, 2021
asafkorem added a commit to asafkorem/Detox that referenced this issue Dec 2, 2021
Failed tests:
- `scroll view -> should not be scrollable when overlay is shown`.
- `button -> should not be hittable when overlay is shown`.
asafkorem added a commit that referenced this issue Dec 6, 2021
Failed tests:
- `scroll view -> should not be scrollable when overlay is shown`.
- `button -> should not be hittable when overlay is shown`.
asafkorem added a commit that referenced this issue Dec 6, 2021
* fix(34.visibility.test.js): await for element matching.

* fix(DetoxPolicy): remove `percentDescriptionForValue` method.

Replaces this error message: `View “<RCTView: 0x7fa3020598b0>” is not visible:
View is clipped by one or more of its superviews' bounds and does not pass
visibility percent threshold (7,500)`,

With this error message: `View “<RCTView: 0x7fa3020598b0>” is not visible:
View is clipped by one or more of its superviews' bounds and does not pass
visibility percent threshold (75)`.

* iOS(Test App): add native method for presenting overlay window.

* iOS(Test App): write failed detox tests (to reproduce #2834).

Failed tests:
- `scroll view -> should not be scrollable when overlay is shown`.
- `button -> should not be hittable when overlay is shown`.

* fix(iOS): rewrite `isHittable` check logic.

Rewrite the logic:
- Finds a visible point of the view (otherwise the view is not hittable).
- Finds the topmost window, tries to tap on the visible point using `hitTest`.
- Checks whether the hitted view is the view itself / descendent of the tested view.

* fix(DetoxActions): use is-hittable assertion before UI gestures.

* fix(isHittable): check if view is hittable from first responder.

* UIView+DetoxUtils: remove redundant EL.

* fix(actions): use the correct coordinates systems.

* fix(DetoxUtils): fix `error` handling.

* fix(DetoxUtils): add nullable flag to error's value.

* UIResponder+First: add reference to the source SO thread.

* UIScrollView+DetoxActions: make informative assertion.

* 03.actions.test.js: add expectations.

* 03.actions-scroll.test.js: add tests for covered scroll view.

* 03.actions-scroll.test.js: fix android test fail (due to timeout).

* 03.actions.test.js: expect only on iOS.

* Publish 19.3.0-smoke.0 [ci skip]

* 03.actions.test.js: replace TODOs with reference to issue.

* fix(33.attributes.test.js): expect both subviews to be hittable.

Co-authored-by: wixmobile <mobile1@wix.com>
asafkorem added a commit that referenced this issue Nov 7, 2022
This change reverts #3150, and adds the following changes (hit-test):
- #3149
- #3145
- #3115

Those changes resolves this issue #2834.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants