appId:  com.cosmonautical.jellify
---
# Navigate to the home screen
- assertVisible:
    id: "home-tab-button"

- tapOn:
    id: "home-tab-button"

# Wait for home content to load
- waitForAnimationToEnd

# Try recently played first, fall back to other content
- tapOn:
    id: "recently-played-0"
    optional: true

# If no recently played, try discover tab to find content
- tapOn:
    id: "discover-tab-button"
    optional: true

- tapOn:
    id: "discover-recently-added-0"
    optional: true

# Go back to home
- tapOn:
    id: "home-tab-button"

# Take screenshot regardless of miniplayer state
- takeScreenshot: screenshots/12_home_playback_state

# Check if miniplayer is visible (optional for now)
- assertVisible:   
    id: "miniplayer-test-id"
    optional: true

# If miniplayer is visible, proceed with player tests
- tapOn:   
    id: "miniplayer-test-id"
    optional: true

# Wait for player to open
- waitForAnimationToEnd

# Take screenshot of player screen if open
- takeScreenshot: screenshots/13_player_state

# Try to interact with pause button if visible
- tapOn:
    id: "pause-button-test-id"
    optional: true

# Take screenshot after pause attempt
- takeScreenshot: screenshots/14_player_paused_state

# Try play button
- tapOn:
    id: "play-button-test-id"
    optional: true

# Try to access queue
- tapOn:
    id: 'queue-button-test-id'
    optional: true

# Take screenshot of queue if visible
- takeScreenshot: screenshots/15_queue_view

# Try scrolling in queue
- scroll

# Try to go back
- pressKey: BACK

# Take screenshot of post-player state
- takeScreenshot: screenshots/16_post_player

# Go back to home
- tapOn:
    id: "home-tab-button"