Finding a TabNavigator tab item with detox in React Native

后端 未结 3 1251

I\'m using react-navigation in my React Native project that I\'m setting up automated testing for using Detox.

Unfortunately, I don\'t see anything in the docs about

3条回答
  •  清歌不尽
    2021-01-20 21:35

    In case you are adding in the wrong place, try moving it to createBottomTabNavigator

      createBottomTabNavigator(
        {
          YourStackLabel: {
            screen: YourStackNavigator,
            navigationOptions: {
              tabBarTestID: "yourBottomBarButtonTestId",
            },
          },
        }
      );
    

提交回复
热议问题