-
Notifications
You must be signed in to change notification settings - Fork 913
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
Tappable SwiftUI view that is not tapped by KIF #1271
Comments
Digging into other issues that might be related, found #1250 From that, found that The function thus returns However, editing this function to always return |
Thanks for the context and digging in. I'd propose adding It could also potentially be the right thing to do to loosen the requirement and generally let any gesture recognizer pass that check. I'm not sure of the unexpected elements that might get picked up from being more permissive though. For that reason, I might err on the side of caution and only add the specific gesture recognizer |
Is there any update or fix for this? |
Hey there, did anyone had a chance to look into it? I'd be willing to contribute in case no one is looking into it :) |
I haven't heard of anyone starting to pick this up. We may have reason to look into SwiftUI support in the near future on my end, but it isn't a pressing need at the moment. If this is actively problematic for you, it'd be great if you wanted to start digging into this. |
I have the following SwiftUI view that inserts a tappable row in a List:
I have KIF tests that previously worked with this view, before SwiftUI was adopted for this list, the main content of the screen, as a subview in a UIHostingController.
My test calls the following support function:
Previously this worked correctly. Now, the row in question scrolls into view, but the second tap does not activate the row.
Things I have tried:
.accessibilityElement(children: hidden)
and then applying the accessibiltyLabel and accessibilityIdentifier to the whole view, or moving the order of the modifiers so theonTapGesture
appears before or after the other view modifiers. This does not change anything. I am willing to try other combinations that might be suggested but it is likely I've already tried them. 😕Any leads would be appreciated. I am about to undertake a complete redesign of the rest of the app in SwiftUI. This is currently the only section in SwiftUI and the only place my KIF tests are failing. I would like to migrate forward my KIF tests if I can but I clearly need KIF to be able to tap SwiftUI elements that are user-tappable.
The text was updated successfully, but these errors were encountered: