satya164 / react-native-tab-view

A cross-platform Tab View component for React Native
MIT License
5.13k stars 1.07k forks source link

test: `testID` added in `TabBar` for testing #1394

Closed Asad520 closed 2 years ago

Asad520 commented 2 years ago

Motivation

I was unable to scroll the tab bar and couldn't press on tabs that were not in the visible view as detox requires it to be a scrollable component. Adding a test id fixes it as we can grab the tabBar using by.id(testID).

Test plan

I simply added a tabBarTestID prop in TabBar to grab the bar. Now it is scrollable in both Android & iOS

github-actions[bot] commented 2 years ago

Hey Asad520! Thanks for opening your first pull request in this repo. If you haven't already, make sure to read our contribution guidelines.

okwasniewski commented 2 years ago

Hey @Asad520,

Thanks for your PR!

Right now there is an PR open to refactor all components to function based (#1392). To avoid conflicts I can get back to this once #1392 gets merged 👍🏻

okwasniewski commented 2 years ago

Hey @Asad520,

Please rebase your branch over main and resolve conflicts.

Asad520 commented 2 years ago

@okwasniewski i've rebased the branch and resolved the conflicts 👍