Repository navigation
test: refresh usdt ui regression coverage - #1496
Conversation
Regtest APKDownload bitkit-dev-debug universal APK (expires in 30 days). |
[Low impact] This test-only PR appears safe to merge. SummaryUpdates six Android instrumentation cases across five test files. No production code changes.
Reviews (1) · Last reviewed commit: "test: refresh usdt ui regression coverag..." · Reviewed by Greptile |
talosmachina
left a comment
There was a problem hiding this comment.
No findings. Test-only update that realigns six instrumentation cases with the post-USDT UI. Reviewed 55b0a47, light tier, reasoned from the code and CI (Android branches are not built on this reviewer's side).
What I checked, and 4 candidates I ruled out
Read: the five changed test files around each hunk, ClickableAlpha.kt (ClickDebouncer), PaymentRequestsScreen.kt (row tag and lifecycle status), SendFundingOption in AppViewModel.kt, UsdtSendContent.kt (UsdtReviewDetails).
CI: the UI Tests run at 55b0a47 concluded success; build, lint and detekt green; the local e2e shards were still running when this was written.
Ruled out
- Debounce sleep too short:
ClickDebouncer.tryClickcomparesSystemClock.uptimeMillis()against a 500 msCLICK_DEBOUNCE, andSystemClock.sleep(600)waits on that same clock, so the margin is 100 ms of the clock the debouncer reads, not the Compose test clock. pendingasserted on the wrong state:paymentRequestLifecycleStatusmapsACCEPTEDtowallet__payment_request_pending, whose value ispending, so the scoped matcher onPaymentRequestRow-acceptedasserts the real status rather than a coincidental match from the outgoing row. Scoping byhasAnyAncestor(hasTestTag(...))also removes the two-match ambiguity of the oldonNodeWithText("pending").- Refund amount mismatch: the fixture deposit is
50_000_001uat 6 decimals, so50,000001 USDTis the exact localized value; the old50,00substring would also have matched a truncated amount, so the new assertion is strictly tighter. - Fixture weakening the funding-lock check:
fundingOptionsgains two enabled Bitcoin sources while the test still asserts the pending payment keeps the switch locked, so the lock is exercised against a state where switching would otherwise be possible.
Merge confidence: 5/5, test-only change and the UI Tests run at this head is green.
jvsena42
left a comment
There was a problem hiding this comment.
No findings. Test-only change: six instrumentation cases realigned with the post-USDT UI.
Checked at 55b0a47:
CreatePaymentRequestScreenTest:SystemClock.sleep(600)waits on the sameuptimeMillisclockClickDebouncercompares against its 500 ms window, so the re-select is not swallowed.PaymentRequestsScreenTest:paymentRequestLifecycleStatus(PaymentRequestsScreen.kt:504) rendersACCEPTEDaswallet__payment_request_pending= "pending"; the row-scoped matchers remove the two-match ambiguity and assert the right row.SendConfirmNavigationTest: the fixture now has two enabled Bitcoin funding options, so the pending-payment lock is tested against a state where switching would otherwise be allowed.UsdtBridgeDetailsTest:50,000001 USDTis the exact 6-decimal value of the50_000_001fixture; tighter than the old50,00substring.UsdtPaymentContentTest:assertIsDisplayed()before the click keeps the visibility check thatperformScrollToused to imply.
Device gate: no device check needed (test-only, no journeys, not performance-relevant).
Skipped — covered by CI at 55b0a47: build, unit tests, lint, detekt, UI tests (run 38728287505), e2e shards (all green).
Note: #1494 also edits CreatePaymentRequestScreenTest.kt and UsdtPaymentContentTest.kt; whichever lands second needs a rebase.
This PR updates six Android instrumentation cases that failed after the USDT merge in #1432.
Description
Out of Scope
TxBumpingTests.testAccelerateByCpfp: investigation remains separate; its zero-balance funding precondition failed before CPFP was invoked. No timeout, assertion or skip is changed here.CreatePaymentRequestScreenTest.ktandUsdtPaymentContentTest.kttoo; reconcile these cases with that PR when merging.Design
N/A — no UI changes.
Preview
N/A — test-only changes.
QA Notes
Journeys
N/A — no user-visible behaviour change.
Manual Tests
N/A
Automated Checks
CreatePaymentRequestScreenTest.kt— respects chip debounce while retaining endpoint grouping and mandatory-selection assertions.PaymentRequestsScreenTest.kt— checks pending lifecycle status in the correct accepted/outgoing row, including fiat-primary display.SendConfirmNavigationTest.kt— checks swipe restoration after picker back navigation and funding lock while payment is pending.UsdtBridgeDetailsTest.kt— checks the exact localized refund amount and refund eligibility.UsdtPaymentContentTest.kt— retains maximum-debit/swipe visibility and opens the fixed details action.CI rerun passed at
55b0a472246af8d203e6300e2570c0ec37185ae3:ComposeUi: 217 tests completed successfully, including the six fixed cases.CoreServiceIntegration: 30 tests, zero failures/errors, one unrelated recovery-fixture skip. CPFP passed without changing its assertion, wait or skip behavior.The second Gradle invocation replaced the first suite’s XML/report output; the CI log retains the successful 217-test Compose run, while the uploaded XML and per-test logcat verify the CPFP result directly. The six changed cases are all in
ComposeUi.The local build was cancelled because disk space fell below 400 MB before the instrumentation APK finished. CI subsequently built both APKs successfully. Detekt reported existing repository findings and no findings in the five changed test files; PR lint checks also passed.
Original failure: master UI run at
d7cf4ec788bbd8493164c91ba34c8dcac265572b(261 tests, seven failures, three skips).CPFP evidence: the previous green master run actually created a CPFP child and passed. In the failing run, the faucet returned a transaction at 10:51:42.479 UTC, the wallet still reported zero balance after sync at 10:52:03.618, and the transaction was confirmed in the shared regtest chain at 10:52:11. This does not establish when the unconfirmed transaction became visible to Electrum or why the wallet did not see it in time.