From 1d47d0bba2b29f5a0a5894a36fc86e842cb2c81d Mon Sep 17 00:00:00 2001 From: Brandon McAnsh Date: Wed, 5 Aug 2026 11:03:27 -0400 Subject: [PATCH] fix(maestro): correct give-button label and sheet dismissal MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Two pre-existing flow failures on code/cash, unrelated to the beta-flag work: - The give nav button renders "Cash" (GiveButtonLabel.Cash / action_cash), not "Give", so pull_out_bill's `tapOn: Give` never matched. Tap "Cash". - close_open_sheet swiped down once and asserted the scanner, but a destination opened inside a sheet (wallet -> token info) is pushed onto that sheet's own nav stack, so one dismiss only pops a layer. Press Back until the scanner (the root behind the single sheet) is revealed — bounded and guarded so it can't hang CI or back out of the app. This fixes open_token_info_deeplink, which also drops its unasserted (silently no-op) deeplink reopen. Note: claim_cashlink and show_bill_and_put_back_in_wallet now tap Cash correctly but still require an account with a giveable balance (the give flow otherwise shows a deposit/discover prompt instead of the amount keypad) — a provisioning dependency like send_to_contact. --- maestro/helpers/close_open_sheet.yaml | 26 +++++++++++++++++++++----- maestro/open_token_info_deeplink.yaml | 24 +++++++++++++++--------- maestro/subflows/pull_out_bill.yaml | 4 +++- 3 files changed, 39 insertions(+), 15 deletions(-) diff --git a/maestro/helpers/close_open_sheet.yaml b/maestro/helpers/close_open_sheet.yaml index 00c9579f5..31d312b23 100644 --- a/maestro/helpers/close_open_sheet.yaml +++ b/maestro/helpers/close_open_sheet.yaml @@ -1,7 +1,23 @@ appId: com.flipcash.app.android --- -- swipe: - direction: DOWN -- extendedWaitUntil: - visible: - id: scanner_screen +# Return to the scanner, which is always the root behind the single open sheet. Opening a +# destination inside a sheet (e.g. wallet -> token info) pushes it onto that sheet's own nav +# stack, so one dismiss only pops a layer. Press Back until the scanner is revealed: each +# Back pops the sheet's nav stack and the final one dismisses the sheet itself. +# +# Bounded (times) rather than an open while-loop so a stuck sheet can't hang CI, and each +# Back is guarded on the scanner not already showing — so it's a safe no-op on a clean home +# screen and never backs out of the app once the scanner is reached. +- repeat: + times: 5 + commands: + - runFlow: + when: + notVisible: + id: scanner_screen + commands: + - pressKey: Back + - waitForAnimationToEnd: + timeout: 1500 +- assertVisible: + id: scanner_screen diff --git a/maestro/open_token_info_deeplink.yaml b/maestro/open_token_info_deeplink.yaml index c47537f17..4ad60cd05 100644 --- a/maestro/open_token_info_deeplink.yaml +++ b/maestro/open_token_info_deeplink.yaml @@ -1,16 +1,22 @@ appId: com.flipcash.app.android +name: "Token Info deeplink → opens & dismisses to scanner" +tags: + - tokens --- +# A token deeplink opens the token-info screen (pushed into a sheet's nav stack over the +# scanner) and can be dismissed cleanly back to the scanner. Re-firing the same deeplink is +# a no-op (the app dedupes it), so this verifies the open + dismiss, which is the meaningful +# path. - runFlow: subflows/login_with_deeplink.yaml -- runFlow: - file: helpers/launch_deeplink.yaml - env: + +- runFlow: + file: helpers/launch_deeplink.yaml + env: deeplink: https://app.flipcash.com/token/5APqK9YUZupKt7rRUrpYy6WV3RPuxA71ZtKJffDUMdPP - extendedWaitUntil: - visible: + visible: id: token_info_screen + timeout: 8000 + +# Dismiss the sheet back to the scanner (unwinds the sheet's nav stack, then dismisses it). - runFlow: helpers/close_open_sheet.yaml -- pressKey: home -- runFlow: - file: helpers/launch_deeplink.yaml - env: - deeplink: https://app.flipcash.com/token/5APqK9YUZupKt7rRUrpYy6WV3RPuxA71ZtKJffDUMdPP diff --git a/maestro/subflows/pull_out_bill.yaml b/maestro/subflows/pull_out_bill.yaml index d2634eac3..5af5fed1a 100644 --- a/maestro/subflows/pull_out_bill.yaml +++ b/maestro/subflows/pull_out_bill.yaml @@ -1,7 +1,9 @@ appId: com.flipcash.app.android --- - runFlow: ../helpers/close_open_sheet.yaml -- tapOn: Give +# The give/cash nav button's label is config-driven (GiveButtonLabel: "Give" or "Cash"); +# it currently renders "Cash" (action_cash). +- tapOn: Cash - extendedWaitUntil: visible: Float - extendedWaitUntil: