63 lines
1.2 KiB
VHS
63 lines
1.2 KiB
VHS
# VHS E2E test for lazygitclj - Reset options menu
|
|
# Tests reset options (D key opens reset menu)
|
|
|
|
Output test/e2e/output/reset-menu.gif
|
|
Output test/e2e/output/reset-menu.ascii
|
|
|
|
Require bb
|
|
|
|
Set Shell "bash"
|
|
Set FontSize 14
|
|
Set Width 1000
|
|
Set Height 600
|
|
Set Framerate 10
|
|
|
|
# Setup test repo with changes and run lazygitclj
|
|
Type "cd /home/ajet/repos/lazygitclj && bb e2e:setup /tmp/lazygitclj-e2e-reset && cd /tmp/lazygitclj-e2e-reset && bb --config /home/ajet/repos/lazygitclj/bb.edn start"
|
|
Enter
|
|
Sleep 2s
|
|
|
|
# Open reset options menu with 'D'
|
|
Type "D"
|
|
Sleep 1s
|
|
|
|
# Menu should show:
|
|
# s - Soft reset (uncommit, keep staged)
|
|
# m - Mixed reset (uncommit, unstage)
|
|
# h - Hard reset (discard all)
|
|
# u - Unstage all staged changes
|
|
# d - Discard all unstaged changes
|
|
# c - Clean untracked files
|
|
|
|
# Cancel with escape
|
|
Escape
|
|
Sleep 500ms
|
|
|
|
# Open menu again and unstage all with 'u'
|
|
Type "D"
|
|
Sleep 500ms
|
|
Type "u"
|
|
Sleep 1s
|
|
|
|
# All staged files should now be unstaged
|
|
# Verify in files panel
|
|
Type "j"
|
|
Sleep 500ms
|
|
|
|
# Open reset menu again to discard unstaged
|
|
Type "D"
|
|
Sleep 500ms
|
|
Type "d"
|
|
Sleep 1s
|
|
|
|
# Modified files should be clean now (only untracked remain)
|
|
|
|
# Quit
|
|
Type "q"
|
|
Sleep 1s
|
|
|
|
# Cleanup test repo
|
|
Type "rm -rf /tmp/lazygitclj-e2e-reset"
|
|
Enter
|
|
Sleep 500ms
|