Skip to content

test: refresh usdt ui regression coverage - #1496

Merged
piotr-iohk merged 1 commit into
masterfrom
test/usdt-ui-regressions-20261015
Oct 15, 2026
Merged

piotr-iohk merged 1 commit into
masterfrom
test/usdt-ui-regressions-20261015

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

This PR updates six Android instrumentation cases that failed after the USDT merge in #1432.

Description

  • Waits for the real-clock click debounce before selecting Bitcoin again in the accepted-assets test.
  • Checks the current pending status within each payment-request row so two valid pending requests do not make the selector ambiguous.
  • Supplies both eligible Bitcoin funding options in the send-confirm fixture so the funding-picker and pending-payment checks exercise the current state contract.
  • Preserves all six refund decimals in the localized amount assertion and clicks the visible bridge-details footer without asking it to scroll.

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.
  • feat: refine usdt payment and earn screens #1494 changes CreatePaymentRequestScreenTest.kt and UsdtPaymentContentTest.kt too; 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

  • updated CreatePaymentRequestScreenTest.kt — respects chip debounce while retaining endpoint grouping and mandatory-selection assertions.
  • updated PaymentRequestsScreenTest.kt — checks pending lifecycle status in the correct accepted/outgoing row, including fiat-primary display.
  • updated SendConfirmNavigationTest.kt — checks swipe restoration after picker back navigation and funding lock while payment is pending.
  • updated UsdtBridgeDetailsTest.kt — checks the exact localized refund amount and refund eligibility.
  • updated 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.
  • CPFP detected the 100,000-sat balance at 11:48:38.180 UTC, created its child at 11:48:38.338, and finished with 97,810 sats confirmed at 11:48:53.946.

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.

@piotr-iohk
piotr-iohk marked this pull request as ready for review October 15, 2026 12:25
@piotr-iohk
piotr-iohk requested review from a team, ben-kaufman and coreyphillips and removed request for a team October 15, 2026 12:25
@github-actions

Copy link
Copy Markdown
Contributor

Regtest APK

Built from 55b0a47 (run).

Download bitkit-dev-debug universal APK (expires in 30 days).

@ovitrif ovitrif added this to the 3.0.0 milestone Oct 15, 2026
@greptile-apps

greptile-apps Bot commented Oct 15, 2026 •

Copy link
Copy Markdown
Contributor

RetriggerView in GreptileConfidence Score: 5/5

[Low impact] This test-only PR appears safe to merge.

Summary

Updates six Android instrumentation cases across five test files. No production code changes.

  • Accepted-asset tests wait before selecting Bitcoin again.
  • Payment-request tests check pending status inside each row.
  • Send-confirm tests start with both funding sources enabled.
  • USDT refund tests check the full localized amount.
  • USDT payment tests tap bridge details only when visible.

Reviews (1) · Last reviewed commit: "test: refresh usdt ui regression coverag..." · Reviewed by Greptile

@talosmachina talosmachina left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.tryClick compares SystemClock.uptimeMillis() against a 500 ms CLICK_DEBOUNCE, and SystemClock.sleep(600) waits on that same clock, so the margin is 100 ms of the clock the debouncer reads, not the Compose test clock.
  • pending asserted on the wrong state: paymentRequestLifecycleStatus maps ACCEPTED to wallet__payment_request_pending, whose value is pending, so the scoped matcher on PaymentRequestRow-accepted asserts the real status rather than a coincidental match from the outgoing row. Scoping by hasAnyAncestor(hasTestTag(...)) also removes the two-match ambiguity of the old onNodeWithText("pending").
  • Refund amount mismatch: the fixture deposit is 50_000_001u at 6 decimals, so 50,000001 USDT is the exact localized value; the old 50,00 substring would also have matched a truncated amount, so the new assertion is strictly tighter.
  • Fixture weakening the funding-lock check: fundingOptions gains 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 jvsena42 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No findings. Test-only change: six instrumentation cases realigned with the post-USDT UI.

Checked at 55b0a47:

  • CreatePaymentRequestScreenTest: SystemClock.sleep(600) waits on the same uptimeMillis clock ClickDebouncer compares against its 500 ms window, so the re-select is not swallowed.
  • PaymentRequestsScreenTest: paymentRequestLifecycleStatus (PaymentRequestsScreen.kt:504) renders ACCEPTED as wallet__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 USDT is the exact 6-decimal value of the 50_000_001 fixture; tighter than the old 50,00 substring.
  • UsdtPaymentContentTest: assertIsDisplayed() before the click keeps the visibility check that performScrollTo used 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.

@piotr-iohk
piotr-iohk merged commit 5fafca8 into master Oct 15, 2026
36 checks passed
@piotr-iohk
piotr-iohk deleted the test/usdt-ui-regressions-20261015 branch October 15, 2026 13:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants