Merge branch 'master' into test_failure_screenshot

This commit is contained in:
2023-06-25 22:41:06 +01:00
3 changed files with 8 additions and 0 deletions

View File

@@ -64,6 +64,7 @@ jobs:
post-emulator-launch-assemble-command: ./gradlew assemble<< parameters.flavour >>DebugAndroidTest post-emulator-launch-assemble-command: ./gradlew assemble<< parameters.flavour >>DebugAndroidTest
test-command: ./gradlew connected<< parameters.flavour >>DebugAndroidTest test-command: ./gradlew connected<< parameters.flavour >>DebugAndroidTest
system-image: system-images;android-25;google_apis;x86 system-image: system-images;android-25;google_apis;x86
max-tries: 1
# store test reports # store test reports
- store_artifacts: - store_artifacts:
path: app/build/reports/androidTests/connected path: app/build/reports/androidTests/connected

View File

@@ -5,6 +5,7 @@ import android.Manifest.permission.WRITE_EXTERNAL_STORAGE
import android.R import android.R
import android.app.Activity import android.app.Activity
import android.content.Context import android.content.Context
import android.os.Build
import android.view.View import android.view.View
import android.view.WindowManager import android.view.WindowManager
import androidx.annotation.StringRes import androidx.annotation.StringRes
@@ -111,6 +112,9 @@ open class BaseUiTest<T : BaseActivity<*, *>>(
} }
} }
).check(matches(isDisplayed())) ).check(matches(isDisplayed()))
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.R) {
waitFor(3500)
}
} }
fun checkSnackBarDisplayedByMessage(message: String) { fun checkSnackBarDisplayedByMessage(message: String) {

View File

@@ -4,6 +4,7 @@ import android.content.Intent
import android.os.Build import android.os.Build
import android.os.Bundle import android.os.Bundle
import android.view.View import android.view.View
import android.view.View.OnAttachStateChangeListener
import android.view.ViewGroup.LayoutParams import android.view.ViewGroup.LayoutParams
import android.view.ViewGroup.LayoutParams.MATCH_PARENT import android.view.ViewGroup.LayoutParams.MATCH_PARENT
import android.view.ViewGroup.inflate import android.view.ViewGroup.inflate
@@ -160,6 +161,8 @@ abstract class BaseActivity<V : BaseViewModel, VB : ViewBinding> : AppCompatActi
mIdlingResource?.setIdleState(false) mIdlingResource?.setIdleState(false)
} }
}) })
} else {
} }
toast.show() toast.show()
} }