Updated on 2026-08-14
This commit is contained in:
parent
ba3e7e4044
commit
58ac55c4ae
9 changed files with 26 additions and 20 deletions
|
|
@ -323,6 +323,7 @@ fun BaseTestCase.switchFeeTokenAndApply(currentFeeToken: String, newFeeToken: St
|
|||
}
|
||||
}
|
||||
step("Click on 'Apply' button") {
|
||||
waitForIdle()
|
||||
onSendFeeSelectorBottomSheet { applyButton.performClick() }
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package com.tangem.screens
|
|||
import androidx.compose.ui.test.SemanticsNodeInteractionsProvider
|
||||
import com.tangem.common.BaseTestCase
|
||||
import com.tangem.core.ui.R
|
||||
import com.tangem.core.ui.test.AddFundsBottomSheetTestTags
|
||||
import com.tangem.core.ui.test.BaseBottomSheetTestTags
|
||||
import com.tangem.core.ui.test.BuyTokenScreenTestTags
|
||||
import com.tangem.core.ui.test.MarketsTestTags
|
||||
|
|
@ -38,7 +37,7 @@ class AddFundsBottomSheetPageObject(semanticsProvider: SemanticsNodeInteractions
|
|||
}
|
||||
|
||||
val closeButton: KNode = child {
|
||||
hasTestTag(AddFundsBottomSheetTestTags.CLOSE_BUTTON)
|
||||
hasTestTag(BaseBottomSheetTestTags.CLOSE_BUTTON)
|
||||
useUnmergedTree = true
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -189,6 +189,7 @@ class SwapTokenPageObject(semanticsProvider: SemanticsNodeInteractionsProvider)
|
|||
|
||||
val swapFiatAmount: KNode = child {
|
||||
hasTestTag(SwapTokenScreenTestTags.SWAP_FIAT_AMOUNT)
|
||||
useUnmergedTree = true
|
||||
}
|
||||
|
||||
val swapSelectTokenIcon: KNode = child {
|
||||
|
|
|
|||
|
|
@ -6,9 +6,9 @@ import com.tangem.common.constants.TestConstants.TANGEM_PAY_ELIGIBILITY_SCENARIO
|
|||
import com.tangem.common.extensions.assertTextContainsSafe
|
||||
import com.tangem.common.extensions.clickWithAssertion
|
||||
import com.tangem.common.extensions.extractText
|
||||
import com.tangem.common.extensions.pullToRefresh
|
||||
import com.tangem.common.utils.assertClipboardTextEquals
|
||||
import com.tangem.common.utils.resetWireMockScenarioState
|
||||
import com.tangem.common.utils.resetWireMockScenarios
|
||||
import com.tangem.common.utils.setWireMockScenarioState
|
||||
import com.tangem.scenarios.*
|
||||
import com.tangem.screens.tangempay.*
|
||||
|
|
@ -23,7 +23,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
@AllureId("4549")
|
||||
@DisplayName("Tangem Pay: change PIN code from card details")
|
||||
@Test
|
||||
fun changePin_SetsNewPinCode_FromCardDetails() {
|
||||
fun changePinSetsNewPinCodeFromCardDetailsTest() {
|
||||
val newPin = "5217"
|
||||
val pinSetupScenario = "tangem_pay_pin_setup"
|
||||
val pinNotSetState = "PinNotSet"
|
||||
|
|
@ -31,6 +31,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
|
||||
setupHooks(
|
||||
additionalBeforeSection = {
|
||||
resetWireMockScenarios()
|
||||
setWireMockScenarioState(TANGEM_PAY_ELIGIBILITY_SCENARIO, eligibilityState)
|
||||
setWireMockScenarioState(pinSetupScenario, pinNotSetState)
|
||||
},
|
||||
|
|
@ -67,7 +68,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
@AllureId("4969")
|
||||
@DisplayName("Tangem Pay: balance updates after transaction on payment account screen")
|
||||
@Test
|
||||
fun balanceUpdatesAfterTransaction_OnPaymentAccountScreen() {
|
||||
fun balanceUpdatesAfterTransactionOnPaymentAccountScreenTest() {
|
||||
val balanceScenario = "tangem_pay_balance_update"
|
||||
val initialState = "InitialBalance"
|
||||
val afterTransactionState = "AfterTransaction"
|
||||
|
|
@ -75,6 +76,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
|
||||
setupHooks(
|
||||
additionalBeforeSection = {
|
||||
resetWireMockScenarios()
|
||||
setWireMockScenarioState(TANGEM_PAY_ELIGIBILITY_SCENARIO, eligibilityState)
|
||||
setWireMockScenarioState(balanceScenario, initialState)
|
||||
},
|
||||
|
|
@ -90,7 +92,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
step("Switch WireMock scenario '$balanceScenario' to '$afterTransactionState'") {
|
||||
setWireMockScenarioState(balanceScenario, afterTransactionState)
|
||||
}
|
||||
step("Pull to refresh") { pullToRefresh() }
|
||||
step("Pull to refresh") { pullToRefreshTangemPay() }
|
||||
step("Assert updated balance contains '9'") {
|
||||
onTangemPayMainScreen { balance.assertTextContainsSafe("9", substring = true) }
|
||||
}
|
||||
|
|
@ -100,7 +102,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
@AllureId("4970")
|
||||
@DisplayName("Tangem Pay: new transaction appears after mocked charge")
|
||||
@Test
|
||||
fun transactionList_NewTransactionAppears_AfterMockedCharge() {
|
||||
fun transactionListNewTransactionAppearsAfterMockedChargeTest() {
|
||||
val historyScenario = "tangem_pay_transaction_history"
|
||||
val initialState = "InitialEmpty"
|
||||
val afterTransactionState = "AfterTransaction"
|
||||
|
|
@ -109,6 +111,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
|
||||
setupHooks(
|
||||
additionalBeforeSection = {
|
||||
resetWireMockScenarios()
|
||||
setWireMockScenarioState(TANGEM_PAY_ELIGIBILITY_SCENARIO, eligibilityState)
|
||||
setWireMockScenarioState(historyScenario, initialState)
|
||||
},
|
||||
|
|
@ -126,7 +129,7 @@ class TangemPayTest : BaseTestCase() {
|
|||
step("Switch WireMock scenario '$historyScenario' to '$afterTransactionState'") {
|
||||
setWireMockScenarioState(historyScenario, afterTransactionState)
|
||||
}
|
||||
step("Pull to refresh") { pullToRefresh() }
|
||||
step("Pull to refresh") { pullToRefreshTangemPay() }
|
||||
step("Assert transaction from '$merchantName' is displayed") {
|
||||
onTangemPayMainScreen {
|
||||
transactionRowWithText(merchantName).assertIsDisplayed()
|
||||
|
|
@ -138,12 +141,13 @@ class TangemPayTest : BaseTestCase() {
|
|||
@AllureId("4974")
|
||||
@DisplayName("Tangem Pay: reveal and copy card number, expiration and CVC")
|
||||
@Test
|
||||
fun revealAndCopyCardDetails_NumberExpirationCVC() {
|
||||
fun revealAndCopyCardDetailsNumberExpirationCVCTest() {
|
||||
val context = InstrumentationRegistry.getInstrumentation().targetContext
|
||||
val eligibilityState = "PaeraCustomer"
|
||||
|
||||
setupHooks(
|
||||
additionalBeforeSection = {
|
||||
resetWireMockScenarios()
|
||||
setWireMockScenarioState(TANGEM_PAY_ELIGIBILITY_SCENARIO, eligibilityState)
|
||||
},
|
||||
additionalAfterSection = {
|
||||
|
|
@ -200,13 +204,14 @@ class TangemPayTest : BaseTestCase() {
|
|||
@AllureId("4971")
|
||||
@DisplayName("Tangem Pay: freeze card via confirmation sheet")
|
||||
@Test
|
||||
fun freezeUnfreezeCard_TogglesCardState() {
|
||||
fun freezeUnfreezeCardTogglesCardStateTest() {
|
||||
val freezeScenario = "tangem_pay_card_freeze"
|
||||
val startedState = "Started"
|
||||
val eligibilityState = "PaeraCustomer"
|
||||
|
||||
setupHooks(
|
||||
additionalBeforeSection = {
|
||||
resetWireMockScenarios()
|
||||
setWireMockScenarioState(TANGEM_PAY_ELIGIBILITY_SCENARIO, eligibilityState)
|
||||
setWireMockScenarioState(freezeScenario, startedState)
|
||||
},
|
||||
|
|
|
|||
|
|
@ -9,6 +9,7 @@ import com.tangem.common.constants.TestConstants.WAIT_UNTIL_TIMEOUT_VERY_LONG
|
|||
import com.tangem.common.extensions.assertTextContainsSafe
|
||||
import com.tangem.common.extensions.clickWithAssertion
|
||||
import com.tangem.common.utils.resetWireMockScenarioState
|
||||
import com.tangem.common.utils.resetWireMockScenarios
|
||||
import com.tangem.common.utils.setWireMockScenarioState
|
||||
import com.tangem.core.res.R as CoreResR
|
||||
import com.tangem.scenarios.*
|
||||
|
|
@ -26,7 +27,7 @@ class TangemPayTopUpTest : BaseTestCase() {
|
|||
@AllureId("4973")
|
||||
@DisplayName("Tangem Pay: top up swaps Bitcoin to USDC and appends deposit to history")
|
||||
@Test
|
||||
fun topUpFromTangemPay_SwapsBitcoinToUSDC_AppendsDepositToHistory() {
|
||||
fun topUpFromTangemPaySwapsBitcoinToUSDCAppendsDepositToHistoryTest() {
|
||||
val bitcoinScenario = "bitcoin_utxo"
|
||||
val expressAssetsScenario = "express_api_assets"
|
||||
val balanceScenario = "tangem_pay_balance_update"
|
||||
|
|
@ -43,6 +44,7 @@ class TangemPayTopUpTest : BaseTestCase() {
|
|||
|
||||
setupHooks(
|
||||
additionalBeforeSection = {
|
||||
resetWireMockScenarios()
|
||||
setWireMockScenarioState(TANGEM_PAY_ELIGIBILITY_SCENARIO, eligibilityState)
|
||||
setWireMockScenarioState(bitcoinScenario, bitcoinBalanceState)
|
||||
setWireMockScenarioState(expressAssetsScenario, expressAssetsState)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue