[#985] Fix failing UI tests on texts' case
- Closes #985 Fix Detekt warning
This commit is contained in:
parent
544ddda177
commit
1a8114a9b7
|
@ -126,7 +126,7 @@ class ScanViewTest : UiTestPrerequisites() {
|
|||
it.assertTextEquals(getStringResource(R.string.scan_state_permission))
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.scan_settings_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.scan_settings_button), ignoreCase = true).also {
|
||||
it.assertIsDisplayed()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
@ -139,7 +139,7 @@ class ScanViewTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(0, testSetup.getOnOpenSettingsCount())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.scan_settings_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.scan_settings_button), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -36,7 +36,7 @@ class BackupActivityTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(BackupStage.EducationOverview, testSetup.getStage())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_1_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_1_button), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -55,7 +55,7 @@ class BackupIntegrationTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(BackupStage.EducationOverview, testSetup.getStage())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_1_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_1_button), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -111,13 +111,18 @@ class LongBackupViewTest : UiTestPrerequisites() {
|
|||
|
||||
composeTestRule.onNode(hasText(getStringResource(R.string.new_wallet_4_header_ouch)))
|
||||
|
||||
composeTestRule.onNode(hasText(getStringResource(R.string.new_wallet_4_button_retry))).also {
|
||||
composeTestRule.onNode(hasText(getStringResource(R.string.new_wallet_4_button_retry), ignoreCase = true)).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
assertEquals(BackupStage.Seed, testSetup.getStage())
|
||||
|
||||
composeTestRule.onNode(hasText(getStringResource(R.string.new_wallet_3_button_finished))).also {
|
||||
composeTestRule.onNode(
|
||||
hasText(
|
||||
text = getStringResource(R.string.new_wallet_3_button_finished),
|
||||
ignoreCase = true
|
||||
)
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
@ -139,7 +144,8 @@ class LongBackupViewTest : UiTestPrerequisites() {
|
|||
fun last_stage_click_finish() {
|
||||
val testSetup = newTestSetup(BackupStage.Complete)
|
||||
|
||||
val goToWalletButton = composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_5_button_finished))
|
||||
val goToWalletButton =
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_5_button_finished), ignoreCase = true)
|
||||
goToWalletButton.performClick()
|
||||
|
||||
assertEquals(0, testSetup.getOnCopyToClipboardCount())
|
||||
|
@ -166,13 +172,13 @@ class LongBackupViewTest : UiTestPrerequisites() {
|
|||
fun multi_stage_progression() {
|
||||
val testSetup = newTestSetup(BackupStage.EducationOverview)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_1_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_1_button), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
assertEquals(BackupStage.EducationRecoveryPhrase, testSetup.getStage())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_2_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_2_button), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
@ -182,7 +188,10 @@ class LongBackupViewTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(1, testSetup.getOnCopyToClipboardCount())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_3_button_finished)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.new_wallet_3_button_finished),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
@ -206,7 +215,8 @@ class LongBackupViewTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(BackupStage.Complete, testSetup.getStage())
|
||||
|
||||
composeTestRule.onNode(hasText(getStringResource(R.string.new_wallet_5_button_finished))).performClick()
|
||||
composeTestRule.onNode(hasText(getStringResource(R.string.new_wallet_5_button_finished), ignoreCase = true))
|
||||
.performClick()
|
||||
|
||||
assertEquals(1, testSetup.getOnCompleteCallbackCount())
|
||||
}
|
||||
|
|
|
@ -38,7 +38,10 @@ class ShortBackupViewTest : UiTestPrerequisites() {
|
|||
fun click_finish() {
|
||||
val testSetup = newTestSetup()
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.new_wallet_short_button_finished)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.new_wallet_short_button_finished),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -45,11 +45,11 @@ class HomeViewTest : UiTestPrerequisites() {
|
|||
it.assertIsDisplayed()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.home_button_send)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.home_button_send), ignoreCase = true).also {
|
||||
it.assertIsDisplayed()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.home_button_receive)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.home_button_receive), ignoreCase = true).also {
|
||||
it.assertIsDisplayed()
|
||||
}
|
||||
}
|
||||
|
@ -218,20 +218,20 @@ private fun ComposeContentTestRule.openNavigationDrawer() {
|
|||
}
|
||||
|
||||
private fun ComposeContentTestRule.clickReceive() {
|
||||
onNodeWithText(getStringResource(R.string.home_button_receive)).also {
|
||||
onNodeWithText(getStringResource(R.string.home_button_receive), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
private fun ComposeContentTestRule.clickSend() {
|
||||
onNodeWithText(getStringResource(R.string.home_button_send)).also {
|
||||
onNodeWithText(getStringResource(R.string.home_button_send), ignoreCase = true).also {
|
||||
it.performScrollTo()
|
||||
it.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
private fun ComposeContentTestRule.clickHistory() {
|
||||
onNodeWithText(getStringResource(R.string.home_button_history)).also {
|
||||
onNodeWithText(getStringResource(R.string.home_button_history), ignoreCase = true).also {
|
||||
it.performScrollTo()
|
||||
it.performClick()
|
||||
}
|
||||
|
|
|
@ -31,7 +31,7 @@ class OnboardingActivityTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(OnboardingStage.ShieldedByDefault, testSetup.getOnboardingStage())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -41,7 +41,7 @@ class OnboardingIntegrationTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(OnboardingStage.UnifiedAddresses, testSetup.getOnboardingStage())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -52,7 +52,7 @@ class LongOnboardingViewTest : UiTestPrerequisites() {
|
|||
fun stage_1_layout() {
|
||||
newTestSetup(initialStage = OnboardingStage.ShieldedByDefault)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
@ -84,12 +84,15 @@ class LongOnboardingViewTest : UiTestPrerequisites() {
|
|||
it.assertHasClickAction()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithContentDescription(getStringResource(R.string.onboarding_back)).also {
|
||||
composeTestRule.onNodeWithContentDescription(
|
||||
label = getStringResource(R.string.onboarding_back),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertExists()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
@ -116,17 +119,20 @@ class LongOnboardingViewTest : UiTestPrerequisites() {
|
|||
fun stage_3_layout() {
|
||||
newTestSetup(initialStage = OnboardingStage.More)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_skip)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_skip), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithContentDescription(getStringResource(R.string.onboarding_back)).also {
|
||||
composeTestRule.onNodeWithContentDescription(
|
||||
label = getStringResource(R.string.onboarding_back),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertExists()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
@ -139,11 +145,17 @@ class LongOnboardingViewTest : UiTestPrerequisites() {
|
|||
it.assertExists()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_4_create_new_wallet)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.onboarding_4_create_new_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertDoesNotExist()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_4_import_existing_wallet)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.onboarding_4_import_existing_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertDoesNotExist()
|
||||
}
|
||||
}
|
||||
|
@ -167,13 +179,19 @@ class LongOnboardingViewTest : UiTestPrerequisites() {
|
|||
it.assertHasClickAction()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_4_create_new_wallet)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.onboarding_4_create_new_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertExists()
|
||||
it.assertIsEnabled()
|
||||
it.assertHasClickAction()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_4_import_existing_wallet)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.onboarding_4_import_existing_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertExists()
|
||||
it.assertIsEnabled()
|
||||
it.assertHasClickAction()
|
||||
|
@ -197,8 +215,12 @@ class LongOnboardingViewTest : UiTestPrerequisites() {
|
|||
fun last_stage_click_create_wallet() {
|
||||
val testSetup = newTestSetup(initialStage = OnboardingStage.Wallet)
|
||||
|
||||
val newWalletButton = composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_4_create_new_wallet))
|
||||
newWalletButton.performClick()
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.onboarding_4_create_new_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
assertEquals(1, testSetup.getOnCreateWalletCallbackCount())
|
||||
assertEquals(0, testSetup.getOnImportWalletCallbackCount())
|
||||
|
@ -223,15 +245,15 @@ class LongOnboardingViewTest : UiTestPrerequisites() {
|
|||
fun multi_stage_progression() {
|
||||
val testSetup = newTestSetup(initialStage = OnboardingStage.ShieldedByDefault)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_next), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -35,7 +35,10 @@ class ShortOnboardingViewTest : UiTestPrerequisites() {
|
|||
it.assertHasClickAction()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.onboarding_short_create_new_wallet)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.onboarding_short_create_new_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertExists()
|
||||
it.assertIsEnabled()
|
||||
it.assertHasClickAction()
|
||||
|
@ -48,7 +51,8 @@ class ShortOnboardingViewTest : UiTestPrerequisites() {
|
|||
val testSetup = newTestSetup()
|
||||
|
||||
val newWalletButton = composeTestRule.onNodeWithText(
|
||||
getStringResource(R.string.onboarding_short_create_new_wallet)
|
||||
text = getStringResource(R.string.onboarding_short_create_new_wallet),
|
||||
ignoreCase = true
|
||||
)
|
||||
newWalletButton.performClick()
|
||||
|
||||
|
|
|
@ -61,7 +61,10 @@ class ReceiveViewTest {
|
|||
|
||||
assertEquals(0, testSetup.getOnAddressDetailsCount())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.receive_see_address_details)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.receive_see_address_details),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -280,13 +280,13 @@ private fun ComposeContentTestRule.setMessage(message: String) {
|
|||
}
|
||||
|
||||
private fun ComposeContentTestRule.clickCreateAndSend() {
|
||||
onNodeWithText(getStringResource(R.string.request_create)).also {
|
||||
onNodeWithText(getStringResource(R.string.request_create), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
private fun ComposeContentTestRule.assertSendDisabled() {
|
||||
onNodeWithText(getStringResource(R.string.request_create)).also {
|
||||
onNodeWithText(getStringResource(R.string.request_create), ignoreCase = true).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -126,7 +126,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
fun seed_invalid_phrase_does_not_progress() {
|
||||
newTestSetup(initialWordsList = generateSequence { "abandon" }.take(SeedPhrase.SEED_PHRASE_SIZE).toList())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_seed_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_seed_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
}
|
||||
|
@ -139,7 +142,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
|
||||
newTestSetup(initialWordsList = SeedPhraseFixture.new().split)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_seed_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_seed_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertExists()
|
||||
}
|
||||
}
|
||||
|
@ -186,7 +192,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
initialWordsList = SeedPhraseFixture.new().split
|
||||
)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_birthday_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_birthday_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
|
||||
|
@ -194,7 +203,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
it.performTextInput(ZcashNetwork.Mainnet.saplingActivationHeight.value.toString())
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_birthday_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_birthday_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsEnabled()
|
||||
it.performClick()
|
||||
}
|
||||
|
@ -211,7 +223,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
initialWordsList = SeedPhraseFixture.new().split
|
||||
)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_birthday_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_birthday_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
|
||||
|
@ -235,7 +250,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
initialWordsList = SeedPhraseFixture.new().split
|
||||
)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_birthday_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_birthday_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
|
||||
|
@ -243,7 +261,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
it.performTextInput((ZcashNetwork.Mainnet.saplingActivationHeight.value - 1L).toString())
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_birthday_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_birthday_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
|
||||
|
@ -263,7 +284,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
initialWordsList = SeedPhraseFixture.new().split
|
||||
)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_birthday_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_birthday_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
|
||||
|
@ -271,7 +295,10 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
it.performTextInput("1.2")
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_birthday_button_restore)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = getStringResource(R.string.restore_birthday_button_restore),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
|
||||
|
@ -293,7 +320,7 @@ class RestoreViewTest : UiTestPrerequisites() {
|
|||
|
||||
assertEquals(0, testSetup.getOnFinishedCount())
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_button_see_wallet)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.restore_button_see_wallet), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -70,25 +70,25 @@ internal fun ComposeContentTestRule.setMemo(memo: String) {
|
|||
}
|
||||
|
||||
internal fun ComposeContentTestRule.clickCreateAndSend() {
|
||||
onNodeWithText(getStringResource(R.string.send_create)).also {
|
||||
onNodeWithText(getStringResource(R.string.send_create), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
internal fun ComposeContentTestRule.clickConfirmation() {
|
||||
onNodeWithText(getStringResource(R.string.send_confirmation_button)).also {
|
||||
onNodeWithText(getStringResource(R.string.send_confirmation_button), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
}
|
||||
|
||||
internal fun ComposeContentTestRule.assertOnForm() {
|
||||
onNodeWithText(getStringResource(R.string.send_create)).also {
|
||||
onNodeWithText(getStringResource(R.string.send_create), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
}
|
||||
}
|
||||
|
||||
internal fun ComposeContentTestRule.assertOnConfirmation() {
|
||||
onNodeWithText(getStringResource(R.string.send_confirmation_button)).also {
|
||||
onNodeWithText(getStringResource(R.string.send_confirmation_button), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
}
|
||||
}
|
||||
|
@ -112,13 +112,13 @@ internal fun ComposeContentTestRule.assertOnSendFailure() {
|
|||
}
|
||||
|
||||
internal fun ComposeContentTestRule.assertSendEnabled() {
|
||||
onNodeWithText(getStringResource(R.string.send_create)).also {
|
||||
onNodeWithText(getStringResource(R.string.send_create), ignoreCase = true).also {
|
||||
it.assertIsEnabled()
|
||||
}
|
||||
}
|
||||
|
||||
internal fun ComposeContentTestRule.assertSendDisabled() {
|
||||
onNodeWithText(getStringResource(R.string.send_create)).also {
|
||||
onNodeWithText(getStringResource(R.string.send_create), ignoreCase = true).also {
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -74,7 +74,7 @@ class SendViewTest : UiTestPrerequisites() {
|
|||
@Suppress("UNUSED_VARIABLE")
|
||||
val testSetup = newTestSetup()
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.send_create)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.send_create), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
it.assertIsNotEnabled()
|
||||
}
|
||||
|
@ -359,7 +359,7 @@ class SendViewTest : UiTestPrerequisites() {
|
|||
assertEquals(0, testSetup.getOnBackCount())
|
||||
|
||||
composeTestRule.assertOnSendSuccessful()
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.send_successful_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.send_successful_button), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
it.performClick()
|
||||
}
|
||||
|
@ -395,7 +395,7 @@ class SendViewTest : UiTestPrerequisites() {
|
|||
assertEquals(0, testSetup.getOnBackCount())
|
||||
|
||||
composeTestRule.assertOnSendFailure()
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.send_failure_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.send_failure_button), ignoreCase = true).also {
|
||||
it.assertExists()
|
||||
it.performClick()
|
||||
}
|
||||
|
|
|
@ -46,7 +46,8 @@ class SettingsViewTest : UiTestPrerequisites() {
|
|||
assertEquals(0, testSetup.getFeedbackCount())
|
||||
|
||||
composeTestRule.onNodeWithText(
|
||||
getStringResource(R.string.settings_send_us_feedback)
|
||||
text = getStringResource(R.string.settings_send_us_feedback),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
@ -62,7 +63,8 @@ class SettingsViewTest : UiTestPrerequisites() {
|
|||
assertEquals(0, testSetup.getBackupCount())
|
||||
|
||||
composeTestRule.onNodeWithText(
|
||||
getStringResource(R.string.settings_backup_wallet)
|
||||
text = getStringResource(R.string.settings_backup_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
@ -78,7 +80,8 @@ class SettingsViewTest : UiTestPrerequisites() {
|
|||
assertEquals(0, testSetup.getDocumentationCount())
|
||||
|
||||
composeTestRule.onNodeWithText(
|
||||
getStringResource(R.string.settings_documentation)
|
||||
text = getStringResource(R.string.settings_documentation),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
@ -94,7 +97,8 @@ class SettingsViewTest : UiTestPrerequisites() {
|
|||
assertEquals(0, testSetup.getPrivacyPolicyCount())
|
||||
|
||||
composeTestRule.onNodeWithText(
|
||||
getStringResource(R.string.settings_privacy_policy)
|
||||
text = getStringResource(R.string.settings_privacy_policy),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
@ -110,7 +114,8 @@ class SettingsViewTest : UiTestPrerequisites() {
|
|||
assertEquals(0, testSetup.getAboutCount())
|
||||
|
||||
composeTestRule.onNodeWithText(
|
||||
getStringResource(R.string.settings_about)
|
||||
text = getStringResource(R.string.settings_about),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
|
|
@ -61,7 +61,7 @@ class SupportViewIntegrationTest : UiTestPrerequisites() {
|
|||
it.assertDoesNotExist()
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.support_send)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.support_send), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -115,7 +115,7 @@ private fun ComposeContentTestRule.clickBack() {
|
|||
}
|
||||
|
||||
private fun ComposeContentTestRule.clickSend() {
|
||||
onNodeWithText(getStringResource(R.string.support_send)).also {
|
||||
onNodeWithText(getStringResource(R.string.support_send), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
}
|
||||
|
|
|
@ -42,7 +42,7 @@ class UpdateViewIntegrationTest {
|
|||
assertEquals(testSetup.getUpdateInfo().priority, AppUpdateChecker.Priority.HIGH)
|
||||
assertEquals(testSetup.getUpdateState(), UpdateState.Prepared)
|
||||
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.update_download_button)).also {
|
||||
composeTestRule.onNodeWithText(getStringResource(R.string.update_download_button), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
|
@ -334,7 +334,10 @@ private fun onboardingScreenshots(
|
|||
ScreenshotTest.takeScreenshot(tag, "Onboarding 1")
|
||||
}
|
||||
|
||||
composeTestRule.onNodeWithText(resContext.getString(R.string.onboarding_short_create_new_wallet)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = resContext.getString(R.string.onboarding_short_create_new_wallet),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.performClick()
|
||||
}
|
||||
} else {
|
||||
|
@ -390,7 +393,10 @@ private fun backupScreenshots(
|
|||
}
|
||||
ScreenshotTest.takeScreenshot(tag, "Backup 1")
|
||||
|
||||
composeTestRule.onNodeWithText(resContext.getString(R.string.new_wallet_short_button_finished)).also {
|
||||
composeTestRule.onNodeWithText(
|
||||
text = resContext.getString(R.string.new_wallet_short_button_finished),
|
||||
ignoreCase = true
|
||||
).also {
|
||||
it.assertExists()
|
||||
it.performClick()
|
||||
}
|
||||
|
@ -509,7 +515,7 @@ private fun homeScreenshots(
|
|||
composeTestRule.activity.walletViewModel.walletSnapshot.value != null
|
||||
}
|
||||
|
||||
composeTestRule.onNode(hasText(resContext.getString(R.string.home_button_send))).also {
|
||||
composeTestRule.onNode(hasText(resContext.getString(R.string.home_button_send), ignoreCase = true)).also {
|
||||
it.assertExists()
|
||||
ScreenshotTest.takeScreenshot(tag, "Home 1")
|
||||
}
|
||||
|
@ -522,7 +528,7 @@ private fun homeScreenshots(
|
|||
}
|
||||
|
||||
private fun settingsScreenshots(resContext: Context, tag: String, composeTestRule: ComposeTestRule) {
|
||||
composeTestRule.onNode(hasText(resContext.getString(R.string.settings_header))).also {
|
||||
composeTestRule.onNode(hasText(resContext.getString(R.string.settings_header), ignoreCase = true)).also {
|
||||
it.assertExists()
|
||||
}
|
||||
|
||||
|
@ -570,7 +576,7 @@ private fun receiveZecScreenshots(
|
|||
|
||||
ScreenshotTest.takeScreenshot(tag, "Receive 1")
|
||||
|
||||
composeTestRule.onNodeWithText(resContext.getString(R.string.receive_see_address_details)).also {
|
||||
composeTestRule.onNodeWithText(resContext.getString(R.string.receive_see_address_details), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
@ -621,7 +627,7 @@ private fun sendZecScreenshots(
|
|||
// Screenshot: Fulfilled form
|
||||
ScreenshotTest.takeScreenshot(tag, "Send 2")
|
||||
|
||||
composeTestRule.onNodeWithText(resContext.getString(R.string.send_create)).also {
|
||||
composeTestRule.onNodeWithText(resContext.getString(R.string.send_create), ignoreCase = true).also {
|
||||
it.performClick()
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue