chore(test): e2e test-tabs-tab-bar-layout-direction#3899
chore(test): e2e test-tabs-tab-bar-layout-direction#3899
Conversation
…ns into @lkuchno/e2e-test-tabs-tab-bar-layout-direction
…ns into @lkuchno/e2e-test-tabs-tab-bar-layout-direction
…ns into @lkuchno/e2e-test-tabs-tab-bar-layout-direction
…problem on android
There was a problem hiding this comment.
Pull request overview
Adds a Detox E2E test suite for the test-tabs-tab-bar-layout-direction single-feature scenario to validate TabBar ordering under LTR/RTL, and updates the scenario screen/docs to provide the hooks and expectations needed for automation.
Changes:
- Added a cross-platform Detox suite that asserts visual tab ordering via element frame coordinates under LTR and RTL.
- Updated the test scenario screen with
testIDhooks and accessibility labels for stable E2E targeting. - Refined the manual scenario markdown to match the new automated coverage and expected outcomes.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 8 comments.
| File | Description |
|---|---|
| apps/src/tests/single-feature-tests/tabs/test-tabs-tab-bar-layout-direction/scenario.md | Updates the written scenario structure and expected outcomes to align with the new E2E coverage. |
| apps/src/tests/single-feature-tests/tabs/test-tabs-tab-bar-layout-direction/index.tsx | Adds Detox-targetable testIDs and tab item accessibility labels; renames the first tab to “Tab1”. |
| FabricExample/e2e/single-feature-tests/tabs/test-tabs-tab-bar-layout-direction.e2e.ts | Introduces the Detox test suite validating tab ordering under LTR/RTL and direction overrides. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| 'Tabs', | ||
| 'test-tabs-tab-bar-layout-direction', | ||
| ); | ||
| await element(by.id('react-allow-rtl-picker')).tap(); |
There was a problem hiding this comment.
Android cleanup in afterAll toggles allowRTL instead of reverting forceRTL. Since I18nManager.forceRTL() is persisted, this can leak RTL into later E2E runs. Restore the original state by disabling forceRTL again (and re-enabling allowRTL if it was changed) before reloading React Native.
| await element(by.id('react-allow-rtl-picker')).tap(); | |
| await element(by.id('react-force-rtl-picker')).tap(); |
| - [ ] Expected: Tab bar displays in LTR order — TabsHost overrides RTL from | ||
| RN/system. Tab1 is displayed as the the leftmost item. | ||
|
|
There was a problem hiding this comment.
Duplicate word in expected outcome: "as the the leftmost item" should be "as the leftmost item".
…tabs-tab-bar-layout-direction/scenario.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…layout-direction.e2e.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…out-direction/scenario.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…out-direction/scenario.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
…out-direction/scenario.md Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Description
This PR introduces E2E Detox automation for the test-tabs-tab-bar-layout-direction scenario verifying TabBar layout direction logic. The changes ensure that the direction prop correctly respects or overrides system LTR/RTL settings. Included updates to the test screen to provide necessary testID hooks for Detox.
Closes: https://github.com/software-mansion/react-native-screens-labs/issues/1143
Changes
test-tabs-tab-bar-layout-direction.e2e.ts:
test-tabs-tab-bar-layout-direction/index.tsx:
test-tabs-tab-bar-layout-direction/scenario.md: