From 912cd57f91d7ba5b83fb3fe7eebbf1de18803dff Mon Sep 17 00:00:00 2001 From: skalthoff <32023561+skalthoff@users.noreply.github.com> Date: Fri, 16 Jan 2026 13:39:41 -0800 Subject: [PATCH] fix(maestro): comprehensive reliability improvements for parallel test runs Search test (3-search.yaml): - Increase timeout from 15s to 45s for server load handling - Wait for 'Results' text first (more reliable indicator) - Add waits after typing to ensure search initiates - Add launchApp recovery Quick actions test (6-quickactions.yaml): - Increase search-input timeout from 10s to 20s - Add waitForAnimationToEnd before navigation - Increase search results timeout to 30s - Add explicit waits for stability All tests: - Add launchApp: stopApp: false for crash recovery - Increase standard timeouts from 10s to 15s - Login test: increase library selection timeout to 30s --- maestro/tests/1-login.yaml | 4 +-- maestro/tests/2-library.yaml | 6 +++- maestro/tests/3-search.yaml | 53 +++++++++++++++++++++++++------ maestro/tests/4-musicplayer.yaml | 6 +++- maestro/tests/5-discover.yaml | 6 +++- maestro/tests/6-quickactions.yaml | 23 +++++++++++--- 6 files changed, 80 insertions(+), 18 deletions(-) diff --git a/maestro/tests/1-login.yaml b/maestro/tests/1-login.yaml index aaa1c025..f0c2ff07 100644 --- a/maestro/tests/1-login.yaml +++ b/maestro/tests/1-login.yaml @@ -88,11 +88,11 @@ appId: com.cosmonautical.jellify id: "library_selection_screen" timeout: 30000 -# Wait for library list to populate +# Wait for library list to populate (longer timeout for slow server responses) - extendedWaitUntil: visible: text: "Royalty Free Music" - timeout: 15000 + timeout: 30000 # Take screenshot of library selection - takeScreenshot: screenshots/03_library_selection diff --git a/maestro/tests/2-library.yaml b/maestro/tests/2-library.yaml index b8955e33..4d5445e4 100644 --- a/maestro/tests/2-library.yaml +++ b/maestro/tests/2-library.yaml @@ -1,11 +1,15 @@ appId: com.cosmonautical.jellify --- +# Ensure app is running +- launchApp: + stopApp: false + # Wait for app to be ready, then navigate to Library tab # Use extendedWaitUntil for reliability - extendedWaitUntil: visible: id: "library-tab-button" - timeout: 10000 + timeout: 15000 - tapOn: id: "library-tab-button" diff --git a/maestro/tests/3-search.yaml b/maestro/tests/3-search.yaml index f6c47c9c..39f85e63 100644 --- a/maestro/tests/3-search.yaml +++ b/maestro/tests/3-search.yaml @@ -1,34 +1,69 @@ appId: com.cosmonautical.jellify --- -- assertVisible: - id: "search-tab-button" +# Search Test +# Tests the search functionality including artist and track results + +# Ensure app is running +- launchApp: + stopApp: false + +# Navigate to search tab with robust wait +- extendedWaitUntil: + visible: + id: "search-tab-button" + timeout: 15000 - tapOn: id: "search-tab-button" +# Wait for search screen to be ready +- extendedWaitUntil: + visible: + id: "search-input" + timeout: 15000 + # Take screenshot of empty search screen - takeScreenshot: screenshots/09_search_empty -- assertVisible: - id: "search-input" - +# Focus and type search term - tapOn: id: "search-input" - + +# Small wait to ensure input is focused +- wait: 500 + - inputText: "Otis McDonald" - hideKeyboard +# Wait for typing to complete and search to initiate +- wait: 2000 + # Wait for search results to load -# Note: Search has a 1-second debounce + API latency, so we need extendedWaitUntil +# Using longer timeout (45s) to handle server load from parallel tests +# First check for "Results" header which appears when ANY results come back - extendedWaitUntil: visible: - id: "artist-search-result-0" - timeout: 15000 + text: "Results" + timeout: 45000 # Take screenshot of search results - takeScreenshot: screenshots/10_search_results + +# Now check for artist result (should exist for "Otis McDonald") +# Using extendedWaitUntil with shorter timeout since results already loaded +- extendedWaitUntil: + visible: + id: "artist-search-result-0" + timeout: 5000 + - tapOn: id: "artist-search-result-0" +# Wait for artist screen to load +- extendedWaitUntil: + visible: + text: "Otis McDonald" + timeout: 10000 + # Take screenshot of artist from search - takeScreenshot: screenshots/11_artist_from_search diff --git a/maestro/tests/4-musicplayer.yaml b/maestro/tests/4-musicplayer.yaml index 1325e5da..ffa2db04 100644 --- a/maestro/tests/4-musicplayer.yaml +++ b/maestro/tests/4-musicplayer.yaml @@ -1,11 +1,15 @@ appId: com.cosmonautical.jellify --- +# Ensure app is running +- launchApp: + stopApp: false + # Navigate to the home screen # Use extendedWaitUntil for reliability after extended test runs - extendedWaitUntil: visible: id: "home-tab-button" - timeout: 10000 + timeout: 15000 - tapOn: id: "home-tab-button" diff --git a/maestro/tests/5-discover.yaml b/maestro/tests/5-discover.yaml index 4c30024a..0aace101 100644 --- a/maestro/tests/5-discover.yaml +++ b/maestro/tests/5-discover.yaml @@ -1,11 +1,15 @@ appId: com.cosmonautical.jellify --- +# Ensure app is running +- launchApp: + stopApp: false + # Wait for app to be ready, then navigate to Discover tab # Use extendedWaitUntil for reliability after extended test runs - extendedWaitUntil: visible: id: "discover-tab-button" - timeout: 10000 + timeout: 15000 - tapOn: id: "discover-tab-button" diff --git a/maestro/tests/6-quickactions.yaml b/maestro/tests/6-quickactions.yaml index badeec69..8afaeeab 100644 --- a/maestro/tests/6-quickactions.yaml +++ b/maestro/tests/6-quickactions.yaml @@ -192,28 +192,43 @@ appId: com.cosmonautical.jellify - waitForAnimationToEnd # Test quick actions in Search tab +# First ensure we're in a stable state +- waitForAnimationToEnd + +- extendedWaitUntil: + visible: + id: "search-tab-button" + timeout: 15000 + - tapOn: id: "search-tab-button" -# Wait for search screen +# Wait for navigation to complete +- wait: 1000 + +# Wait for search screen with longer timeout (app may be slow after extended testing) - extendedWaitUntil: visible: id: "search-input" - timeout: 10000 + timeout: 20000 # Type a search query using the testID - tapOn: id: "search-input" +- wait: 500 + - inputText: "music" - hideKeyboard +- wait: 2000 + # Wait for search results with proper timeout for debounce + API latency - extendedWaitUntil: visible: - id: "track-item-0" - timeout: 15000 + text: "Results" + timeout: 30000 optional: true # Scroll down to see more results