A framework for building native applications using React
Pressable: Update ReactTestTools to be able to tab on Pressable
Summary: This was all yungsters idea. I blame him. :) Switching Pressable to be a functional component presents a new challenge. ReactNativeTestTools can no longer find its instance because there is no instance Pressable uses forwardRef. We need a way to both find a pressable, and then call the onPress callback if the pressable isn't also disabled. So in DEV (and thus test) we add the pressable config to a secret key on a function passed onto View. The TestTools look for this key on this function, and then can call onPress. Super hacky, but so is all of ReactNativeTestTools. We aren't proud of this. Changelog: [General][Changed]: Added support for Pressable to ReactNativeTestTools.tap Reviewed By: yungsters Differential Revision: D18849358 fbshipit-source-id: ea8880ceedfc04cda217ee17ba140475d003172c
E
Eli White committed
4e31fbd39ce7e42cda448181ee15536076f1b7ce
Parent: 7bc2b91
Committed by Facebook Github Bot <facebook-github-bot@users.noreply.github.com>
on 1/28/2020, 11:14:23 PM