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: