Skip to content

Commit

Permalink
Androidx.test core 1.5.0 (#4046)
Browse files Browse the repository at this point in the history
  • Loading branch information
d4vidi authored May 9, 2023
1 parent 6357fbe commit 1182967
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 7 deletions.
6 changes: 3 additions & 3 deletions detox/android/detox/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ dependencies {
api('org.hamcrest:hamcrest:2.2') {
because 'See https://github.com/wix/Detox/issues/3920. Need to force hamcrest 2.2 win in battle of 2.2 vs. 1.3 (specified by Espresso).'
}
api('androidx.test:rules:1.4.0') {
api('androidx.test:rules:1.5.0') {
because 'of ActivityTestRule. Needed by users *and* internally used by Detox.'
}
api('androidx.test.ext:junit:1.1.3') {
api('androidx.test.ext:junit:1.1.5') {
because 'Needed so as to seamlessly provide AndroidJUnit4 to Detox users. Depends on junit core.'
}

Expand Down Expand Up @@ -136,7 +136,7 @@ dependencies {
testImplementation 'org.json:json:20140107'

// https://github.com/spekframework/spek/issues/232#issuecomment-610732158
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.6.0'
testRuntimeOnly 'org.junit.vintage:junit-vintage-engine:5.7.2'

testImplementation 'org.assertj:assertj-core:3.16.1'
testImplementation "org.jetbrains.kotlin:kotlin-test:$_kotlinVersion"
Expand Down
2 changes: 2 additions & 0 deletions detox/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,8 @@
"build:android-native": "cd android && ./gradlew publish -Dversion=999.999.999 -DbuildFlavour=coreNative -DforceLocal=true && cd ..",
"lint": "eslint .",
"unit": "jest --coverage --verbose",
"unit:android-debug": "cd android && ./gradlew testFullDebug",
"unit:android-release": "cd android && ./gradlew testFullRelease",
"pretest": "npm run lint",
"test": "npm run unit",
"posttest": "cp coverage/lcov.info coverage/unit.lcov",
Expand Down
5 changes: 2 additions & 3 deletions detox/test/e2e/19.crash-handling.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,8 +56,7 @@ describe('Crash Handling', () => {
// It's important that the native-error message (containing the native stack-trace) would also
// be included in the error's stack property, in order for Jest (specifically) to properly output all
// of that into the shell, as we expect it to.
jestExpect(error.stack).toContain('Native stacktrace dump:\njava.lang.RuntimeException:');
jestExpect(error.stack).toContain('\tat android.app');
jestExpect(error.stack).toContain('Caused by: java.lang.IllegalStateException: This is an intentional crash!');
jestExpect(error.stack).toContain('Native stacktrace dump:\njava.lang.IllegalStateException: This is an intentional crash!');
jestExpect(error.stack).toContain('\tat com.example.CrashingActivity.onResume');
}, 60000);
});
2 changes: 1 addition & 1 deletion scripts/ci.android.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ popd

if [[ $currentRnVersion -ge 66 ]]; then
pushd detox/android
run_f "./gradlew testFullRelease"
run_f "npm run unit:android-release"
popd
else
echo "Skipping Android unit tests (react-native version ${currentRnVersion} is not ≥66)"
Expand Down

0 comments on commit 1182967

Please sign in to comment.