Skip to content

Commit 138a605

Browse files
committed
fix typo's
1 parent 2399296 commit 138a605

File tree

4 files changed

+20
-20
lines changed

4 files changed

+20
-20
lines changed

docs/articles/how-detox-works.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ When a Detox test executes, you actually have two different parts running side b
66

77
- **The mobile app itself**, usually running on a simulator/emulator. A regular native build of your app is installed and executed on the device. Your app is usually built once before the tests start running.
88

9-
- **The test suite**, running on Node.js, ove ra test runner like Jest. The tests are normally written in JavaScript. Because the tests are asynchronous in nature (every test line requires to access the app and wait for a response), the tests rely heavily on [`async`-`await`](https://ponyfoo.com/articles/understanding-javascript-async-await).
9+
- **The test suite**, running on Node.js, over a test runner like Jest. The tests are normally written in JavaScript. Because the tests are asynchronous in nature (every test line requires to access the app and wait for a response), the tests rely heavily on [`async`-`await`](https://ponyfoo.com/articles/understanding-javascript-async-await).
1010

1111
The two parts are usually running in separate processes on your machine. It is also possible to run the two parts on different machines. Communication between the two parts takes place over the network using a web socket.
1212

13-
In practice, to make the communication more resilient, both parts are implemented as clients and communicate through a Detox server that acts as mediator. Haivng that server allows for some advantages like allowing one side to disconnect (during a simulator boot for example or app restart) without disconnecting the other side and losing its state.
13+
In practice, to make the communication more resilient, both parts are implemented as clients and communicate through a Detox server that acts as mediator. Having that server allows for some advantages like allowing one side to disconnect (during a simulator boot for example or app restart) without disconnecting the other side and losing its state.
1414

1515
## How Detox Automatically Synchronizes With Your App
1616

docs/introduction/debugging.mdx

+2-2
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ Debugger listening on ws://127.0.0.1:9229/3dedd03b-8896-4ab8-a0a8-1b647abb9c98
3333
For help, see: https://nodejs.org/en/docs/inspector
3434
```
3535

36-
Now you can attach to Detox and tap-in into it's execution process.
36+
Now you can attach to Detox and tap-in into its execution process.
3737

3838
:::info
3939

@@ -123,7 +123,7 @@ parameters to disable various side effects and make life easier when debugging:
123123
}
124124
```
125125

126-
- Using a preconfigured `session` with an autostarting server removes the legwork of copying and
126+
- Using a preconfigured `session` with an auto-starting server removes the legwork of copying and
127127
pasting values to the instrumentation runner launch arguments dialog every time before any launch
128128
from the IDE. Otherwise, by default when the `session` object omitted, `server` and `sessionId`
129129
are randomly generated for every new test session.

docs/introduction/partials/_debugging-attach-webstorm.mdx

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ Create a new debugging configuration using the default arguments (port 9229, etc
1818

1919
![Webstorm node debugging configuration](../../img/webstorm/node-debug-configuration.png)
2020

21-
Attach to Detox by "debugging" the new configuration (start it using the beatle button).
21+
Attach to Detox by "debugging" the new configuration (start it using the beetle button).
2222

2323
![Webstorm start debug configuration](../../img/webstorm/run-debug-configuration.png)
2424

docs/troubleshooting/synchronization.md

+15-15
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,22 @@
22

33
<!-- markdownlint-configure-file { "header-increment": 0 } -->
44

5-
Traditionally, one of the most difficult aspects of E2E testing is synchronizing the test scenario with the app. Complex operations inside the app (like accessing servers or performing animations) often take a variable amount of time to complete; In each step, we can’t move on to the next one until they’ve completed (i.e. when the app goes idle), which in turn surfaces a challenge in continously trying to understand when the right time to do so is.
5+
Traditionally, one of the most difficult aspects of E2E testing is synchronizing the test scenario with the app. Complex operations inside the app (like accessing servers or performing animations) often take a variable amount of time to complete; In each step, we can’t move on to the next one until they’ve completed (i.e. when the app goes idle), which in turn surfaces a challenge in continuously trying to understand when the right time to do so is.
66

77
Fortunately, Detox - which comes with a gray-box approach, cleverly performs the synchronization automatically, as explained [here](../articles/how-detox-works.md#how-detox-automatically-synchronizes-with-your-app).
88

9-
## Mitigating Synthronization Issues
9+
## Mitigating Synchronization Issues
1010

1111
While Detox's auto-synchronization mechanism is powerful and efficient, it does come with at least one caveat: **It imposes strictness over the app's behavior.** By default, Detox will fail your tests (i.e. due to a wait-for-idle **time-out**), if, for example, following an app launch or a navigation to a new screen, timers or animations continue to run endlessly. While this could be considered an advantage (e.g. finding an animation or timer management leakage!), these type of issues may not:
1212

13-
1. Be specifially related to the main coverage goal of your test.
13+
1. Be specifically related to the main coverage goal of your test.
1414
2. Be directly visible to or considered a significant bug by the end user.
1515

1616
Therefore, it may be something some would want to be able to limit or completely opt-out of. With this in mind, let's review the possible ways of mitigation, aimed at either finding and fixing a bug, or allowing for it to be overlooked.
1717

1818
### Step 1: Understanding what's blocking your app
1919

20-
Detox's syncrhonization debugging mechanism generates output to Detox's log which provides useful synchronizationd debugging information. We recommend that you'd start by pinpointing what the busy resources are - those that are keeping you app from going idle, based on those logs. Turn the debugging mechanism toggle on if you need to (although, it is on by default), rerun your test(s) and follow Detox's logs.
20+
Detox's synchronization debugging mechanism generates output to Detox's log which provides useful synchronization debugging information. We recommend that you'd start by pinpointing what the busy resources are - those that are keeping your app from going idle, based on those logs. Turn the debugging mechanism toggle on if you need to (although, it is on by default), rerun your test(s) and follow Detox's logs.
2121

2222
:::info
2323

@@ -54,7 +54,7 @@ await device.launchApp({
5454

5555
### Step 2: Applying the Most Suitable Solution
5656

57-
First and foremost, as explained, an app's inability to go idle might be an indication of that some resources are _unnecessarily_ busy. Thefeore, 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 -
5858

5959
**The best solution is to fix the problem!:construction_worker:**
6060

@@ -64,7 +64,7 @@ Sometimes the resource that's holding the app back from turning idle is a mere a
6464

6565
![App loader example](../img/app-loader.jpeg)
6666

67-
The syncrhonization logs telling you that, would usually look roughly like this:
67+
The synchronization logs telling you that, would usually look roughly like this:
6868

6969
```
7070
09:04:20.170 detox[90417] i The app is busy with the following tasks:
@@ -85,11 +85,11 @@ The syncrhonization logs telling you that, would usually look roughly like this:
8585

8686
<sup>(these are logs generated by Detox iOS; Detox-Android generates different yet equivalent ones)</sup>
8787

88-
**Below are a few actual-bug scanerios where this can take place - all of which are easy to inspect, identify and fix.**
88+
**Below are a few actual-bug scenarios where this can take place - all of which are easy to inspect, identify and fix.**
8989

90-
##### i. A server is being nonresponsive
90+
##### i. A server is being non-responsive
9191

92-
Your app is waiting indefinitely to load all of the necessary data from the a nonresponsive 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:
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:
9393

9494
```
9595
09:04:20.170 detox[90417] i The app is busy with the following tasks:
@@ -98,7 +98,7 @@ Your app is waiting indefinitely to load all of the necessary data from the a no
9898
- URL #2: https://unreachable-server.org/hello
9999
```
100100

101-
_This can be solved by finding out why the server is being nonresponsive or unreachable, for example - by tracking network calls into the logs, or inspecting requests on the server-ends._
101+
_This can be solved by finding out why the server is being non-responsive or unreachable, for example - by tracking network calls into the logs, or inspecting requests on the server-ends._
102102

103103
##### ii. A returned server error is not conveyed by the UI
104104

@@ -122,14 +122,14 @@ Detox currently has no API's for "black listing" animations - namely, excluding
122122

123123
**Not all synchronization issues around animations are trivial:**
124124

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 naviagated-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 visibile to the user. For example: A compact loader accidently 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).
127127

128128
These types of animations can be difficult to track down, and sometimes fix.
129129

130-
**We are aiming to provide more advanced Detox-complementary tools that would help identify such animations more easily (follow github issue [#4734](https://github.com/wix/Detox/issues/4734)). Until we do, here are some things you can do, roughly, in order:**
130+
**We are aiming to provide more advanced Detox-complementary tools that would help identify such animations more easily (follow Github issue [#4734](https://github.com/wix/Detox/issues/4734)). Until we do, here are some things you can do, roughly, in order:**
131131

132-
1. _(Most recommended) Start Detox in [debug mode](../introduction/debugging.mdx), and then run the blocked test step-by-step - either from the beginning of it, or starting a breakpoint you've set over where you think the synchronization issue starts. Step over the Detox commands until Detox gets blocked and signals for syncrhonization issues (i.e. in the logs). Then, explore the app yourself (!), physically looking for animations (e.g. by scrolling lists, navigating through tabs, and so on.
132+
1. _(Most recommended) Start Detox in [debug mode](../introduction/debugging.mdx), and then run the blocked test step-by-step - either from the beginning of it, or starting a breakpoint you've set over where you think the synchronization issue starts. Step over the Detox commands until Detox gets blocked and signals for synchronization issues (i.e. in the logs). Then, explore the app yourself (!), physically looking for animations (e.g. by scrolling lists, navigating through tabs, and so on.
133133
You might actually be able to see the animation in your own eyes, or witness Detox getting unblocked as your interactions release an otherwise endless loader._
134134
_Do this iteratively until the exact animating UI element can be pinpointed._
135135

@@ -170,7 +170,7 @@ By default, Detox is designed to ignore JavaScript's `setInterval()` and will on
170170

171171
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.
172172

173-
This isn’t the recommended approach as you'd be giving up Detox's syncrhonization super-powers and resort to manually defining timeouts, but hey, life is about tradeoffs. You can do this with the main [syncrhonization 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 tradeoffs. You can do this with the main [synchronization switching API's](../api/device.md#devicedisablesynchronization):
174174

175175
```js
176176
// Disabling in mid test-run:

0 commit comments

Comments
 (0)