問題タブ [detox]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
react-native - 要素が存在しない場合、要素が存在しないことを期待するタイムアウト
要素が存在しないことを確認しようとしています。しかし、私がするとき:
「エラー: 240000 ミリ秒のタイムアウトを超えました。非同期テストとフックの場合は、「done()」が呼び出されていることを確認してください。Promise を返す場合は、それが解決されていることを確認してください。」
デトックス: 5.10.0 ノード: 5.6.0 デバイス: iPhone 6s plus (エミュレーター) Xcode: 9.2 macOS: Sierra 10.12.6
デバイスと詳細なデトックス ログ
detox verb ws send: {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"Invocation", "value":{"target":{"type":"EarlGrey","value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation", "value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString", "value":"Saldo de conta-corrente"}]}}]}},"method":"atIndex:","args":[{"type":"NSInteger","value":0}]}},"method":"performAction:","args":[{"type":"Invocation","value":{"target":{"type": "Class","value":"GREYActions"},"method":"actionForTap","args":[]}}]},"messageId":10}
デトックス動詞 ws onMessage: {"type":"invokeResult ","messageId":10,"params":{"result":"(GREYElementInteraction)"}}
デトックス動詞 wsactionForTap","args":[]}}]},"messageId":10} detox verb ws onMessage: {"type":"invokeResult","messageId":10,"params":{"result":" (GREYElementInteraction)"}}デトックス動詞 wsactionForTap","args":[]}}]},"messageId":10} detox verb ws onMessage: {"type":"invokeResult","messageId":10,"params":{"result":" (GREYElementInteraction)"}}デトックス動詞 ws
detox verb ws send: {"type":"invoke","params":{"target":{"type":"Invocation","value":{"target":{"type":"Class", "value":"GREYCondition"},"method":"detoxConditionForNotElementMatched:","args":[{"type":"Invocation","value":{"target":{"type":"EarlGrey", "value":"instance"},"method":"detox_selectElementWithMatcher:","args":[{"type":"Invocation","value":{"target":{"type":"Class", "value":"GREYMatchers"},"method":"detoxMatcherForBoth:and:","args":[{"type":"呼び出し","value":{"target":{"type":"Class","value":"GREYMatchers"},"method":"detox_matcherForAccessibilityLabel:","args":[{"type":"NSString", "value":"Erro"}]}},{"type":"Invocation","value":{"target":{"type":"Class","value":"GREYMatchers"},"method ":"matcherForNotNil","args":[]}}]}}]}}]}},"メソッド":"waitWithTimeout:","args":[{"type":"CGFloat","value" :0.8}]}、"メッセージ ID":11}"args":[{"type":"NSString","value":"Erro"}]}},{"type":"Invocation","value":{"target":{"type":" Class","value":"GREYMatchers"},"method":"matcherForNotNil","args":[]}}]}}]}}]}},"メソッド":"waitWithTimeout:","args" :[{"type":"CGFloat","value":0.8}]},"messageId":11}"args":[{"type":"NSString","value":"Erro"}]}},{"type":"Invocation","value":{"target":{"type":" Class","value":"GREYMatchers"},"method":"matcherForNotNil","args":[]}}]}}]}}]}},"メソッド":"waitWithTimeout:","args" :[{"type":"CGFloat","value":0.8}]},"messageId":11}","args":[{"type":"CGFloat","value":0.8}]},"messageId":11}","args":[{"type":"CGFloat","value":0.8}]},"messageId":11}
1) サルド コンタ コレンテdetox verb ws send: {"type":"cleanup","params":{"stopRunner":false},"messageId":12}
detox verb ws onMessage: {"type":"cleanupDone","messageId": 12,"params":{}}
デトックス動詞 ws0 合格 (4m)
1 不合格Consultas Saldo conta corrente:
エラー: 240000 ミリ秒のタイムアウトを超えました。非同期テストとフックの場合は、「done()」が呼び出されていることを確認してください。Promise を返す場合は、それが解決されることを確認してください。
react-native - React-native detox でアクセス許可をオーバーレイする
React-native android でデトックスを使用しています。Android でアプリのオーバーレイ権限を許可する方法を知っておくと役立ちます。
jestjs - Detox で Jest globalSetup を使用する方法
Detox で Jestを使用globalSetup
しglobalTeardown
て、detox のセットアップが 1 回だけ行われるようにしたいのですが、init が beforeAll でない場合、Detox は失敗するようです。
助言がありますか?
Jest バージョン:22.0.4 デトックス バージョン:6.0.4
構成:
react-native - Android用React Nativeでdetox + Jestを使用すると、「ReferenceError:デバイスが定義されていません」
アプリは、Android と iOS の両方のシミュレーターで正常に動作しています。反応ネイティブアプリをエンドツーエンドでテストするために、Jest で Detox をセットアップしようとしています。シミュレーターでいくつかの動きを見ることができますが、アプリが起動せず、次のエラーが発生します(「デバイスが定義されていません」以外に、「app-debug-androidTest.apk: No such file or directory」エラーも発生するため、何がわからないここに根本的な原因があります)。
コンソール
firstTest.spec.js:
パッケージ.json
init.js