satya164 / react-native-tab-view

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

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

Closed Asad520 closed 1 year ago

Asad520 commented 1 year 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 1 year 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 1 year 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 1 year ago

Hey @Asad520,

Please rebase your branch over main and resolve conflicts.

Asad520 commented 1 year ago

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