From 479466a9a17fcaeb7c71f0feb8aac983b5853cb7 Mon Sep 17 00:00:00 2001 From: Henrique Velloso Date: Wed, 18 Feb 2026 20:42:38 -0300 Subject: [PATCH] Refine installation flows for older versions and update verifications - Updated dialog handling in `install_older_version.yaml` to use more specific phrases for better accuracy in detecting installation prompts. - Increased timeout durations for various dialog waits to improve reliability during installations. - Enhanced the visibility checks in `verify_and_update_all.yaml` to ensure the "All done" banner is correctly identified after updates. --- maestro/flows/install_older_version.yaml | 56 ++++++++++++------------ maestro/flows/verify_and_update_all.yaml | 6 +-- 2 files changed, 31 insertions(+), 31 deletions(-) diff --git a/maestro/flows/install_older_version.yaml b/maestro/flows/install_older_version.yaml index 6756aa0..eda413f 100644 --- a/maestro/flows/install_older_version.yaml +++ b/maestro/flows/install_older_version.yaml @@ -49,28 +49,13 @@ appId: dev.zapstore.app index: 1 label: "Install older version" -# Wait for the first dialog to appear. Could be: -# - Android system "Update" (if app package was previously known) -# - Amber "Accept" (signing request) -# - Samsung "Trust and install app" -# - Android system "Install" +# Wait for the first dialog to appear. +# Use specific dialog phrases to avoid matching background "Install" buttons +# in the All Versions list. - extendedWaitUntil: visible: - text: "(?:Update|Accept|Trust and install app|Install)" - timeout: 20000 - -# Handle Android system update/downgrade confirmation -- runFlow: - when: - visible: "Update" - commands: - - tapOn: "Update" - -# After Update (or if it was skipped), wait for the next dialog -- extendedWaitUntil: - visible: - text: "(?:Accept|Trust and install app|Install)" - timeout: 20000 + text: "(?:Do you want to update|Do you want to install|Accept|Trust and install app)" + timeout: 60000 # Amber may ask to sign a request during install - runFlow: @@ -78,6 +63,10 @@ appId: dev.zapstore.app visible: "Accept" commands: - tapOn: "Accept" + - extendedWaitUntil: + visible: + text: "(?:Do you want to update|Do you want to install|Trust and install app)" + timeout: 30000 # Samsung security dialog (may not appear if source already trusted) - runFlow: @@ -85,15 +74,26 @@ appId: dev.zapstore.app visible: "Trust and install app" commands: - tapOn: "Trust and install app" + - extendedWaitUntil: + visible: + text: "(?:Do you want to update|Do you want to install)" + timeout: 30000 -# Android system install dialog -- extendedWaitUntil: - visible: "Install" - timeout: 20000 -- tapOn: "Install" +# Handle Android system install dialog +- runFlow: + when: + visible: "Do you want to install" + commands: + - tapOn: "Install" -# Wait for either "Open" (success) or Samsung "package analysis error" dialog. -# The dialog covers "Open" so we must detect and dismiss it first. +# Handle Android system update/downgrade dialog +- runFlow: + when: + visible: "Do you want to update" + commands: + - tapOn: "Update" + +# Wait for either "App installed" / "Open" or Samsung "package analysis error". - extendedWaitUntil: visible: text: "(?:Open|OK)" @@ -109,4 +109,4 @@ appId: dev.zapstore.app # Confirm install completed - extendedWaitUntil: visible: "Open" - timeout: 15000 + timeout: 30000 diff --git a/maestro/flows/verify_and_update_all.yaml b/maestro/flows/verify_and_update_all.yaml index 10a3d01..a24b1ed 100644 --- a/maestro/flows/verify_and_update_all.yaml +++ b/maestro/flows/verify_and_update_all.yaml @@ -52,9 +52,9 @@ appId: dev.zapstore.app text: ".*Update All.*" label: "Tap Update All" -# Wait for either the "All done (N updated)" banner or the "Up to date" section -# (the banner auto-dismisses after a few seconds) +# Wait for the "All done (N updated)" banner. +# Regex must consume the full accessibilityText including the trailing ")". - extendedWaitUntil: visible: - text: "(?:All done.*updated|Up to date)" + text: ".*All done.*updated.*" timeout: 180000