Detox: Headless hardware keyboard default not working
Describe the bug
When running in headless mode with parameter:
ConnectHardwareKeyboard boolean NO
It behaves like if the connect hardware keyboard was at true.
To Reproduce
- I have tested this issue on the latest Detox release and it still reproduces
Provide the steps necessary to reproduce the issue. If you are seeing a regression, try to provide the last known version where the issue did not reproduce.
- Create a test that will fail if connect hardware keyboard was at true. (Usually implies typing in an input)
- Run in headless should fail.
- Open Simulator.app and should pass.
Expected behavior Headless should behave the same when simulator.app is open
Environment (please complete the following information):
- Detox: 12.6.1
- React Native: 59.6
- Node: 10.4.1
- Device: Iphone7
- Xcode: 10.1
- iOS: 12.1
- macOS: 10.13.6
Device and Verbose Detox Logs
visual.release --artifacts-location packages/detox/visual/tmp/ --loglevel verbose
detox[18247] INFO: [test.js] configuration="ios.visual.release" loglevel="verbose" artifactsLocation="packages/detox/visual/tmp/" recordLogs="none" takeScreenshots="manual" recordVideos="none" recordPerformance="none" node_modules/.bin/jest --config=packages/detox/config.json --maxWorkers=1 '--testNamePattern=^((?!:android:).)*$' packages/detox/visual
detox[18248] INFO: [DetoxServer.js] server listening on localhost:50132...
detox[18248] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:50132
detox[18248] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=5de147f8-df87-0e58-c7b3-e24446a2aebe
detox[18248] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=5de147f8-df87-0e58-c7b3-e24446a2aebe
detox[18248] DEBUG: [exec.js/EXEC_CMD, #0] /usr/bin/xcrun simctl list -j
detox[18248] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byType "iPhone 7" --byOS "12.1"
detox[18248] DEBUG: [exec.js/EXEC_TRY, #1] Searching for device matching iPhone 7...
detox[18248] DEBUG: [exec.js/EXEC_CMD, #2] applesimutils --list --byId "B7ECB144-869C-43D1-BAF9-2D23D358D7F4"
detox[18248] DEBUG: [exec.js/EXEC_CMD, #3] xcodebuild -version
detox[18248] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl boot B7ECB144-869C-43D1-BAF9-2D23D358D7F4
detox[18248] DEBUG: [exec.js/EXEC_TRY, #4] Booting device B7ECB144-869C-43D1-BAF9-2D23D358D7F4
detox[18248] DEBUG: [exec.js/EXEC_CMD, #5] /usr/bin/xcrun simctl bootstatus B7ECB144-869C-43D1-BAF9-2D23D358D7F4
detox[18248] DEBUG: [exec.js/EXEC_CMD, #6] /usr/bin/xcrun simctl uninstall B7ECB144-869C-43D1-BAF9-2D23D358D7F4 org.reactjs.native.example.storybook
detox[18248] DEBUG: [exec.js/EXEC_TRY, #6] Uninstalling org.reactjs.native.example.storybook...
detox[18248] DEBUG: [exec.js/EXEC_SUCCESS, #6] org.reactjs.native.example.storybook uninstalled
detox[18248] DEBUG: [exec.js/EXEC_CMD, #7] /usr/bin/xcrun simctl install B7ECB144-869C-43D1-BAF9-2D23D358D7F4 "/Users/wlauze/github.com/jive/gotoconnect-mobile/packages/storybook/ios/build/Build/Products/Release-iphonesimulator/storybook.app"
detox[18248] DEBUG: [exec.js/EXEC_TRY, #7] Installing /Users/wlauze/github.com/jive/gotoconnect-mobile/packages/storybook/ios/build/Build/Products/Release-iphonesimulator/storybook.app...
detox[18248] DEBUG: [exec.js/EXEC_SUCCESS, #7] /Users/wlauze/github.com/jive/gotoconnect-mobile/packages/storybook/ios/build/Build/Products/Release-iphonesimulator/storybook.app installed
detox[18248] DEBUG: [exec.js/EXEC_CMD, #8] /usr/bin/xcrun simctl terminate B7ECB144-869C-43D1-BAF9-2D23D358D7F4 org.reactjs.native.example.storybook
detox[18248] DEBUG: [exec.js/EXEC_TRY, #8] Terminating org.reactjs.native.example.storybook...
detox[18248] DEBUG: [exec.js/EXEC_SUCCESS, #8] org.reactjs.native.example.storybook terminated
detox[18248] DEBUG: [exec.js/EXEC_CMD, #9] /bin/cat /dev/null >/Users/wlauze/Library/Developer/CoreSimulator/Devices/B7ECB144-869C-43D1-BAF9-2D23D358D7F4/data/tmp/detox.last_launch_app_log.out 2>/Users/wlauze/Library/Developer/CoreSimulator/Devices/B7ECB144-869C-43D1-BAF9-2D23D358D7F4/data/tmp/detox.last_launch_app_log.err && SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/wlauze/Library/Detox/ios/9038d6671ae06ed92ef33be8da6ef6e58588757b/Detox.framework/Detox" /usr/bin/xcrun simctl launch --stdout=/tmp/detox.last_launch_app_log.out --stderr=/tmp/detox.last_launch_app_log.err B7ECB144-869C-43D1-BAF9-2D23D358D7F4 org.reactjs.native.example.storybook --args -detoxServer "ws://localhost:50132" -detoxSessionId "5de147f8-df87-0e58-c7b3-e24446a2aebe"
detox[18248] DEBUG: [exec.js/EXEC_TRY, #9] Launching org.reactjs.native.example.storybook...
detox[18248] INFO: [AppleSimUtils.js] org.reactjs.native.example.storybook launched. The stdout and stderr logs were recreated, you can watch them with:
tail -F /Users/wlauze/Library/Developer/CoreSimulator/Devices/B7ECB144-869C-43D1-BAF9-2D23D358D7F4/data/tmp/detox.last_launch_app_log.{out,err}
detox[18248] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=5de147f8-df87-0e58-c7b3-e24446a2aebe)
detox[18248] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=5de147f8-df87-0e58-c7b3-e24446a2aebe
detox[18248] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=5de147f8-df87-0e58-c7b3-e24446a2aebe
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Reactions: 2
- Comments: 45 (22 by maintainers)
@vmurillo yea, not that I can tell. I did not make any changes that were specific to package.json, any detox config or config.yml (for CircleCI) that I’m aware of that would’ve made this work.
I’m looking back at my failed CircleCI builds and as you see above, it was regarding another issue - not the keyboard. I was having keyboard issues locally and then seeing failed builds on the server and wrongfully assuming they were keyboard related.
With https://github.com/wix/Detox/pull/1480 this will be solved, hopefully. I will merge it now and release a version.
So the
tap
really is required first? If so, that should be documented better because on the home page of the docs, it suggests you can just dotypeText
without thetap
in front of it to make sure the keyboard pops up.All this being said, I put together a video showing our scenario and what’s going on. Let me know your thoughts.