'Detox issue on React Native Expo project

When I try to run my E2E test using Detox on my expo project, I got an unknown issue. I have a Input component (@ui-ketten/component) and it's testId is SignUpEmailInput. I can navigate to the Signup screen in which the Input will be shown and I can see the Input component. If I added this code to my app.e2e.js await expect(element(by.id('SignUpEmailInput'))).toExist();, then I can pass the test. But if I add this code await expect(element(by.id('SignUpEmailInput'))).toBeVisible();, I can not pass the test. Then I tested with --loglevel trace. I will share my error using screenshot



Solution 1:[1]

You can open a simulator before launching the Detox test suit. This way, the already open will be used to display the state.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Gál Péter