Commit fb8902a
authored
refactor(test): add scenario.md and restructure stale update rejection test (#4019)
## Description
This PR finalises the manual test coverage for the
`rejectStaleNavStateUpdates` prop on `TabsHost` and the companion
`onTabSelectionRejected` callback. The existing single-file test screen
(`test-tabs-stale-update-rejection.tsx`) is promoted to a
directory-based module so that a `scenario.md` can live alongside the
implementation, following the established pattern for tab test scenarios
in this repo.
The scenario covers three distinct cases: baseline state verification,
stale rejection triggered by a heavy render race, and runtime toggling
of `rejectStaleNavStateUpdates` to confirm the prop controls rejection
behaviour dynamically. Both iOS (18.x and 26.x) and Android (API 36) are
listed as supported platforms. An automated E2E Detox test is noted as
planned but intentionally deferred.
The toast message on `onTabSelectionRejected` is also simplified from a
JSON-stringified payload snippet to the plain string
`onTabSelectionRejected`, making future test assertions straightforward.
Closes:
software-mansion/react-native-screens-labs#1456
## Changes
- **Tests/Tabs**: Converted `test-tabs-stale-update-rejection.tsx` from
a flat file to a directory module
(`test-tabs-stale-update-rejection/index.tsx`) and fixed all relative
import paths accordingly
- **Tests/Tabs**: Simplified the `onTabSelectionRejected` toast message
from a JSON-stringified event excerpt to the literal string
`onTabSelectionRejected` for easier test assertions
- **Tests/Tabs**: Added `scenario.md` with a full 7-step manual test
plan covering baseline, stale rejection under heavy render, and runtime
toggling of `rejectStaleNavStateUpdates`1 parent 3002fd6 commit fb8902a
2 files changed
Lines changed: 92 additions & 5 deletions
File tree
- apps/src/tests/single-feature-tests/tabs/test-tabs-stale-update-rejection
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
12 | | - | |
13 | | - | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
| |||
116 | 116 | | |
117 | 117 | | |
118 | 118 | | |
119 | | - | |
| 119 | + | |
120 | 120 | | |
121 | 121 | | |
122 | 122 | | |
| |||
143 | 143 | | |
144 | 144 | | |
145 | 145 | | |
146 | | - | |
| 146 | + | |
147 | 147 | | |
148 | 148 | | |
149 | 149 | | |
Lines changed: 87 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
0 commit comments