# VHS E2E test for lazygitclj - Branches panel tabs
# Tests tab switching between Local, Remotes, and Tags ([ and ] keys)

Output test/e2e/output/branches-tabs.gif
Output test/e2e/output/branches-tabs.ascii

Require bb

Set Shell "bash"
Set FontSize 14
Set Width 1000
Set Height 600
Set Framerate 10

# Setup test repo with tags and run lazygitclj
Type "./test/e2e/setup-test-repo.sh /tmp/lazygitclj-e2e-branches-tabs && cd /tmp/lazygitclj-e2e-branches-tabs && git tag v1.0.0 && bb --config /home/ajet/repos/lazygitclj/bb.edn start"
Enter
Sleep 2s

# Switch to branches panel with '3'
Type "3"
Sleep 500ms

# Should show [Local] | Remotes | Tags tab indicator
# Switch to Remotes tab with ']'
Type "]"
Sleep 500ms

# Should show Local | [Remotes] | Tags
# Note: No remote branches in test repo, so empty
# Switch to Tags with ']' again
Type "]"
Sleep 500ms

# Should show Local | Remotes | [Tags] with v1.0.0 tag
Type "j"
Sleep 500ms

# Switch back to Local with '['
Type "["
Sleep 500ms
Type "["
Sleep 500ms

# Should be back on Local tab
# Quit
Type "q"
Sleep 1s
