pixielabs / cavy

An integration test framework for React Native.

Home Page:https://cavy.app

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Questions: native interaction (camera, permissions)

HugoGresse opened this issue · comments

First of all, awesome project! Now it make choices even harder between detox/webdriver.io/cavy.

A few questions:
1. How does the test interact with native permissions dialogs (camera, storage)?
I didn't find anything in the doc
2. How does Cavy interact with outside activity (file choose, camera startActivityForResult for eg)? I have a guess based on how it is made but it limit a lot the usage of cavy for somewhat more complex RN apps.

Hi @HugoGresse and thanks for you interest in cavy!

Cavy is built around React's ref generating functions - using them to interact with your React components in JS tests.

Cavy doesn't touch any native code - this makes setting up and writing tests very straight forward, but also unfortunately means Cavy doesn't support testing functionality that needs access to native code (yet!).

Essentially, if there's no React component with a function prop you can call to simulate the required functionality, it's going to be tricky to test with Cavy.

That was my understanding, thus making it very limited within a React Native scope (opening camera, system permission, etc). I'm going with Webdriver.io for the moment.
Thanks.