- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
问题描述:
尝试为 Expo Ejected App 运行排毒测试时,detox build
成功,但尝试运行 detox test
面临以下错误
DetoxRuntimeError:Detox instance has not been initialized
expo init
创建一个新项目expo eject
带有 ExpoKit 选项 yarn
&& cd ios && pod install
expo start -c
detox build
和 detox test
╰─ detox test -l trace -d --debug-synchronization
detox[90083] INFO: [test.js] configuration="ios.sim.Debug" loglevel="trace" debugSynchronization=3000 reportSpecs=true DETOX_START_TIMESTAMP=1583325845491 node_modules/.bin/jest --config e2e/config.json '--testNamePattern=^((?!:android:).)*$' --maxWorkers 1 "e2e"
detox[90084] TRACE: [Detox.js/DETOX_CREATE] created a Detox instance with config:
{"deviceConfig":{"binaryPath":"ios/build/Build/Products/Debug-iphonesimulator/example.app","build":"xcodebuild -workspace ios/example.xcworkspace -scheme example -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build","type":"ios.simulator","device":"iPhone 11 Pro"},"artifactsConfig":{"rootDir":"artifacts/ios.sim.Debug.2020-03-04 12-44-05Z","plugins":{"log":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"screenshot":{"enabled":true,"shouldTakeAutomaticSnapshots":false,"keepOnlyFailedTestsArtifacts":false},"video":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"instruments":{"enabled":false,"keepOnlyFailedTestsArtifacts":false},"timeline":{"enabled":false}},"pathBuilder":{"_rootDir":"artifacts/ios.sim.Debug.2020-03-04 12-44-05Z"}}}
detox[90084] INFO: [DetoxServer.js] server listening on localhost:61975...
detox[90084] DEBUG: [AsyncWebSocket.js/WEBSOCKET_OPEN] opened web socket to: ws://localhost:61975
detox[90084] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"login","params":{"sessionId":"e6cf1f34-7237-a519-6ccc-2b7996db8f0b","role":"tester"},"messageId":0}
detox[90084] DEBUG: [DetoxServer.js/LOGIN] role=tester, sessionId=e6cf1f34-7237-a519-6ccc-2b7996db8f0b
detox[90084] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=tester, sessionId=e6cf1f34-7237-a519-6ccc-2b7996db8f0b
detox[90084] TRACE: [AsyncWebSocket.js/WEBSOCKET_MESSAGE] {"type":"loginSuccess","params":{"sessionId":"e6cf1f34-7237-a519-6ccc-2b7996db8f0b","role":"tester"},"messageId":0}
detox[90084] DEBUG: [exec.js/EXEC_CMD, #0] applesimutils --list --byType "iPhone 11 Pro"
detox[90084] TRACE: [exec.js/EXEC_SUCCESS, #0] [
{
"deviceType" : {
"name" : "iPhone 11 Pro",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 11 Pro.simdevicetype",
"identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro"
},
"state" : "Booted",
"isAvailable" : true,
"name" : "iPhone 11 Pro",
"udid" : "9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269",
"os" : {
"buildversion" : "17C45",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime",
"isAvailable" : true,
"name" : "iOS 13.3",
"identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-13-3",
"version" : "13.3"
}
}
]
detox[90084] DEBUG: [exec.js/EXEC_CMD, #1] applesimutils --list --byId 9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269 --maxResults 1
detox[90084] TRACE: [exec.js/EXEC_SUCCESS, #1] [
{
"deviceType" : {
"name" : "iPhone 11 Pro",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/DeviceTypes\/iPhone 11 Pro.simdevicetype",
"identifier" : "com.apple.CoreSimulator.SimDeviceType.iPhone-11-Pro"
},
"state" : "Booted",
"isAvailable" : true,
"name" : "iPhone 11 Pro",
"udid" : "9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269",
"os" : {
"buildversion" : "17C45",
"bundlePath" : "\/Applications\/Xcode.app\/Contents\/Developer\/Platforms\/iPhoneOS.platform\/Library\/Developer\/CoreSimulator\/Profiles\/Runtimes\/iOS.simruntime",
"isAvailable" : true,
"name" : "iOS 13.3",
"identifier" : "com.apple.CoreSimulator.SimRuntime.iOS-13-3",
"version" : "13.3"
}
}
]
detox[90084] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBootDevice({ coldBoot: false,
deviceId: '9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269',
type: 'iPhone 11 Pro' })
detox[90084] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeUninstallApp({ deviceId: '9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269',
bundleId: 'org.reactjs.native.example.example' })
detox[90084] DEBUG: [exec.js/EXEC_CMD, #2] /usr/bin/xcrun simctl uninstall 9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269 org.reactjs.native.example.example
detox[90084] DEBUG: [exec.js/EXEC_TRY, #2] Uninstalling org.reactjs.native.example.example...
detox[90084] TRACE: [exec.js/EXEC_SUCCESS, #2]
detox[90084] DEBUG: [exec.js/EXEC_SUCCESS, #2] org.reactjs.native.example.example uninstalled
detox[90084] DEBUG: [exec.js/EXEC_CMD, #3] /usr/bin/xcrun simctl install 9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269 "/Users/vayu/testReactNative/testExpo/example/ios/build/Build/Products/Debug-iphonesimulator/example.app"
detox[90084] DEBUG: [exec.js/EXEC_TRY, #3] Installing /Users/vayu/testReactNative/testExpo/example/ios/build/Build/Products/Debug-iphonesimulator/example.app...
detox[90084] TRACE: [exec.js/EXEC_SUCCESS, #3]
detox[90084] DEBUG: [exec.js/EXEC_SUCCESS, #3] /Users/vayu/testReactNative/testExpo/example/ios/build/Build/Products/Debug-iphonesimulator/example.app installed
detox[90084] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeTerminateApp({ deviceId: '9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269',
bundleId: 'org.reactjs.native.example.example' })
detox[90084] DEBUG: [exec.js/EXEC_CMD, #4] /usr/bin/xcrun simctl terminate 9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269 org.reactjs.native.example.example
detox[90084] DEBUG: [exec.js/EXEC_TRY, #4] Terminating org.reactjs.native.example.example...
detox[90084] TRACE: [exec.js/EXEC_SUCCESS, #4]
detox[90084] DEBUG: [exec.js/EXEC_SUCCESS, #4] org.reactjs.native.example.example terminated
detox[90084] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onTerminateApp({ deviceId: '9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269',
bundleId: 'org.reactjs.native.example.example' })
detox[90084] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onBeforeLaunchApp({ bundleId: 'org.reactjs.native.example.example',
deviceId: '9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269',
launchArgs:
{ detoxServer: 'ws://localhost:61975',
detoxSessionId: 'e6cf1f34-7237-a519-6ccc-2b7996db8f0b' } })
detox[90084] DEBUG: [exec.js/EXEC_CMD, #5] SIMCTL_CHILD_DYLD_INSERT_LIBRARIES="/Users/vayu/Library/Detox/ios/48f56fb4523932cb5da30a7799afef21908baa16/Detox.framework/Detox" /usr/bin/xcrun simctl launch 9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269 org.reactjs.native.example.example --args -detoxServer "ws://localhost:61975" -detoxSessionId "e6cf1f34-7237-a519-6ccc-2b7996db8f0b"
detox[90084] DEBUG: [exec.js/EXEC_TRY, #5] Launching org.reactjs.native.example.example...
detox[90084] TRACE: [exec.js/EXEC_SUCCESS, #5] org.reactjs.native.example.example: 90123
detox[90084] DEBUG: [exec.js/EXEC_CMD, #6] /usr/bin/xcrun simctl get_app_container 9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269 org.reactjs.native.example.example
detox[90084] TRACE: [exec.js/EXEC_SUCCESS, #6] /Users/vayu/Library/Developer/CoreSimulator/Devices/9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269/data/Containers/Bundle/Application/8641A39F-B558-4183-96C4-0F6C587827DF/example.app
detox[90084] INFO: [AppleSimUtils.js] org.reactjs.native.example.example launched. To watch simulator logs, run:
/usr/bin/xcrun simctl spawn 9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269 log stream --level debug --style compact --predicate 'process == example'
detox[90123] TRACE: [ArtifactsManager.js/LIFECYCLE] artifactsManager.onLaunchApp({ bundleId: 'org.reactjs.native.example.example',
deviceId: '9FD7C5EA-F3B7-4E26-A79E-0A848ADE1269',
launchArgs:
{ detoxServer: 'ws://localhost:61975',
detoxSessionId: 'e6cf1f34-7237-a519-6ccc-2b7996db8f0b' },
pid: 90123 })
detox[90084] TRACE: [AsyncWebSocket.js/WEBSOCKET_SEND] {"type":"isReady","params":{},"messageId":-1000}
detox[90084] TRACE: [DetoxServer.js/MESSAGE] role=tester action=isReady (sessionId=e6cf1f34-7237-a519-6ccc-2b7996db8f0b)
detox[90084] DEBUG: [DetoxServer.js/CANNOT_FORWARD] role=testee not connected, cannot fw action (sessionId=e6cf1f34-7237-a519-6ccc-2b7996db8f0b)
detox[90084] DEBUG: [DetoxServer.js/LOGIN] role=testee, sessionId=e6cf1f34-7237-a519-6ccc-2b7996db8f0b
detox[90084] DEBUG: [DetoxServer.js/LOGIN_SUCCESS] role=testee, sessionId=e6cf1f34-7237-a519-6ccc-2b7996db8f0b
Example: should have welcome screen
Example: should have welcome screen [FAIL]
Example: should show hello screen after tap
Example: should show hello screen after tap [FAIL]
Example: should show world screen after tap
Example: should show world screen after tap [FAIL]
FAIL e2e/firstTest.spec.js (300.742s)
Example
✕ should have welcome screen (6ms)
✕ should show hello screen after tap (2ms)
✕ should show world screen after tap (1ms)
● Example › should have welcome screen
Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.
at mapper (../node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Example › should have welcome screen
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at MissingDetox._defineRequiredProperty (../node_modules/detox/src/utils/MissingDetox.js:8:71)
at DetoxExportWrapper.(anonymous function).args [as beforeEach] (../node_modules/detox/src/DetoxExportWrapper.js:53:32)
at DetoxAdapterImpl.beforeEach (../node_modules/detox/runners/jest/DetoxAdapterImpl.js:17:22)
● Example › should have welcome screen
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
1 | describe('Example', () => {
2 | beforeEach(async () => {
> 3 | await device.reloadReactNative();
| ^
4 | });
5 |
6 | it('should have welcome screen', async () => {
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at device (../node_modules/detox/src/utils/MissingDetox.js:46:16)
at _callee$ (firstTest.spec.js:3:11)
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.(anonymous function) [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.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
at Object._callee (firstTest.spec.js:2:14)
● Example › should have welcome screen
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
5 |
6 | it('should have welcome screen', async () => {
> 7 | await expect(element(by.id('welcome'))).toBeVisible();
| ^
8 | });
9 |
10 | it('should show hello screen after tap', async () => {
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at by (../node_modules/detox/src/utils/MissingDetox.js:46:16)
at _callee2$ (firstTest.spec.js:7:26)
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.(anonymous function) [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.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
at Object._callee2 (firstTest.spec.js:6:36)
● Example › should show hello screen after tap
Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.
at mapper (../node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Example › should show hello screen after tap
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at MissingDetox._defineRequiredProperty (../node_modules/detox/src/utils/MissingDetox.js:8:71)
at DetoxExportWrapper.(anonymous function).args [as beforeEach] (../node_modules/detox/src/DetoxExportWrapper.js:53:32)
at DetoxAdapterImpl.beforeEach (../node_modules/detox/runners/jest/DetoxAdapterImpl.js:17:22)
● Example › should show hello screen after tap
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
1 | describe('Example', () => {
2 | beforeEach(async () => {
> 3 | await device.reloadReactNative();
| ^
4 | });
5 |
6 | it('should have welcome screen', async () => {
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at device (../node_modules/detox/src/utils/MissingDetox.js:46:16)
at _callee$ (firstTest.spec.js:3:11)
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.(anonymous function) [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.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
at Object._callee (firstTest.spec.js:2:14)
● Example › should show hello screen after tap
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
9 |
10 | it('should show hello screen after tap', async () => {
> 11 | await element(by.id('hello_button')).tap();
| ^
12 | await expect(element(by.text('Hello!!!'))).toBeVisible();
13 | });
14 |
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at by (../node_modules/detox/src/utils/MissingDetox.js:46:16)
at _callee3$ (firstTest.spec.js:11:19)
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.(anonymous function) [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.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
at Object._callee3 (firstTest.spec.js:10:44)
● Example › should show world screen after tap
Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.Error: Timeout - Async callback was not invoked within the 300000ms timeout specified by jest.setTimeout.
at mapper (../node_modules/jest-jasmine2/build/queueRunner.js:25:45)
● Example › should show world screen after tap
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at MissingDetox._defineRequiredProperty (../node_modules/detox/src/utils/MissingDetox.js:8:71)
at DetoxExportWrapper.(anonymous function).args [as beforeEach] (../node_modules/detox/src/DetoxExportWrapper.js:53:32)
at DetoxAdapterImpl.beforeEach (../node_modules/detox/runners/jest/DetoxAdapterImpl.js:17:22)
● Example › should show world screen after tap
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
1 | describe('Example', () => {
2 | beforeEach(async () => {
> 3 | await device.reloadReactNative();
| ^
4 | });
5 |
6 | it('should have welcome screen', async () => {
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at device (../node_modules/detox/src/utils/MissingDetox.js:46:16)
at _callee$ (firstTest.spec.js:3:11)
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.(anonymous function) [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.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
at Object._callee (firstTest.spec.js:2:14)
● Example › should show world screen after tap
DetoxRuntimeError: Detox instance has not been initialized
HINT: Make sure to call detox.init() before your test begins
14 |
15 | it('should show world screen after tap', async () => {
> 16 | await element(by.id('world_button')).tap();
| ^
17 | await expect(element(by.text('World!!!'))).toBeVisible();
18 | });
19 | });
at MissingDetox.throwError (../node_modules/detox/src/utils/MissingDetox.js:67:11)
at by (../node_modules/detox/src/utils/MissingDetox.js:46:16)
at _callee4$ (firstTest.spec.js:16:19)
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.(anonymous function) [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.(anonymous function) [as next] (../node_modules/regenerator-runtime/runtime.js:97:21)
at Object.<anonymous>.exports.async (../node_modules/regenerator-runtime/runtime.js:216:14)
at Object._callee4 (firstTest.spec.js:15:44)
Jest did not exit one second after the test run has completed.
This usually means that there are asynchronous operations that weren't stopped in your tests. Consider running Jest with `--detectOpenHandles` to troubleshoot this issue.
const config = require('../package.json').detox;
const adapter = require('detox/runners/jest/adapter');
const specReporter = require('detox/runners/jest/specReporter');
// Set the default timeout
jest.setTimeout(120000);
jasmine.getEnv().addReporter(adapter);
// This takes care of generating status logs on a per-spec basis. By default, jest only reports at file-level.
// This is strictly optional.
jasmine.getEnv().addReporter(specReporter);
beforeAll(async () => {
await detox.init(config);
}, 300000);
beforeEach(async () => {
await adapter.beforeEach();
});
afterAll(async () => {
await adapter.afterAll();
await detox.cleanup();
}):
最佳答案
注意:我使用 'mocha' 作为运行者 & 使用版本 detox: "^15.4.2", mocha: "^7.1.0"
有这个错误,对我来说,原因是我试图在 it() 函数之外控制台注销元素的文本以进行比较。
it('should have Text: A', async () => {
await expect(element(by.text('A'))).toBeVisible();
});
>>>> console.log('ELE:: DATE::', element(by.id('TID-datefilter')));
it('should have Text: B', async () => {
await expect(element(by.text('B'))).toBeVisible();
});
关于ios - 排毒运行时错误 :Detox instance has not been initialized,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60538614/
好的,所以我想从批处理文件运行我的整个工作环境... 我想要实现什么...... 打开新的 powershell,打开我的 API 文件夹并从该文件夹运行 VS Code 编辑器(cd c:\xy;
我正在查看 Cocoa Controls 上的示例并下载了一些演示。我遇到的问题是一些例子,比如 BCTabBarController ,不会在我的设备上构建或启动。当我打开项目时,它看起来很正常,没
我刚刚开始学习 C 语言(擅长 Java 和 Python)。 当编写 C 程序(例如 hello world)时,我在 ubuntu cmd 行上使用 gcc hello.c -o hello 编译
我在 php 脚本从 cron 开始运行到超时后注意到了这个问题,但是当它从命令行手动运行时这不是问题。 (对于 CLI,PHP 默认的 max_execution_time 是 0) 所以我尝试运行
我可以使用命令行运行测试 > ./node_modules/.bin/wdio wdio.conf.js 但是如果我尝试从 IntelliJ 的运行/调试配置运行它,我会遇到各种不同的错误。 Fea
Error occurred during initialization of VM. Could not reserve enough space for object heap. Error: C
将 Anaconda 安装到 C:\ 后,我无法打开 jupyter 笔记本。无论是在带有 jupyter notebook 的 Anaconda Prompt 中还是在导航器中。我就是无法让它工作。
我遇到一个问题,如果我双击我的脚本 (.py),或者使用 IDLE 打开它,它将正确编译并运行。但是,如果我尝试在 Windows 命令行中运行脚本,请使用 C:\> "C:\Software_Dev
情况 我正在使用 mysql 数据库。查询从 phpmyadmin 和 postman 运行 但是当我从 android 发送请求时(它返回零行) 我已经记录了从 android 发送的电子邮件是正确
所以这个有点奇怪 - 为什么从 Java 运行 .exe 文件会给出不同的输出而不是直接运行 .exe。 当 java 在下面的行执行时,它会调用我构建的可与 3CX 电话系统配合使用的 .exe 文
这行代码 Environment.Is64BitProcess 当我的应用单独运行时评估为真。 但是当它在我的 Visual Studio 单元测试中运行时,相同的表达式的计算结果为 false。 我
关闭。这个问题是opinion-based .它目前不接受答案。 想要改进这个问题? 更新问题,以便 editing this post 可以用事实和引用来回答它. 关闭 8 年前。 Improve
我写了一个使用 libpq 连接到 PostgreSQL 数据库的演示。 我尝试通过包含将 C 文件连接到 PostgreSQL #include 在我将路径添加到系统变量 I:\Program F
如何从 Jenkins 运行 Android 模拟器来运行我的测试?当我在 Execiute Windows bath 命令中写入时,运行模拟器的命令: emulator -avd Tester 然后
我已经配置好东西,这样我就可以使用 ssl 登录和访问在 nginx 上运行的 errbit 我的问题是我不知道如何设置我的 Rails 应用程序的 errbit.rb 以便我可以运行测试 nginx
我编写了 flutter 应用程序,我通过 xcode 打开了 ios 部分并且应用程序正在运行,但是当我通过 flutter build ios 通过 vscode 运行应用程序时,我得到了这个错误
我有一个简短的 python 脚本,它使用日志记录模块和 configparser 模块。我在Win7下使用PyCharm 2.7.1和Python 3.3。 当我使用 PyCharm 运行我的脚本时
我在这里遇到了一些难题。 我的开发箱是 64 位的,windows 7。我所有的项目都编译为“任何 CPU”。该项目引用了 64 位版本的第 3 方软件 当我运行不使用任何 Web 引用的单元测试时,
当我注意到以下问题时,我正在做一些 C++ 练习。给定的代码将不会在 Visual Studio 2013 或 Qt Creator 5.4.1 中运行/编译 报错: invalid types 'd
假设我有一个 easteregg.py 文件: from airflow import DAG from dateutil import parser from datetime import tim
我是一名优秀的程序员,十分优秀!