51 lines
992 B
VHS
51 lines
992 B
VHS
# VHS E2E test for lazygitclj - File staging/unstaging
|
|
# Tests staging and unstaging files (like lazygit's space key)
|
|
|
|
Output test/e2e/output/staging.gif
|
|
Output test/e2e/output/staging.ascii
|
|
|
|
Require bb
|
|
|
|
Set Shell "bash"
|
|
Set FontSize 14
|
|
Set Width 1000
|
|
Set Height 600
|
|
Set Framerate 10
|
|
|
|
# Setup test repo and run lazygitclj
|
|
Type "cd /home/ajet/repos/lazygitclj && bb e2e:setup /tmp/lazygitclj-e2e-stage && cd /tmp/lazygitclj-e2e-stage && bb --config /home/ajet/repos/lazygitclj/bb.edn start"
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# Should be on Files panel with some staged and unstaged files
|
|
# Move to the staged file and unstage it with space
|
|
Type " "
|
|
Sleep 500ms
|
|
|
|
# Move down to an unstaged file
|
|
Type "j"
|
|
Sleep 500ms
|
|
|
|
# Stage it with space
|
|
Type " "
|
|
Sleep 500ms
|
|
|
|
# Stage all with 'a' (like lazygit)
|
|
Type "a"
|
|
Sleep 500ms
|
|
|
|
# Move to a file and discard changes with 'd'
|
|
Type "j"
|
|
Sleep 500ms
|
|
Type "d"
|
|
Sleep 500ms
|
|
|
|
# Quit
|
|
Type "q"
|
|
Sleep 1s
|
|
|
|
# Cleanup test repo
|
|
Type "rm -rf /tmp/lazygitclj-e2e-stage"
|
|
Enter
|
|
Sleep 500ms
|