Skip to content

Commit 7cf9c28

Browse files
authored
fix(docs): update docs (#44)
1 parent b342a5f commit 7cf9c28

File tree

2 files changed

+60
-58
lines changed

2 files changed

+60
-58
lines changed

README.md

Lines changed: 60 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
[![Publish npm Package](https://github.com/codeceptjs/detox-helper/actions/workflows/npm-publish.yml/badge.svg)](https://github.com/codeceptjs/detox-helper/actions/workflows/npm-publish.yml) [![e2e-android](https://github.com/codeceptjs/detox-helper/actions/workflows/e2e-android.yml/badge.svg)](https://github.com/codeceptjs/detox-helper/actions/workflows/e2e-android.yml) [![e2e-ios](https://github.com/codeceptjs/detox-helper/actions/workflows/e2e-ios.yml/badge.svg)](https://github.com/codeceptjs/detox-helper/actions/workflows/e2e-ios.yml)
2+
23
# [Detox](https://github.com/wix/Detox) Helper for [CodeceptJS](https://codecept.io)
34

45
Testing Mobile Apps on iOS and Android can look like this:
@@ -23,7 +24,7 @@ I.runOnIOS(() => {
2324

2425
Example output:
2526

26-
```
27+
```bash
2728
creating output directory: /Users/runner/work/detox-helper/detox-helper/test/output
2829
***************************************
2930
nodeInfo: 20.14.0
@@ -40,63 +41,63 @@ Using test root "/Users/runner/work/detox-helper/detox-helper/test"
4041
Helpers: Detox, ExpectHelper
4142
Plugins: screenshotOnFail
4243

43-
Acceptance Tests --
44-
[1] Starting recording promises
45-
Timeouts:
46-
11:44:06.770 detox[8813] i App started
47-
11:44:28.445 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
48-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
49-
11:44:28.557 detox[8813] i --- STARTED "before each" hook: Before for "App started" ---
50-
11:44:28.583 detox[8813] i I launch app
51-
11:44:30.037 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
52-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
53-
11:44:30.043 detox[8813] i I wait for element visible "#hello_button", 15
54-
11:44:31.253 detox[8813] i --- ENDED "before each" hook: Before for "App started" ---
55-
11:44:31.273 detox[8813] i I see "Welcome"
56-
11:44:31.289 detox[8813] i ✔ OK in 25ms
57-
11:44:31.289 detox[8813] i
58-
11:44:31.301 detox[8813] i Get platform
59-
11:44:34.736 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
60-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
61-
11:44:40.582 detox[8813] i --- STARTED "before each" hook: Before for "Get platform" ---
62-
11:44:40.588 detox[8813] i I launch app
63-
11:44:42.271 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
64-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
65-
11:44:42.274 detox[8813] i I wait for element visible "#hello_button", 15
66-
11:44:43.126 detox[8813] i --- ENDED "before each" hook: Before for "Get platform" ---
67-
11:44:43.150 detox[8813] i I grab platform
68-
11:44:43.152 detox[8813] i I expect ""ios"" to equal ""ios""
69-
11:44:43.158 detox[8813] i ✔ OK in 31ms
70-
11:44:43.158 detox[8813] i
71-
11:44:43.166 detox[8813] i Show hello screen after tap
72-
11:44:46.251 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
73-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
74-
11:44:52.308 detox[8813] i --- STARTED "before each" hook: Before for "Show hello screen after tap" ---
75-
11:44:52.321 detox[8813] i I launch app
76-
11:47:22.243 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
77-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
78-
11:47:22.319 detox[8813] i I wait for element visible "#hello_button", 15
79-
11:47:23.637 detox[8813] i --- ENDED "before each" hook: Before for "Show hello screen after tap" ---
80-
11:47:23.668 detox[8813] i I dont see "Hello!!!"
81-
11:47:23.699 detox[8813] i I click "#hello_button"
82-
11:47:24.308 detox[8813] i I see "Hello!!!"
83-
11:47:24.323 detox[8813] i ✔ OK in 684ms
84-
11:47:24.323 detox[8813] i
85-
11:47:24.334 detox[8813] i Show world screen after tap
86-
11:47:27.298 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
87-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
88-
11:47:33.604 detox[8813] i --- STARTED "before each" hook: Before for "Show world screen after tap" ---
89-
11:47:33.608 detox[8813] i I launch app
90-
11:47:36.074 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
91-
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
92-
11:47:36.110 detox[8813] i I wait for element visible "#hello_button", 15
93-
11:47:36.450 detox[8813] i --- ENDED "before each" hook: Before for "Show world screen after tap" ---
94-
11:47:36.452 detox[8813] i I click "#world_button"
95-
11:47:37.314 detox[8813] i I see "World!!!"
96-
11:47:37.408 detox[8813] i ✔ OK in 935ms
97-
11:47:37.409 detox[8813] i
98-
11:47:37.468 detox[8813] i
99-
11:47:37.470 detox[8813] i OK | 4 passed // 7m
44+
Acceptance Tests --
45+
[1] Starting recording promises
46+
Timeouts:
47+
11:44:06.770 detox[8813] i App started
48+
11:44:28.445 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
49+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
50+
11:44:28.557 detox[8813] i --- STARTED "before each" hook: Before for "App started" ---
51+
11:44:28.583 detox[8813] i I launch app
52+
11:44:30.037 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
53+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
54+
11:44:30.043 detox[8813] i I wait for element visible "#hello_button", 15
55+
11:44:31.253 detox[8813] i --- ENDED "before each" hook: Before for "App started" ---
56+
11:44:31.273 detox[8813] i I see "Welcome"
57+
11:44:31.289 detox[8813] i ✔ OK in 25ms
58+
11:44:31.289 detox[8813] i
59+
11:44:31.301 detox[8813] i Get platform
60+
11:44:34.736 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
61+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
62+
11:44:40.582 detox[8813] i --- STARTED "before each" hook: Before for "Get platform" ---
63+
11:44:40.588 detox[8813] i I launch app
64+
11:44:42.271 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
65+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
66+
11:44:42.274 detox[8813] i I wait for element visible "#hello_button", 15
67+
11:44:43.126 detox[8813] i --- ENDED "before each" hook: Before for "Get platform" ---
68+
11:44:43.150 detox[8813] i I grab platform
69+
11:44:43.152 detox[8813] i I expect ""ios"" to equal ""ios""
70+
11:44:43.158 detox[8813] i ✔ OK in 31ms
71+
11:44:43.158 detox[8813] i
72+
11:44:43.166 detox[8813] i Show hello screen after tap
73+
11:44:46.251 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
74+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
75+
11:44:52.308 detox[8813] i --- STARTED "before each" hook: Before for "Show hello screen after tap" ---
76+
11:44:52.321 detox[8813] i I launch app
77+
11:47:22.243 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
78+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
79+
11:47:22.319 detox[8813] i I wait for element visible "#hello_button", 15
80+
11:47:23.637 detox[8813] i --- ENDED "before each" hook: Before for "Show hello screen after tap" ---
81+
11:47:23.668 detox[8813] i I dont see "Hello!!!"
82+
11:47:23.699 detox[8813] i I click "#hello_button"
83+
11:47:24.308 detox[8813] i I see "Hello!!!"
84+
11:47:24.323 detox[8813] i ✔ OK in 684ms
85+
11:47:24.323 detox[8813] i
86+
11:47:24.334 detox[8813] i Show world screen after tap
87+
11:47:27.298 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
88+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
89+
11:47:33.604 detox[8813] i --- STARTED "before each" hook: Before for "Show world screen after tap" ---
90+
11:47:33.608 detox[8813] i I launch app
91+
11:47:36.074 detox[8813] i com.wix.demo.react.native launched. To watch simulator logs, run:
92+
/usr/bin/xcrun simctl spawn F44382C2-F0BE-466A-9683-AA6B37591FBA log stream --level debug --style compact --predicate 'process == "example"'
93+
11:47:36.110 detox[8813] i I wait for element visible "#hello_button", 15
94+
11:47:36.450 detox[8813] i --- ENDED "before each" hook: Before for "Show world screen after tap" ---
95+
11:47:36.452 detox[8813] i I click "#world_button"
96+
11:47:37.314 detox[8813] i I see "World!!!"
97+
11:47:37.408 detox[8813] i ✔ OK in 935ms
98+
11:47:37.409 detox[8813] i
99+
11:47:37.468 detox[8813] i
100+
11:47:37.470 detox[8813] i OK | 4 passed // 7m
100101
```
101102

102103
CodeceptJS provides next features over standard Detox:
@@ -265,6 +266,7 @@ Options:
265266
- `reloadReactNative` - should be enabled for React Native applications.
266267
- `reuse` - reuse application for tests. By default, Detox reinstalls and relaunches app.
267268
- `registerGlobals` - (default: true) Register Detox helper functions `by`, `element`, `expect`, `waitFor` globally.
269+
- `url` - URL to open via deep-link each time the app is launched (android) or immediately afterwards (iOS). Useful for opening a bundle URL at the beginning of tests when working with Expo.
268270

269271
#### Parameters
270272

test/android/.DS_Store

2 KB
Binary file not shown.

0 commit comments

Comments
 (0)