Updated on 2026-08-14

This commit is contained in:
Tangem 2026-07-10 16:25:46 +03:00
parent 5ca489c08b
commit 6ecac6d3ac
2 changed files with 43 additions and 2 deletions

View file

@ -196,4 +196,47 @@ class FeedbackTest : BaseTestCase() {
} }
} }
} }
@AllureId("3960")
@DisplayName("Send feedback: Failed card scanning on Details screen")
@Test
fun sendFeedbackFailedScanningOnDetails() {
val gmailText = "Welcome to Gmail"
setupHooks(
additionalAfterSection = { MockProvider.resetEmulateError() },
).run {
step("Open 'Main Screen'") {
openMainScreen()
}
step("Synchronize addresses") {
synchronizeAddresses()
}
step("Open 'Details screen'") {
onMainScreenTopBar { moreButton.clickWithAssertion() }
}
step("Set scanning error (the next card scan will fail with TagLost)") {
MockProvider.setEmulateError(TangemSdkError.TagLost())
}
step("Click 'Add new wallet' button") {
onDetailsScreen { addWalletButton.clickWithAssertion() }
}
step("Force show 'Scan warning' dialog"){
runOnUiThread {
MainScope().launch {
scanFailsRequester.show(AnalyticsParam.ScreensSources.Main)
}
}
}
step("Check 'Scan warning' dialog") {
waitForIdle()
checkScanWarningDialog()
}
step("Click on 'Request support' button") {
onScanWarningDialog { requestSupportButton.performClick() }
}
step("Assert 'Gmail' app is open") {
ThirdPartyAppPageObject { assertElementWithTextExists(gmailText) }
}
}
}
} }

View file

@ -27,11 +27,9 @@ class WarningsTest : BaseTestCase() {
resetWireMockScenarioState(USER_TOKENS_API_SCENARIO) resetWireMockScenarioState(USER_TOKENS_API_SCENARIO)
} }
).run { ).run {
step("Set WireMock scenario: '$USER_TOKENS_API_SCENARIO' to state: '$scenarioState'") { step("Set WireMock scenario: '$USER_TOKENS_API_SCENARIO' to state: '$scenarioState'") {
setWireMockScenarioState(USER_TOKENS_API_SCENARIO, scenarioState) setWireMockScenarioState(USER_TOKENS_API_SCENARIO, scenarioState)
} }
step("Open 'Main Screen'") { step("Open 'Main Screen'") {
openMainScreen() openMainScreen()
} }