Test hotfixes

This commit is contained in:
Milan Cerovsky 2024-08-23 07:05:58 +02:00
parent 3411a4c5c5
commit 2df5990238
1 changed files with 11 additions and 13 deletions

View File

@ -28,7 +28,6 @@ import androidx.test.espresso.matcher.ViewMatchers.isRoot
import androidx.test.espresso.screenshot.captureToBitmap import androidx.test.espresso.screenshot.captureToBitmap
import androidx.test.ext.junit.rules.ActivityScenarioRule import androidx.test.ext.junit.rules.ActivityScenarioRule
import androidx.test.filters.LargeTest import androidx.test.filters.LargeTest
import androidx.test.filters.MediumTest
import androidx.test.filters.SdkSuppress import androidx.test.filters.SdkSuppress
import cash.z.ecc.android.sdk.fixture.WalletAddressFixture import cash.z.ecc.android.sdk.fixture.WalletAddressFixture
import cash.z.ecc.android.sdk.model.MonetarySeparators import cash.z.ecc.android.sdk.model.MonetarySeparators
@ -124,7 +123,7 @@ class ScreenshotTest : UiTestPrerequisites() {
} }
@Test @Test
@MediumTest @LargeTest
fun takeScreenshotsForRestoreWalletLightEnXA() { fun takeScreenshotsForRestoreWalletLightEnXA() {
runWith(UiMode.Light, "en-XA") { context, tag -> runWith(UiMode.Light, "en-XA") { context, tag ->
takeScreenshotsForRestoreWallet(context, tag) takeScreenshotsForRestoreWallet(context, tag)
@ -132,7 +131,7 @@ class ScreenshotTest : UiTestPrerequisites() {
} }
@Test @Test
@MediumTest @LargeTest
fun takeScreenshotsForRestoreWalletLightArXB() { fun takeScreenshotsForRestoreWalletLightArXB() {
runWith(UiMode.Light, "ar-XB") { context, tag -> runWith(UiMode.Light, "ar-XB") { context, tag ->
takeScreenshotsForRestoreWallet(context, tag) takeScreenshotsForRestoreWallet(context, tag)
@ -140,23 +139,22 @@ class ScreenshotTest : UiTestPrerequisites() {
} }
@Test @Test
@MediumTest @LargeTest
fun takeScreenshotsForRestoreWalletLightEnUS() { fun takeScreenshotsForRestoreWalletLightEnUS() {
runWith(UiMode.Light, "en-US") { context, tag -> runWith(UiMode.Light, "en-US") { context, tag ->
takeScreenshotsForRestoreWallet(context, tag) takeScreenshotsForRestoreWallet(context, tag)
} }
} }
// disabling flaky test
// Dark mode was introduced in Android Q // Dark mode was introduced in Android Q
// @Test @Test
// @MediumTest @LargeTest
// @SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q) @SdkSuppress(minSdkVersion = Build.VERSION_CODES.Q)
// fun takeScreenshotsForRestoreWalletDarkEnUS() { fun takeScreenshotsForRestoreWalletDarkEnUS() {
// runWith(UiMode.Dark, "en-US") { context, tag -> runWith(UiMode.Dark, "en-US") { context, tag ->
// takeScreenshotsForRestoreWallet(context, tag) takeScreenshotsForRestoreWallet(context, tag)
// } }
// } }
@OptIn(ExperimentalTestApi::class) @OptIn(ExperimentalTestApi::class)
@Suppress("LongMethod", "CyclomaticComplexMethod") @Suppress("LongMethod", "CyclomaticComplexMethod")