diff --git a/app/src/androidTest/kotlin/com/tangem/tests/FeedbackTest.kt b/app/src/androidTest/kotlin/com/tangem/tests/FeedbackTest.kt index 821cf2ca7b..eb39e37b15 100644 --- a/app/src/androidTest/kotlin/com/tangem/tests/FeedbackTest.kt +++ b/app/src/androidTest/kotlin/com/tangem/tests/FeedbackTest.kt @@ -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) } + } + } + } } \ No newline at end of file diff --git a/app/src/androidTest/kotlin/com/tangem/tests/main/WarningsTest.kt b/app/src/androidTest/kotlin/com/tangem/tests/main/WarningsTest.kt index 8510d1e1c6..a4ee078d5a 100644 --- a/app/src/androidTest/kotlin/com/tangem/tests/main/WarningsTest.kt +++ b/app/src/androidTest/kotlin/com/tangem/tests/main/WarningsTest.kt @@ -27,11 +27,9 @@ class WarningsTest : BaseTestCase() { resetWireMockScenarioState(USER_TOKENS_API_SCENARIO) } ).run { - step("Set WireMock scenario: '$USER_TOKENS_API_SCENARIO' to state: '$scenarioState'") { setWireMockScenarioState(USER_TOKENS_API_SCENARIO, scenarioState) } - step("Open 'Main Screen'") { openMainScreen() }