- 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/
SQLite、Content provider 和 Shared Preference 之间的所有已知区别。 但我想知道什么时候需要根据情况使用 SQLite 或 Content Provider 或
警告:我正在使用一个我无法完全控制的后端,所以我正在努力解决 Backbone 中的一些注意事项,这些注意事项可能在其他地方更好地解决......不幸的是,我别无选择,只能在这里处理它们! 所以,我的
我一整天都在挣扎。我的预输入搜索表达式与远程 json 数据完美配合。但是当我尝试使用相同的 json 数据作为预取数据时,建议为空。点击第一个标志后,我收到预定义消息“无法找到任何内容...”,结果
我正在制作一个模拟 NHL 选秀彩票的程序,其中屏幕右侧应该有一个 JTextField,并且在左侧绘制弹跳的选秀球。我创建了一个名为 Ball 的类,它实现了 Runnable,并在我的主 Draf
这个问题已经有答案了: How can I calculate a time span in Java and format the output? (18 个回答) 已关闭 9 年前。 这是我的代码
我有一个 ASP.NET Web API 应用程序在我的本地 IIS 实例上运行。 Web 应用程序配置有 CORS。我调用的 Web API 方法类似于: [POST("/API/{foo}/{ba
我将用户输入的时间和日期作为: DatePicker dp = (DatePicker) findViewById(R.id.datePicker); TimePicker tp = (TimePic
放宽“邻居”的标准是否足够,或者是否有其他标准行动可以采取? 最佳答案 如果所有相邻解决方案都是 Tabu,则听起来您的 Tabu 列表的大小太长或您的释放策略太严格。一个好的 Tabu 列表长度是
我正在阅读来自 cppreference 的代码示例: #include #include #include #include template void print_queue(T& q)
我快疯了,我试图理解工具提示的行为,但没有成功。 1. 第一个问题是当我尝试通过插件(按钮 1)在点击事件中使用它时 -> 如果您转到 Fiddle,您会在“内容”内看到该函数' 每次点击都会调用该属
我在功能组件中有以下代码: const [ folder, setFolder ] = useState([]); const folderData = useContext(FolderContex
我在使用预签名网址和 AFNetworking 3.0 从 S3 获取图像时遇到问题。我可以使用 NSMutableURLRequest 和 NSURLSession 获取图像,但是当我使用 AFHT
我正在使用 Oracle ojdbc 12 和 Java 8 处理 Oracle UCP 管理器的问题。当 UCP 池启动失败时,我希望关闭它创建的连接。 当池初始化期间遇到 ORA-02391:超过
关闭。此题需要details or clarity 。目前不接受答案。 想要改进这个问题吗?通过 editing this post 添加详细信息并澄清问题. 已关闭 9 年前。 Improve
引用这个plunker: https://plnkr.co/edit/GWsbdDWVvBYNMqyxzlLY?p=preview 我在 styles.css 文件和 src/app.ts 文件中指定
为什么我的条形这么细?我尝试将宽度设置为 1,它们变得非常厚。我不知道还能尝试什么。默认厚度为 0.8,这是应该的样子吗? import matplotlib.pyplot as plt import
当我编写时,查询按预期执行: SELECT id, day2.count - day1.count AS diff FROM day1 NATURAL JOIN day2; 但我真正想要的是右连接。当
我有以下时间数据: 0 08/01/16 13:07:46,335437 1 18/02/16 08:40:40,565575 2 14/01/16 22:2
一些背景知识 -我的 NodeJS 服务器在端口 3001 上运行,我的 React 应用程序在端口 3000 上运行。我在 React 应用程序 package.json 中设置了一个代理来代理对端
我面临着一个愚蠢的问题。我试图在我的 Angular 应用程序中延迟加载我的图像,我已经尝试过这个2: 但是他们都设置了 src attr 而不是 data-src,我在这里遗漏了什么吗?保留 d
我是一名优秀的程序员,十分优秀!