You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/articles/how-detox-works.md
+1-1
Original file line number
Diff line number
Diff line change
@@ -32,7 +32,7 @@ Detox tries to eliminate flakiness by automatically synchronizing your tests wit
32
32
33
33
-**Timers** - Detox monitors timers (explicit asynchronous delays). There’s special support for JavaScript's `setTimeout`, which is monitored.
34
34
35
-
-**Animations** - Detox monitors active animations and transitions. There’s special support for React Native animations with the Animated library.
35
+
-**Animations** - Detox monitors active animations and transitions. There’s special support for React Native animations with the Animated library, and even the popular [react-native-reanimated](https://docs.swmansion.com/react-native-reanimated).
36
36
37
37
-**React Native JavaScript thread** - Detox monitors pending operations on the JavaScript thread in RN apps.
Copy file name to clipboardExpand all lines: docs/troubleshooting/synchronization.md
+7-10
Original file line number
Diff line number
Diff line change
@@ -54,7 +54,7 @@ await device.launchApp({
54
54
55
55
### Step 2: Applying the Most Suitable Solution
56
56
57
-
First and foremost, as explained, an app's inability to go idle might be an indication of that some resources are _unnecessarily_ busy. Therefore, whether it's a network request that's been left unacknowledged, or an endless loader -
57
+
First and foremost, as explained, an app's inability to go idle might be an indication of that some resources are _unnecessarily_ busy. Therefore, whether it's a network request that's been left unacknowledged, or an endless loader -
58
58
59
59
**The best solution is to fix the problem!:construction_worker:**
60
60
@@ -66,7 +66,7 @@ Sometimes the resource that's holding the app back from turning idle is a mere a
66
66
67
67
The synchronization logs telling you that, would usually look roughly like this:
68
68
69
-
```
69
+
```plain text
70
70
09:04:20.170 detox[90417] i The app is busy with the following tasks:
71
71
• UI elements are busy:
72
72
- View animations pending: 2.
@@ -91,7 +91,7 @@ The synchronization logs telling you that, would usually look roughly like this:
91
91
92
92
Your app is waiting indefinitely to load all of the necessary data from the a non-responsive server / a bad network, and therefore cannot switch to rendering the expected UI. When this is the deal, additional synchronization logs also repeatedly show some in-flight network calls:
93
93
94
-
```
94
+
```plain text
95
95
09:04:20.170 detox[90417] i The app is busy with the following tasks:
@@ -102,7 +102,7 @@ _This can be solved by finding out why the server is being non-responsive or unr
102
102
103
103
##### ii. A returned server error is not conveyed by the UI
104
104
105
-
Sometimes the servers _do_ respond, **but with an error**. Often times, we fail to adjust our app code so as to display the necessary UI (e.g. replacing the loader with a friendly message). Rather, the loader just remains running indefinitely. Unlike in the previous case, you will not see synchronization-debug logs surfacing those unacknowledged network calls.
105
+
Sometimes the servers _do_ respond, **but with an error**. Often times, we fail to adjust our app code to display the necessary UI (e.g. replacing the loader with a friendly message). Rather, the loader just remains running indefinitely. Unlike in the previous case, you will not see synchronization-debug logs surfacing those unacknowledged network calls.
106
106
107
107
_Scan through the **app/device** logs (not Detox log!) from the bottom up and find traces of errors. The app/device logs can be automatically recorded by Detox as a test-run artifact._
108
108
@@ -122,8 +122,8 @@ Detox currently has no API's for "black listing" animations - namely, excluding
122
122
123
123
**Not all synchronization issues around animations are trivial:**
124
124
125
-
* The animation can be associated with an element that is rendered off-screen, such as an item in a long news feed that's been rendered beyond the screen's bound, or a loader in a screen associated with a bottom tab that hasn't been navigated-to since the beginning of the test.
126
-
*The animation can also be associated with elements which have been silently leaked (bug) under other UI elements. They are fully functional yet not visible to the user. For example: A compact loader accidentally showing under the app bar (android)/navigation bar (iOS).
125
+
- The animation can be associated with an element that is rendered off-screen, such as an item in a long news feed that's been rendered beyond the screen's bound, or a loader in a screen associated with a bottom tab that hasn't been navigated-to since the beginning of the test.
126
+
-The animation can also be associated with elements which have been silently leaked (bug) under other UI elements. They are fully functional yet not visible to the user. For example: A compact loader accidentally showing under the app bar (android)/navigation bar (iOS).
127
127
128
128
These types of animations can be difficult to track down, and sometimes fix.
129
129
@@ -170,7 +170,7 @@ By default, Detox is designed to ignore JavaScript's `setInterval()` and will on
170
170
171
171
If you can't find the source of the problem, or otherwise decide not to fix it (temporarily...), Detox always has the fail-safe solution of turning off automatic-synchronization altogether and waiting manually for elements.
172
172
173
-
This isn’t the recommended approach as you'd be giving up Detox's synchronization super-powers and resort to manually defining timeouts, but hey, life is about tradeoffs. You can do this with the main [synchronization switching API's](../api/device.md#devicedisablesynchronization):
173
+
This isn’t the recommended approach as you'd be giving up Detox's synchronization super-powers and resort to manually defining timeouts, but hey, life is about trade-offs. You can do this with the main [synchronization switching API's](../api/device.md#devicedisablesynchronization):
As of writing this, fine-tuned control over the various synchronized OS-systems that Detox monitors is not supported. Follow issue [#1513](https://github.com/wix/Detox/issues/1513) to keep track of that.
0 commit comments