Skip to content

refactor(test): e2e test: tab-bar-hidden implementation for iPad#4233

Open
LKuchno wants to merge 5 commits into
mainfrom
@lkuchno/e2e-ipad-test-tabs-tab-bar-hidden
Open

refactor(test): e2e test: tab-bar-hidden implementation for iPad#4233
LKuchno wants to merge 5 commits into
mainfrom
@lkuchno/e2e-ipad-test-tabs-tab-bar-hidden

Conversation

@LKuchno

@LKuchno LKuchno commented Jun 30, 2026

Copy link
Copy Markdown
Collaborator

Description

Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1584

This PR extends the test-tabs-tab-bar-hidden e2e test suite with iPad-specific coverage. The existing test covered the tabBarHidden functionality 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

  • e2e/e2e-utils: Added isIPadTarget flag and describeIfiPad helper for conditionally executing iPad-specific e2e test blocks, following the existing pattern of describeIfiOS and describeIfAndroid - this flad and helper are added also in PR chore(test): Add iPad e2e coverage for tabBarControllerMode #4212
  • e2e/test-tabs-tab-bar-hidden.e2e.ts: Added dedicated iPad test describe block with assertions for _UIFloatingTabBarCollectionView visibility toggling behavior

@LKuchno LKuchno requested a review from Copilot June 30, 2026 08:01
@LKuchno LKuchno added platform:ios Issue related to iOS part of the library area:tabs Issue related to bottom tabs type:e2e Actions related to e2e maintenance and development, especially automation. labels Jun 30, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-only describeIfiPad helper to e2e utilities.
  • Added an iPad-specific e2e test block that asserts _UIFloatingTabBarCollectionView visibility toggles with tabBarHidden.

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.

@LKuchno LKuchno requested a review from kkafar June 30, 2026 12:55
@LKuchno LKuchno changed the title chore(test): e2e test: tab-bar-hidden implementation for iPad refactor(test): e2e test: tab-bar-hidden implementation for iPad Jun 30, 2026

@kkafar kkafar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code looks ok. Just make sure to rebase. I'll test the runtime now.

Comment on lines +10 to +14
export const isIPadTarget =
device.getPlatform() === 'ios' &&
/^iPad\s/i.test(process.env.RNS_APPLE_SIM_NAME ?? '');

export const describeIfiPad = isIPadTarget ? describe : describe.skip;

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems that this needs to be rebased after #4212 landed, right?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, thats true, in third PR will be the same :)

@kkafar kkafar left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:tabs Issue related to bottom tabs platform:ios Issue related to iOS part of the library type:e2e Actions related to e2e maintenance and development, especially automation.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants