{"repo":"rumax/react-native-PixelsCatcher","free":true,"listed":false,"github":"https://github.com/rumax/react-native-PixelsCatcher","clone":"git clone https://github.com/rumax/react-native-PixelsCatcher.git","description":":eyes: Library for UI snapshot testing of React Native","language":"TypeScript","stars":116,"topics":["react-native","testing","ui","view","screenshot"],"license":"MIT","category":"mobile-apps","readme_excerpt":"pixels-catcher Library for testing React Native UI components and screens Getting started Install and link $ npm install pixels-catcher --save-dev or $ yarn add pixels-catcher The library depends on react-native-save-view which is used to convert View to base64 data and has native implementation. Starting from RN 0.60 there is no need to link - Native Modules are now Autolinked, otherwise check official react native documentation. Note: react-native-save-view can be added to devDependencies of you project, otherwise auto-linking may not work. Check the version in package.json Create test Create new entry file, for example, indexSnapshot , and import registerSnapshot , runSnapshots and Snapshot from pixels-catcher : After that create the snapshot component, which should extend Snapshot and implement static snapshotName and renderContent method. Be sure that your component can accept collapsable property, otherwise React can make an optimization and drop the view. The implementation can be: after that register AppSnapshot component: and trigger runSnapshots which will register the application component and run all snapshots: Snapshots testing will be started as soon as the application is started. Each Snapshot gets onReady property that is triggered after all interactions (InteractionManager) are completed. In case if it is not enough, which can be some network requests, etc., it is possible to do: register animations by creating an interaction 'handle' and clearing it upon com","default_branch":null,"files":null,"tree":[],"storefront":"/r/rumax","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rumax/react-native-PixelsCatcher/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}