refactor(test): e2e test: tab-bar-hidden implementation for iPad#4233
refactor(test): e2e test: tab-bar-hidden implementation for iPad#4233LKuchno wants to merge 5 commits into
Conversation
…ns into @lkuchno/e2e-ipad-test-tabs-tab-bar-hidden
There was a problem hiding this comment.
Pull request overview
This PR extends the FabricExample Detox e2e coverage for the “tabBarHidden” Tabs scenario by adding iPad-specific assertions, reflecting the different native view hierarchy used for the iPad floating tab bar.
Changes:
- Added iPad target detection (
isIPadTarget) and an iPad-onlydescribeIfiPadhelper to e2e utilities. - Added an iPad-specific e2e test block that asserts
_UIFloatingTabBarCollectionViewvisibility toggles withtabBarHidden.
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| FabricExample/e2e/single-feature-tests/tabs/test-tabs-tab-bar-hidden.e2e.ts | Adds an iPad-only test suite for tab bar visibility, using _UIFloatingTabBarCollectionView assertions. |
| FabricExample/e2e/e2e-utils.ts | Adds iPad target detection and a conditional describeIfiPad helper for iPad-only e2e blocks. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
kkafar
left a comment
There was a problem hiding this comment.
Code looks ok. Just make sure to rebase. I'll test the runtime now.
| export const isIPadTarget = | ||
| device.getPlatform() === 'ios' && | ||
| /^iPad\s/i.test(process.env.RNS_APPLE_SIM_NAME ?? ''); | ||
|
|
||
| export const describeIfiPad = isIPadTarget ? describe : describe.skip; |
There was a problem hiding this comment.
Seems that this needs to be rebased after #4212 landed, right?
There was a problem hiding this comment.
Yes, thats true, in third PR will be the same :)
kkafar
left a comment
There was a problem hiding this comment.
Okay, let's rebase this one before proceeding.
I've checked the runtime, seems to be working fine.
FYI: I've learned that instead of passing --testNamePattern to the jest and having all the tests but the desired skipped, you can pass --testPathPattern and run only the actually matching test.
Description
Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1584
This PR extends the
test-tabs-tab-bar-hiddene2e test suite with iPad-specific coverage. The existing test covered thetabBarHiddenfunctionality on iPhone and Android, but lacked iPad-specific test assertions. On iPad, the tab bar is rendered as a_UIFloatingTabBarCollectionView, requiring dedicated visibility assertions that differ from the iPhone/Android implementations. This PR adds those iPad tests to ensure the tab bar toggles correctly on iPad devices.Changes
isIPadTargetflag anddescribeIfiPadhelper for conditionally executing iPad-specific e2e test blocks, following the existing pattern ofdescribeIfiOSanddescribeIfAndroid- this flad and helper are added also in PR chore(test): Add iPad e2e coverage for tabBarControllerMode #4212_UIFloatingTabBarCollectionViewvisibility toggling behavior