-
-
Notifications
You must be signed in to change notification settings - Fork 632
refactor(tests): reorganizing test-tabs-layout-direction plus scenario #3845
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
+86
−3
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
d2f670f
refactor(tests): reorganizing test-tabs-layout-direction plus scenario
LKuchno b6ee1ff
heading formating change in scenario file
LKuchno 2ef93d0
romoving divider
LKuchno 1a86e1a
adding divider between scenario steps
LKuchno 4899e32
Apply suggestion from @kkafar
LKuchno 3e7cfab
test name change to add tab-bar- part and e2e information
LKuchno daf06b4
changes after pull
LKuchno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 83 additions & 0 deletions
83
.../tests/single-feature-tests/tabs/test-tabs-tab-bar-layout-direction/scenario.md
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 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) | ||
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.