-
-
Notifications
You must be signed in to change notification settings - Fork 643
refactor(test): add scenario for overrideScrollViewContentInsetAdjustmentBehavior (iOS) #3957
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
Open
LKuchno
wants to merge
8
commits into
main
Choose a base branch
from
@lkuchno/test-tab-screen-options-ios
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+168
−11
Open
Changes from 5 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
4c3e912
refactor(test): override-scroll-view-content-inset
LKuchno 4736878
refactor(test): override-scroll-view-content-inset
LKuchno a5655b6
Merge branch '@lkuchno/test-tab-screen-options-ios' of github.com:sof…
LKuchno 96fb36d
remove e2e test from this branch
LKuchno 8df7d76
e2e section update
LKuchno 8f6aa6b
change scroll order first scroll down then to top - make more sense, …
LKuchno 43b029a
add exporting functions
LKuchno e196149
small scenario adjustment
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
131 changes: 131 additions & 0 deletions
131
...feature-tests/tabs/test-tabs-override-scroll-view-content-inset-ios/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,131 @@ | ||
| # Test Scenario: overrideScrollViewContentInsetAdjustmentBehavior | ||
|
|
||
| ## Details | ||
|
|
||
| **Description:** Validates the | ||
| `overrideScrollViewContentInsetAdjustmentBehavior` prop on `TabsScreen` | ||
| (iOS only). By default, React Native sets ScrollView's | ||
| `contentInsetAdjustmentBehavior` to `never`, which prevents the scroll | ||
| view from respecting navigation bar and tab bar insets. When this prop | ||
| is `true` (the default), the behavior is overridden back to UIKit's | ||
| `automatic`, so content is inset from the bars. When set to `false`, | ||
| the content scrolls behind the bars without insets. | ||
| The test verifies that the three tabs — **False**, **True**, and | ||
| **Default** — each exhibit the expected inset behavior and that the | ||
| **Default** tab (prop omitted) matches the **True** tab. | ||
|
|
||
| **OS test creation version:** iOS 18.6 and 26.2 | ||
|
|
||
| ## E2E test | ||
|
|
||
| No: Ongoing research. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| - iOS device or simulator (iPhone) | ||
|
|
||
| ## Note | ||
|
|
||
| - This prop is iOS-only and Fabric-only; skip on Android. | ||
| - "Content scrolls behind bars" means list items are visible underneath | ||
| the navigation bar and/or tab bar when scrolled to the top or bottom | ||
| of the list. | ||
| - "Content inset from bars" means the first and last list items are | ||
| fully visible and never hidden behind a bar, even when the scroll | ||
| view is at its extreme positions. | ||
| - The navigation bar at the top and the tab bar at the bottom are both | ||
| relevant reference points for inset verification. | ||
|
|
||
| ## Steps | ||
|
|
||
| ### Baseline | ||
|
|
||
| 1. Launch the app and navigate to the | ||
| **Override Scroll View Content Inset** screen. | ||
|
|
||
| - [ ] Expected: Three tabs are displayed in the tab bar: **False**, | ||
| **True**, and **Default**. The **False** tab is selected and shows | ||
| a scrollable list of 30 items. | ||
|
|
||
| --- | ||
|
|
||
| ### `false` — content scrolls behind bars | ||
|
|
||
| 2. Confirm the **False** tab is active and scroll the list to the top. | ||
|
|
||
| - [ ] Expected: The text label | ||
| `overrideScrollViewContentInsetAdjustmentBehavior: false` at | ||
| the top of the scroll content is partially or fully obscured | ||
| behind the navigation bar, because | ||
| `overrideScrollViewContentInsetAdjustmentBehavior` is `false` | ||
| and the scroll view uses | ||
| `contentInsetAdjustmentBehavior: never`. | ||
|
|
||
| 3. Scroll the list to the bottom. | ||
|
|
||
| - [ ] Expected: The last item in the list is partially or fully | ||
| obscured behind the tab bar, confirming that no bottom inset is | ||
| applied. | ||
|
|
||
| --- | ||
|
|
||
| ### `true` — content inset from bars | ||
|
|
||
| 4. Tap the **True** tab. | ||
|
|
||
| - [ ] Expected: The **True** tab becomes active and shows a | ||
| scrollable list of 30 items. | ||
|
|
||
| 5. Scroll the list to the top. | ||
|
|
||
| - [ ] Expected: The text label | ||
| `overrideScrollViewContentInsetAdjustmentBehavior: true` | ||
| at the top of the scroll content is fully visible below the | ||
| navigation bar and not obscured behind it. The scroll view | ||
| respects the top inset | ||
| (`contentInsetAdjustmentBehavior: automatic`). | ||
|
|
||
| 6. Scroll the list to the bottom. | ||
|
|
||
| - [ ] Expected: The last item is fully visible and is not obscured by | ||
| the tab bar. The scroll view respects the bottom inset. | ||
|
|
||
| --- | ||
|
|
||
| ### Default (prop omitted) — same as `true` | ||
|
|
||
| 7. Tap the **Default** tab. | ||
|
|
||
| - [ ] Expected: The **Default** tab becomes active and shows a | ||
| scrollable list of 30 items. | ||
|
|
||
| 8. Scroll the list to the top. | ||
|
|
||
| - [ ] Expected: The text label | ||
| `overrideScrollViewContentInsetAdjustmentBehavior: | ||
| (not set, defaults to true)` at the top of the scroll content | ||
| is fully visible below the navigation bar and not obscured | ||
| behind it — identical behavior to the **True** tab. | ||
|
|
||
| 9. Scroll the list to the bottom. | ||
|
|
||
| - [ ] Expected: The last item is fully visible and not obscured by | ||
| the tab bar — identical behavior to the **True** tab. | ||
|
|
||
| --- | ||
|
|
||
| ### Cross-tab comparison | ||
|
|
||
| 10. Switch between the **True** tab and the **Default** tab several | ||
| times while keeping each list scrolled to the top. | ||
|
|
||
| - [ ] Expected: Both tabs show the first item fully visible below | ||
| the navigation bar with identical inset. No layout jump or | ||
| visual difference between the two tabs. | ||
|
|
||
| 11. Switch to the **False** tab and scroll to the top, then | ||
| immediately switch to the **True** tab. | ||
|
|
||
| - [ ] Expected: The **True** tab correctly shows the first item | ||
| inset from the navigation bar. No crash or blank screen occurs | ||
| during the switch. | ||
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The OS version line is ambiguous:
iOS 18.6 and 26.2reads like two different OSes, but only the first number is prefixed withiOS. For consistency with other scenario docs (e.g.iOS: 18.6 and 26.2), consider adding theiOS:prefix/formatting so it’s clear both versions are iOS versions.