detox

Detox tests are assigned to Undefined, and all e2e are skipped

痴心易碎 提交于 2021-01-28 05:45:43
问题 I installed jest and detox on a fresh react-native init project. Install jest and jest-circus as per detox docs Setup iOS build and test configuration Get the following error consistently on new builds my .detoxrc.json file: { "testRunner": "jest", "runnerConfig": "e2e/config.json", "configurations": { "ios": { "type": "ios.simulator", "build": "xcodebuild -workspace ios/rndetox.xcworkspace -scheme rndetox -configuration Debug -sdk iphonesimulator -derivedDataPath ios/build", "binaryPath":

detox jest tests are not running in parallel

ⅰ亾dé卋堺 提交于 2021-01-28 03:11:51
问题 Detox Automation with Jest Hi, I am running detox tests form the CLI with the below command. detox test -r --maxWorkers 2 to achieve parallel execution. Already one simulator started with name iphone 5s-Detox and with the maxWorkers 2 or --workers 2, one more simulator is launching but the tests are executing in only one simulator. I want to execute tests in parallel to save the execution time. Can anyone share concept of detox jest parallel execution. Is this same as testNG or it's different

detox jest tests are not running in parallel

安稳与你 提交于 2021-01-28 00:25:32
问题 Detox Automation with Jest Hi, I am running detox tests form the CLI with the below command. detox test -r --maxWorkers 2 to achieve parallel execution. Already one simulator started with name iphone 5s-Detox and with the maxWorkers 2 or --workers 2, one more simulator is launching but the tests are executing in only one simulator. I want to execute tests in parallel to save the execution time. Can anyone share concept of detox jest parallel execution. Is this same as testNG or it's different

How to handle pure native elements using detox

左心房为你撑大大i 提交于 2021-01-27 18:00:43
问题 I'm using detox but I need to handle my native login page using detox. 回答1: Detox supports native elements. In order to interact with them, you need to set an accessibilityIdentifier to the elements you want to interact with, and then the normal by.id() API will work as expected. 来源: https://stackoverflow.com/questions/59714311/how-to-handle-pure-native-elements-using-detox

Detox - How to check if an element is present without using expect

╄→尐↘猪︶ㄣ 提交于 2020-04-17 16:17:21
问题 Is there a way to check if an element is present without using expect with Detox? Right now I'm having to nest my logic in try/catch blocks to control the flow of a test to mitigate flakiness as it checks the state of a screen before moving forward with the test. I would much rather be able to do with using if/else. Thanks in advance for any suggestions. 回答1: Not the most elegant solution but I have used the following to stream line my code. In a helper file, I create functions that wrap the

Detox - How to check if an element is present without using expect

ぃ、小莉子 提交于 2020-04-17 16:11:31
问题 Is there a way to check if an element is present without using expect with Detox? Right now I'm having to nest my logic in try/catch blocks to control the flow of a test to mitigate flakiness as it checks the state of a screen before moving forward with the test. I would much rather be able to do with using if/else. Thanks in advance for any suggestions. 回答1: Not the most elegant solution but I have used the following to stream line my code. In a helper file, I create functions that wrap the

React Native Detox: Can't accept location permission from system alert pop up

你离开我真会死。 提交于 2020-02-02 02:10:06
问题 Launch app from command line using detox test --configuration ios.sim.debug Launch app in code via await device.launchApp({ permissions: { location: 'always', notifications: 'YES' } }) Go through login flow until app asks for location via react-native-permissions Permissions.request('location', { type: 'always' }) (with prior check to see if location permission check already set to'always' (in which case app doesn't ask) ) See system alert pop up asking to confirm location permission Detox

How to tap on Allow button on permission pop up

江枫思渺然 提交于 2020-01-29 08:41:32
问题 I am trying to click on the Allow button using Detox. I have tried the following: Detox: iOS Simulator how to confirm alert message I have also tried targeting the "Allow" button by element(by.label('Allow')).tap() and also by.text I do not want to set location permissions upon app launch. I would like to simulate a user allowing and not allowing location permissions. 回答1: In your init.js file you can allow the permissions: beforeAll(async () => { await detox.init(config, { launchApp: false }

How to tap on Allow button on permission pop up

青春壹個敷衍的年華 提交于 2020-01-29 08:40:08
问题 I am trying to click on the Allow button using Detox. I have tried the following: Detox: iOS Simulator how to confirm alert message I have also tried targeting the "Allow" button by element(by.label('Allow')).tap() and also by.text I do not want to set location permissions upon app launch. I would like to simulate a user allowing and not allowing location permissions. 回答1: In your init.js file you can allow the permissions: beforeAll(async () => { await detox.init(config, { launchApp: false }

Locate elements inside WebView

ε祈祈猫儿з 提交于 2020-01-16 17:01:27
问题 I'm trying to automate a test with detox. The app under test is implemented using react-native but we have a screen that renders a WebView that load an url. In this case, I cannot use the accessibilityLabel or testID in order to access the elements displayed inside the WebView. Anyone know if there is a way to locate elements inside a WebView with detox? 回答1: There is currently no way to do so https://github.com/wix/detox/issues/665 A work around could be done by using this but if running on