Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions apps/src/tests/single-feature-tests/tabs/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ import TestTabsTabBarHidden from './test-tabs-tab-bar-hidden';
import TabsScreenOrientationScenario from './tabs-screen-orientation';
import TabBarAppearanceDefinedBySelectedTabScenario from './test-tabs-appearance-defined-by-selected-tab';
import TestTabsColorScheme from './test-tabs-color-scheme';
import TestTabsLayoutDirection from './test-tabs-layout-direction';
import TestTabsTabBarLayoutDirection from './test-tabs-tab-bar-layout-direction';
import TestTabsIMEInsets from './test-tabs-ime-insets';
import TestTabsSimpleNav from './test-tabs-simple-nav';
import TestTabsMoreNavigationController from './test-tabs-more-navigation-controller';
Expand All @@ -19,7 +19,7 @@ const scenarios = {
TestTabsTabBarHidden,
TabsScreenOrientationScenario,
TestTabsColorScheme,
TestTabsLayoutDirection,
TestTabsTabBarLayoutDirection,
TestTabsIMEInsets,
TestTabsSimpleNav,
TestTabsMoreNavigationController,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ import { DummyScreen } from '@apps/tests/shared/DummyScreens';

const SCENARIO: Scenario = {
name: 'Layout Direction',
key: 'test-tabs-layout-direction',
key: 'test-tabs-tab-bar-layout-direction',
details:
'Tests how tabs handle system, React Native and prop layout direction.',
platforms: ['android', 'ios'],
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
# Test Scenario: direction

**E2E test:** ongoing research

## Prerequisites

- iOS 18+ device or simulator
with at least one RTL language localization configured in Xcode (e.g. empty ar.lproj/InfoPlist.strings), or system language set to Arabic/Hebrew
- Android emulator
Android emulator with supportRtl enabled in app manifest

Note:

- App restart is required after changing forceRTL / allowRTL
- Assumption: system and RN settings are working correctly. Here only react-native-screens prop is tested.

## Steps

### Baseline

1. Launch the app and navigate to the scenario

- [ ] Expected: Config and Tab2 are shown in LTR order (Config on left, Tab2 to its right). All controls default to forceRTL=false, allowRTL=true, TabsHost direction = inherit

---

### TabsHost inherit — follows RN/system

2. Ensure system/RN is LTR (I18nManager.isRTL == false), set TabsHost direction = inherit

- [ ] Expected: Tab bar displays in LTR order (Config on left, Tab2 to its right)

3. Set system/RN to RTL (I18nManager.isRTL == true), keep TabsHost direction = inherit

- [ ] Expected: Tab bar displays in RTL order — (Config on right, Tab2 to its left)

---

### TabsHost ltr

4. Set system/RN to RTL, set TabsHost direction = ltr

- [ ] Expected: Tab bar displays in LTR order — TabsHost overrides RTL from RN/system

5. Set system/RN to LTR, keep TabsHost direction = ltr

- [ ] Expected: Tab bar stays LTR

6. Cycle through inherit → rtl → ltr → rtl → inherit

- [ ] Expected: Tab bar direction updates immediately with each change, no crash or layout freeze

---

### TabsHost rtl

7. Set system/RN to LTR, set TabsHost direction = rtl

- [ ] Expected: Tab bar displays in RTL order — TabsHost overrides LTR from RN/system

8. Set system/RN to RTL, keep TabsHost direction = rtl

- [ ] Expected: Tab bar stays RTL

9. Cycle through inherit → ltr → rtl → ltr → inherit

- [ ] Expected: Tab bar direction updates immediately with each change, no crash or layout freeze

---

### Precedence chain verification

10. System = RTL, forceRTL=false, allowRTL=false, TabsHost = inherit

- [ ] Expected: Tab bar is LTR (allowRTL=false blocks system RTL)

11. System = LTR, forceRTL=true (restart), TabsHost = inherit

- [ ] Expected: Tab bar is RTL (forceRTL overrides system)

12. System = LTR, forceRTL=true (restart), TabsHost = ltr

- [ ] Expected: Tab bar is LTR (TabsHost wins over forceRTL)
Loading