binarapps / expo-ts-template

Template for expo apps with typescript support
12 stars 2 forks source link

FEAT: init detox and eas config for e2e tests #43

Open MSzalowski opened 1 year ago

MSzalowski commented 1 year ago

Description

This PR introduces setup and initial e2e test (currently it tests signing in) on detox.

~Fixes # (issue)~

Type of change

Please delete options that are not relevant.

How Has This Been Tested?

iOS

On iOS simulator creates via script so to test it, you should only type:

Android

On Android creating an emulator via script will be provided in the future, so you have to create in Android Studio emulator that matches name with the name in config (pixel_4) and:

To test on the attached device

Unfortunately Android provides flaky tests so check only if the emulator opens via script, installs the app, and runs the test (no matter if successful or not).

Also - android has issues with getting the views by id (which causes flaky tests) - detox team in their documentation proposes to use waitFor with withTimeout to treat it as a workaround. But - as it is in the documentation I think that it might be the final approach. If tests are failing for you, you can deal with timeout in withTimeout function - increasing that might result in a successful test.

Screenshot(s)

Android

https://vimeo.com/861140200?share=copy

iOS

https://vimeo.com/861142368?share=copy

Test Configuration:

Checklist: