Fix flaky UI test (#253)
* Update Kotlin and KSP * Downgrade Kaspresso to last released * Update Compose compiler extension * Fix flaky UI test * Update AGP version * Fix flakySafely scope * Fix missing system image for UI tests * Use Intel MacOS to run UI tests * Revert "Fix missing system image for UI tests" This reverts commit 9003c37315f253835f3788ab2fecd402fa5522be. * Update test device API level to 34 * Use google-atd system image source * Update managed devices declaration syntax * Use device and syntax from now in android app * Try ubuntu agent for UI tests * Use an actual emulator instead of GMD * Use only one API level 30 * Remove Android SDK setup action * Setup Gradle before AVD * Use x86_64 architecture * Replace deprecated gradle setup action * Downgrade all dependencies again * Run only app android tests * Remove managed devices
This commit is contained in:
@@ -1,6 +1,5 @@
|
||||
@file:Suppress("UnstableApiUsage")
|
||||
|
||||
import com.android.build.api.dsl.ManagedVirtualDevice
|
||||
import java.io.FileInputStream
|
||||
import java.util.Properties
|
||||
|
||||
@@ -62,17 +61,6 @@ android {
|
||||
execution = "ANDROIDX_TEST_ORCHESTRATOR"
|
||||
}
|
||||
|
||||
testOptions {
|
||||
managedDevices {
|
||||
devices {
|
||||
maybeCreate<ManagedVirtualDevice>("pixel2api30").apply {
|
||||
device = "Pixel 2"
|
||||
apiLevel = 30
|
||||
systemImageSource = "aosp-atd"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
buildFeatures {
|
||||
buildConfig = true
|
||||
}
|
||||
|
||||
@@ -5,6 +5,7 @@ import gq.kirmanak.mealient.screen.AuthenticationScreen
|
||||
import gq.kirmanak.mealient.screen.BaseUrlScreen
|
||||
import gq.kirmanak.mealient.screen.DisclaimerScreen
|
||||
import gq.kirmanak.mealient.screen.RecipesListScreen
|
||||
import gq.kirmanak.mealient.ui.disclaimer.DisclaimerViewModel
|
||||
import io.github.kakaocup.compose.node.element.ComposeScreen.Companion.onComposeScreen
|
||||
import io.github.kakaocup.kakao.common.utilities.getResourceString
|
||||
import org.junit.Before
|
||||
@@ -59,7 +60,13 @@ class FirstSetUpTest : BaseTestCase() {
|
||||
}
|
||||
|
||||
okayButtonText {
|
||||
assertTextContains(getResourceString(R.string.fragment_disclaimer_button_okay))
|
||||
flakySafely(DisclaimerViewModel.FULL_COUNT_DOWN_SEC * 1_000L) {
|
||||
assertTextContains(getResourceString(R.string.fragment_disclaimer_button_okay))
|
||||
}
|
||||
}
|
||||
|
||||
okayButton {
|
||||
assertIsEnabled()
|
||||
}
|
||||
|
||||
disclaimerText {
|
||||
|
||||
@@ -85,7 +85,7 @@ internal class DisclaimerViewModel @Inject constructor(
|
||||
}
|
||||
|
||||
companion object {
|
||||
private const val FULL_COUNT_DOWN_SEC = 5
|
||||
const val FULL_COUNT_DOWN_SEC = 5
|
||||
private const val COUNT_DOWN_TICK_PERIOD_SEC = 1
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user