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
Keep getting an error when a test fails running tests on Android: Error: Command failed: node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:ios:).)*$' --maxWorkers 1 "e2e"
#1979
Closed
1 task done
psatler opened this issue
Mar 27, 2020
· 2 comments
If all tests pass, this message does not appears, as shown at the following screenshot:
Below you can check the last part of what is shown in the terminal when a test fails:
Check device logs for full details!
13 |
14 | it("should have welcome screen", async () => {
> 15 | await expect(element(by.id("WelcomeScreen"))).toBeVisible()
| ^
16 | })
17 |
18 | // it("should go to next screen after tap", async () => {
at Client.execute (../node_modules/detox/src/client/Client.js:92:28)
at InvocationManager.execute (../node_modules/detox/src/invoke.js:11:39)
at MatcherAssertionInteraction.execute (../node_modules/detox/src/android/expect.js:128:35)
at ExpectElement.toBeVisible (../node_modules/detox/src/android/expect.js:275:112)
at _callee3$ (firstTest.spec.js:15:51)
at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
at Generator.invoke [as _invoke] (../node_modules/regenerator-runtime/runtime.js:271:22)
at Generator.prototype.<computed> [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at tryCatch (../node_modules/regenerator-runtime/runtime.js:45:40)
at invoke (../node_modules/regenerator-runtime/runtime.js:135:20)
at ../node_modules/regenerator-runtime/runtime.js:170:11
at callInvokeWithMethodAndArg (../node_modules/regenerator-runtime/runtime.js:169:16)
at AsyncIterator.enqueue (../node_modules/regenerator-runtime/runtime.js:192:13)
at AsyncIterator.prototype.<computed> [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at Object.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
detox[9947] INFO: at e2e/login-screen-tests/login-screen.spec.js:99:9
detox[9947] INFO: at e2e/login-screen-tests/login-screen.spec.js:100:9
detox[9947] INFO: [DetoxServer.js] server listening on localhost:36337...
PASS e2e/login-screen-tests/login-screen.spec.js (18.825s)
Test Suites: 1 failed, 1 passed, 2 total
Tests: 1 failed, 2 passed, 3 total
Snapshots: 0 total
Time: 36.553s
Ran all test suites matching /e2e/i with tests matching "^((?!:ios:).)*$".
detox[9939] ERROR: [cli.js] Error: Command failed: node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:ios:).)*$' --maxWorkers 1 "e2e"
You can also see the full report at the screenshot below (I zoomed out a bit to fit on the screen):
And below show the last pieces when running with detox test -c android.emu.debug --loglevel trace:
What could I be doing wrong? Can someone help me out figuring out what is the problem?
To Reproduce
I have tested this issue on the latest Detox release and it still reproduces
firstTest.spec.js The test suite with a failing test
{describe("Example",()=>{beforeEach(async()=>{awaitdevice.reloadReactNative()})it('should be visible the account number',async()=>{constusernameInput=awaitelement(by.id("loginScreen-accountNumber"))awaitexpect(usernameInput).toBeVisible()})// the failing test is belowit("should have welcome screen",async()=>{awaitexpect(element(by.id("WelcomeScreen"))).toBeVisible()})})}
Expected behavior
The expected behavior, I believe, is the test report to end without displaying an error.
We use the issue tracker exclusively for bug reports and feature requests. This issue appears to be a general usage or support question. Instead, please ask a question on Stack Overflow with the detox tag.
Feel free to post your Stack Overflow question here for more visibility. We'll take a look at it.
For issues with Expo apps, it is most likely not an issue with Detox itself, but with the Expo runtime or with incorrect Detox setup. For support on how to use Detox with Expo, you should contact the Expo team or the Expo community.
For more information on bots in this repository, read this discussion.
Description
When running tests on an Android simulator, if one of them fails, at the end of the test report it is shown an error message like the following:
If all tests pass, this message does not appears, as shown at the following screenshot:
Below you can check the last part of what is shown in the terminal when a test fails:
You can also see the full report at the screenshot below (I zoomed out a bit to fit on the screen):
And below show the last pieces when running with
detox test -c android.emu.debug --loglevel trace
:What could I be doing wrong? Can someone help me out figuring out what is the problem?
To Reproduce
I have tested this issue on the latest Detox release and it still reproduces
package.json
e2e folder below:
init.js
config.json
firstTest.spec.js
The test suite with a failing testExpected behavior
The expected behavior, I believe, is the test report to end without displaying an error.
Device Logs
adb_logs.log
Environment:
package.json
above)The text was updated successfully, but these errors were encountered: