Skip to content

Commit

Permalink
fix(android): swipe is not working correctly on API 33-34 (#4299)
Browse files Browse the repository at this point in the history
* Upgraded espresso version to 3.5.1 in order to fix the issue with swipe on android 33/34
  • Loading branch information
gosha212 authored Dec 19, 2023
1 parent 281536e commit 375d470
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
8 changes: 4 additions & 4 deletions detox/android/detox/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ dependencies {
// Versions are in-sync with the 'androidx-test-1.4.0' release/tag of the android-test github repo,
// used by the Detox generator. See https://github.com/android/android-test/releases/tag/androidx-test-1.4.0
// Important: Should remain so when generator tag is replaced!
api('androidx.test.espresso:espresso-core:3.4.0') {
api('androidx.test.espresso:espresso-core:3.5.1') {
because 'Needed all across Detox but also makes Espresso seamlessly provided to Detox users with hybrid apps/E2E-tests.'
}
api('androidx.test.espresso:espresso-web:3.4.0') {
api('androidx.test.espresso:espresso-web:3.5.1') {
because 'Web-View testing'
}
api('androidx.test.espresso:espresso-contrib:3.4.0') {
api('androidx.test.espresso:espresso-contrib:3.5.1') {
because 'Android datepicker support'
exclude group: "org.checkerframework", module: "checker"
}
Expand Down Expand Up @@ -150,7 +150,7 @@ dependencies {
testImplementation "org.jetbrains.kotlin:kotlin-test:$_kotlinVersion"
testImplementation 'org.apache.commons:commons-io:1.3.2'
testImplementation 'org.mockito.kotlin:mockito-kotlin:4.0.0'
testImplementation 'org.robolectric:robolectric:4.4'
testImplementation 'org.robolectric:robolectric:4.11.1'

testImplementation("com.google.android.material:material:$_materialMinVersion") {
because 'Material components are mentioned explicitly (e.g. Slider in get-attributes handler)'
Expand Down
3 changes: 3 additions & 0 deletions detox/android/detox/proguard-rules-app.pro
Original file line number Diff line number Diff line change
Expand Up @@ -19,3 +19,6 @@
-keep class kotlin.text.** { *; }
-keep class kotlin.io.** { *; }
-keep class okhttp3.** { *; }

-keep class androidx.concurrent.futures.CallbackToFutureAdapter$* { *; }
-keep class androidx.concurrent.futures.CallbackToFutureAdapter { *; }
Original file line number Diff line number Diff line change
Expand Up @@ -24,8 +24,9 @@ public class ViewAssertions {
* which is more suitable for Detox' separated interaction-matcher architecture.
* See {@link MatchesViewAssertion} for more details.
*/
@SuppressWarnings("unchecked")
public static ViewAssertion matches(final Matcher<? super View> viewMatcher) {
return new MatchesViewAssertion(checkNotNull(viewMatcher));
return new MatchesViewAssertion((Matcher<? super View>) checkNotNull(viewMatcher));
}

/**
Expand Down

0 comments on commit 375d470

Please sign in to comment.