Commit 2f6db3d
refactor(test): test-tabs-appearance-defined-by-selected-tab (#4179)
## Summary
Refactors the single-feature test screen and adds scenario for
**`test-tabs-appearance-defined-by-selected-tab`**, which verifies that
the native tab bar dynamically updates to reflect the appearance/styling
defined by the currently selected tab.
The screen exercises per-tab tab bar appearance across iOS and Android:
tab bar background, icon and title colors for normal/selected/focused
states, active indicator, badge text/background colors, and title font
options. Each of three tabs defines a distinct appearance so switching
tabs (via the native bar or in-screen buttons) is visibly reflected in
the bar.
Closes:
software-mansion/react-native-screens-labs#1533
## Changelog
- **`.../test-tabs-appearance-defined-by-selected-tab/index.tsx`** —
refactored test screen; per-tab appearance configs derived from shared
`DEFAULT_APPEARANCE_IOS` / `DEFAULT_APPEARANCE_ANDROID` defaults with
per-tab overrides; added `badgeValue` on Tab3.
- **`.../test-tabs-appearance-defined-by-selected-tab/scenario.md`** —
new manual test scenario with iOS/Android steps and expected per-tab
color results, including badge value notes.
-
**`.../test-tabs-appearance-defined-by-selected-tab/scenario-description.ts`**
— added `details` field and set name to "Tab-Specific Appearance".
## Test visual documentation
|Android API lvl 36| iOS 18.6 | iOS 26.5|
|---|---|---|
| <video
src="https://github.com/user-attachments/assets/63d7e2be-21dd-4c35-bbb2-72f7f15e02f2"
/>| <video
src="https://github.com/user-attachments/assets/706fa7ec-f601-495b-a478-0b814b5e790b"/>
| <video
src="https://github.com/user-attachments/assets/9f43805b-7eeb-4590-a12e-9302c3e7705d"/>
|
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent 5e2be05 commit 2f6db3d
3 files changed
Lines changed: 246 additions & 83 deletions
File tree
- apps/src/tests/single-feature-tests/tabs/test-tabs-appearance-defined-by-selected-tab
Lines changed: 47 additions & 81 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
| 34 | + | |
| 35 | + | |
41 | 36 | | |
42 | 37 | | |
43 | 38 | | |
| |||
47 | 42 | | |
48 | 43 | | |
49 | 44 | | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 45 | + | |
55 | 46 | | |
56 | 47 | | |
57 | 48 | | |
58 | 49 | | |
59 | 50 | | |
60 | | - | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
61 | 61 | | |
62 | 62 | | |
63 | 63 | | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
64 | 84 | | |
65 | 85 | | |
66 | 86 | | |
| |||
139 | 159 | | |
140 | 160 | | |
141 | 161 | | |
142 | | - | |
143 | | - | |
144 | | - | |
145 | | - | |
146 | | - | |
147 | | - | |
148 | | - | |
149 | | - | |
150 | | - | |
151 | | - | |
152 | | - | |
153 | | - | |
154 | | - | |
155 | | - | |
156 | | - | |
157 | | - | |
158 | | - | |
159 | | - | |
160 | | - | |
161 | | - | |
162 | | - | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
167 | | - | |
168 | | - | |
169 | | - | |
170 | | - | |
171 | | - | |
172 | | - | |
173 | | - | |
174 | | - | |
175 | | - | |
176 | | - | |
177 | | - | |
178 | | - | |
179 | | - | |
180 | | - | |
181 | | - | |
182 | | - | |
183 | | - | |
184 | | - | |
185 | | - | |
| 162 | + | |
| 163 | + | |
186 | 164 | | |
187 | 165 | | |
188 | 166 | | |
| |||
191 | 169 | | |
192 | 170 | | |
193 | 171 | | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
194 | 177 | | |
195 | 178 | | |
196 | 179 | | |
| |||
199 | 182 | | |
200 | 183 | | |
201 | 184 | | |
202 | | - | |
| 185 | + | |
203 | 186 | | |
204 | 187 | | |
205 | 188 | | |
206 | | - | |
| 189 | + | |
207 | 190 | | |
208 | 191 | | |
209 | 192 | | |
| |||
215 | 198 | | |
216 | 199 | | |
217 | 200 | | |
| 201 | + | |
218 | 202 | | |
219 | 203 | | |
220 | 204 | | |
221 | 205 | | |
222 | 206 | | |
223 | | - | |
224 | | - | |
225 | | - | |
226 | | - | |
227 | | - | |
228 | | - | |
229 | | - | |
230 | | - | |
231 | | - | |
232 | | - | |
233 | | - | |
234 | | - | |
235 | | - | |
236 | | - | |
237 | | - | |
238 | | - | |
239 | | - | |
240 | | - | |
241 | | - | |
242 | | - | |
| 207 | + | |
| 208 | + | |
243 | 209 | | |
244 | 210 | | |
245 | 211 | | |
| |||
248 | 214 | | |
249 | 215 | | |
250 | 216 | | |
251 | | - | |
252 | | - | |
| 217 | + | |
| 218 | + | |
253 | 219 | | |
254 | 220 | | |
255 | 221 | | |
| |||
Lines changed: 4 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
| 6 | + | |
| 7 | + | |
6 | 8 | | |
7 | | - | |
| 9 | + | |
8 | 10 | | |
9 | 11 | | |
0 commit comments