wix/Detox

Simulate NFC scan event in Android with Detox

Open

#2,699 opened on Mar 22, 2021

 (2 comments) (0 reactions) (0 assignees)JavaScript (1,942 forks)batch import
hacktoberfestplatform: androidstatus: triagetype: enhancement ⚡️user: looking for contributors

Repository metrics

Stars
 (10,558 stars)
PR merge metrics
 (PR metrics pending)

Description

Hi,

Thanks for providing this open source software, your effort is really appreciated.

The android app I want to test responds to scans of NFC tags;

  • A tag is scanned and depending on the status of that tag navigation and data loading occurs in the app.

In order to test the app I need to simulate the scan event of different types of tags in order to trigger all my navigation routes.

From a test I need to either;

  • Call RN js application code where I can create functions that just trigger my scan capturing code directly

or

  • Call Native Android code that can simulate an NFC scan that will be picked up by the RN side

or

  • Send a fake scan event intent to the app running in emulator that will be interpreted as the NFC scan event

I've done a lot of googling but cannot find any examples of anyone doing something like this.

Any info would be really useful as it looks like Detox would meet all our e2e testing needs apart from this one!

Thanks!

Contributor guide