@@ -85,7 +85,7 @@ We recommend using [React Native Testing Library](https://callstack.github.io/re
85
85
86
86
We will go through some real-world case test code examples. Each code example consists of tested navigator and test code file.
87
87
88
- ### Example 1
88
+ ### Example 1 - Navigation between tabs
89
89
90
90
Navigate to settings screen by tab bar button press.
91
91
@@ -245,9 +245,9 @@ const event = {};
245
245
fireEvent .press (button, event );
246
246
```
247
247
248
- ### Example 2
248
+ ### Example 2 - Reacting to navigation events
249
249
250
- Show text on another screen after transition to it ends .
250
+ Show text on another screen after transition is completed .
251
251
252
252
<Tabs groupId =" example " queryString =" example " >
253
253
<TabItem value =" static " label =" Static " default >
@@ -415,11 +415,11 @@ act(() => jest.runAllTimers());
415
415
416
416
If we hadn't used fake timers in this example, the test would have failed.
417
417
418
- In the previous example we didn't use fake timers because ` BottomTabNavigator ` by default does not use any animations for the transition.
418
+ In the previous example we didn't use fake timers because ` BottomTabNavigator ` by default does not use any transition animations .
419
419
420
- ### Example 3
420
+ ### Example 3 - Enforce navigator state in response to navigation event
421
421
422
- Always displays settings screen after settings tab bar button press .
422
+ Always display settings screen after settings tab bar button is pressed .
423
423
424
424
<Tabs groupId =" example " queryString =" example " >
425
425
<TabItem value =" static " label =" Static " default >
@@ -654,7 +654,7 @@ We get tab bar buttons, press buttons and check if rendered screens are correct.
654
654
655
655
In this example, we don't need to use fake timers because text from the next screen is available using ` getByText ` even before the animation ends.
656
656
657
- ### Example 4
657
+ ### Example 4 - ` useFocusEffect ` hook and data fetching
658
658
659
659
On every profile screen focus, display loading state while waiting for data and then show fetched profile.
660
660
0 commit comments