Skip to content

fix: best-effort dismiss of Background Payments intro sheet - #237

Open
piotr-iohk wants to merge 2 commits into
mainfrom
fix/724-lock-on-background
Open

piotr-iohk wants to merge 2 commits into
mainfrom
fix/724-lock-on-background

Conversation

@piotr-iohk

@piotr-iohk piotr-iohk commented Sep 18, 2026

Copy link
Copy Markdown
Collaborator

TL;DR

Rebased onto latest main after #233 and #235. Same unique helper as #234 / #241: best-effort dismissBackgroundPaymentsTimedSheet so a missing Background Payments intro does not fail the Android send shard.

Companion app branch: fix/724-lock-on-background (bitkit-android#1298).

Why

Android merge-gate E2E failed only on e2e-tests-local - send for synonymdev/bitkit-android#1298 (require pin when app resumes):

https://github.com/synonymdev/bitkit-android/actions/runs/35354117340

Error 3/3: element BackgroundPaymentsIntro-later still not displayed after 30000ms in dismissBackgroundPaymentsTimedSheet, called from send.e2e.ts @send_2. Product changes are unrelated. Same-named harness branch so determine-e2e-branch picks this up.

Change

Soften dismissBackgroundPaymentsTimedSheet to a waitForToastBestEffort-style poll:

  • If the intro is shown, still tap Later / Cancel so remaining coverage runs on an unobstructed home.
  • If the sheet is missing or auto-dismissed, log and continue instead of failing the spec.
  • Use triggerTimedSheetUnlessPresent so we do not HeaderMenu-trigger over an already-visible sheet.

Conflict resolution: kept this PR’s best-effort poll; dropped main’s leftover #235 hard-wait body. Settings toast soft-wait is already on main (#233) and was not part of this PR.

Test plan

  • eslint + tsc --noEmit on test/helpers/actions.ts
  • Re-run Android e2e-tests-local - send on android#1298 after this rebase (no emulator in this environment)
Open in Web Open in Cursor 

Hard-waiting on BackgroundPaymentsIntro-later flakes the Android send shard when the timed sheet is already gone or auto-dismissed. Poll like waitForToastBestEffort and still dismiss Later/Cancel when the intro is shown.

Co-authored-by: piotr-iohk <piotr-iohk@users.noreply.github.com>
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
(cherry picked from commit 9b95a97)
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.

3 participants