Updated on 2026-08-14

This commit is contained in:
Tangem 2025-10-31 11:33:17 +03:00
parent 60d2ba7a38
commit b9262b9a16
2 changed files with 6 additions and 5 deletions

View file

@ -79,9 +79,9 @@ class SendConfirmPageObject(semanticsProvider: SemanticsNodeInteractionsProvider
useUnmergedTree = true
}
fun warningIcon(messageResId: Int): KNode = child {
fun warningIcon(message: String): KNode = child {
hasTestTag(NotificationTestTags.ICON)
hasAnySibling(withText(getResourceString(messageResId)))
hasAnySibling(withText(message))
useUnmergedTree = true
}

View file

@ -12,6 +12,7 @@ import com.tangem.core.ui.R
import com.tangem.scenarios.*
import com.tangem.screens.*
import dagger.hilt.android.testing.HiltAndroidTest
import io.github.kakaocup.kakao.common.utilities.getResourceString
import io.qameta.allure.kotlin.AllureId
import io.qameta.allure.kotlin.junit4.DisplayName
import org.junit.Test
@ -240,7 +241,7 @@ class SendConfirmScreenTest : BaseTestCase() {
fun checkFeeWarningTest() {
val tokenName = "Polkadot"
val tokenAmount = "0.1"
val warningTitleResId = R.string.send_fee_unreachable_error_title
val warningTitle = getResourceString(R.string.send_fee_unreachable_error_title)
val warningMessageResId = R.string.send_fee_unreachable_error_text
val currentFeeAmount = "$0.05"
@ -279,13 +280,13 @@ class SendConfirmScreenTest : BaseTestCase() {
enableMobileData()
}
step("Assert 'Network fee info unreachable' warning title is displayed") {
onSendConfirmScreen { warningTitle(warningTitleResId).assertIsDisplayed() }
onSendConfirmScreen { warningTitle(warningTitle).assertIsDisplayed() }
}
step("Assert 'Check your internet connection' warning message is displayed") {
onSendConfirmScreen { warningMessage(warningMessageResId).assertIsDisplayed() }
}
step("Assert warning icon is displayed") {
onSendConfirmScreen { warningIcon(warningTitleResId).assertIsDisplayed() }
onSendConfirmScreen { warningIcon(warningTitle).assertIsDisplayed() }
}
step("Click on 'Refresh' button") {
waitForIdle()