Add VHS e2e tests and output recordings

Includes test tapes for navigation, branch operations, stash operations,
help panel, commits, and cursor navigation. Resolved stash conflicts by
keeping simpler test versions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
2026-01-22 11:01:11 -05:00
parent 99a3970f17
commit 2657545018
77 changed files with 22900 additions and 112 deletions
+696
View File
@@ -0,0 +1,696 @@
>
────────────────────────────────────────────────────────────────────────────────
>
────────────────────────────────────────────────────────────────────────────────
>
────────────────────────────────────────────────────────────────────────────────
>
────────────────────────────────────────────────────────────────────────────────
>
────────────────────────────────────────────────────────────────────────────────
>
────────────────────────────────────────────────────────────────────────────────
> ./test/e2e/setup-test-repo.sh /tmp/lazygitclj-e2e-modal && cd /tmp/lazygitclj-e2e-modal && bb
--config /home/ajet/repos/lazygitclj/bb.edn start
────────────────────────────────────────────────────────────────────────────────
> ./test/e2e/setup-test-repo.sh /tmp/lazygitclj-e2e-modal && cd /tmp/lazygitclj-e2e-modal && bb
--config /home/ajet/repos/lazygitclj/bb.edn start
Initialized empty Git repository in /tmp/lazygitclj-e2e-modal/.git/
[main (root-commit) 95bc2ab] Initial commit
3 files changed, 3 insertions(+)
create mode 100644 README.md
create mode 100644 file1.txt
create mode 100644 file2.txt
Switched to a new branch 'feature-branch'
[feature-branch ffa41af] Feature work
1 file changed, 1 insertion(+)
Switched to branch 'main'
Test repo created at /tmp/lazygitclj-e2e-modal
- main branch with 1 commit
- feature-branch with 1 extra commit
- 1 staged file (file2.txt)
- 1 unstaged file (file1.txt)
- 1 untracked file (newfile.txt)
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────────────┐ ┌─ 0 Main ─────────────────────────────────────────────────────┐
│ main → 95bc2ab │ │ diff --git a/file2.txt b/file2.txt │
└────────────────────────────┘ │ index a29bdeb..723650f 100644 │
╔═ 2 Files (3) ══════════════╗ │ --- a/file2.txt │
║ M file2.txt ║ │ +++ b/file2.txt │
║ M file1.txt ║ │ @@ -1 +1,2 @@ │
║ ?? newfile.txt ║ │ line1 │
║ ║ │ +staged content │
╚════════════════════════════╝ │ │
┌─ 3 Branches [L] R T ───────┐ │ │
│ feature-branch │ │ │
│ * main │ │ │
│ │ │ │
│ │ │ │
└────────────────────────────┘ │ │
┌─ 4 Commits [C] R ──────────┐ │ │
│ 95bc2ab Initial commit │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
└────────────────────────────┘ │ │
┌─ 5 Stash (0) ──────────────┐ │ │
│ No stashes │ │ │
│ │ └──────────────────────────────────────────────────────────────┘
│ │ ┌─ Command Log ────────────────────────────────────────────────┐
│ │ │ │
└────────────────────────────┘ │ │
└──────────────────────────────────────────────────────────────┘
q:quit ?:help h/l:panels j/k:nav spc:stage a:all c:commit p/P:pull/push
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────────────┐ ┌─ 0 Main ─────────────────────────────────────────────────────┐
│ main → 95bc2ab │ │ │
└────────────────────────────┘ │ │
┌─ 2 Files (3) ──────────────┐ │ │
│ M file2.txt │ │ │
│ M file1.txt │ │ │
│ ?? newfile.txt │ │ │
│ │ │ │
└────────────────────────────┘ │ │
╔═ 3 Branches [L] R T ═══════╗ │ │
║ feature-branch ║ │ │
║ * main ║ │ │
║ ║ │ │
║ ║ │ │
╚════════════════════════════╝ │ │
┌─ 4 Commits [C] R ──────────┐ │ │
│ 95bc2ab Initial commit │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
└────────────────────────────┘ │ │
┌─ 5 Stash (0) ──────────────┐ │ │
│ No stashes │ │ │
│ │ └──────────────────────────────────────────────────────────────┘
│ │ ┌─ Command Log ────────────────────────────────────────────────┐
│ │ │ │
└────────────────────────────┘ │ │
└──────────────────────────────────────────────────────────────┘
q:quit ?:help h/l:panels j/k:nav []:tabs n:new d:del p/P:pull/push
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────────────┐ ┌─ 0 Main ─────────────────────────────────────────────────────┐
│ main → 95bc2ab │ │ │
└────────────────────────────┘ │ │
┌─ 2 Files (3) ──────────────┐ │ │
│ M file2.txt │ │ │
│ M file1.txt │ │ │
│ ?? newfile.txt │ │ │
│ │ │ │
└────────────────────────────┘ │ │
╔═ 3 Branches [L] R T ═══════╗ │ │
║ feature-branch ║ │ │
║ * main ║ │ │
║ ║ │ │
║ ║ │ │
╚════════════════════════════╝ │ │
┌─ 4 Commits [C] R ──────────┐ │ │
│ 95bc2ab Initial commit │ │ │
│ │ │ │
│ │ │ │
│ │ │ │
└────────────────────────────┘ │ │
┌─ 5 Stash (0) ──────────────┐ │ │
│ No stashes │ │ │
│ │ └──────────────────────────────────────────────────────────────┘
│ │ ┌─ Command Log ────────────────────────────────────────────────┐
│ │ │ │
└────────────────────────────┘ │ │
└──────────────────────────────────────────────────────────────┘
q:quit ?:help h/l:panels j/k:nav []:tabs n:new d:del p/P:pull/push
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────────────┐ ┌─ 0 Main ─────────────────────────────────────────────────────┐
│ main → 95bc2ab │ │ commit 95bc2abf2b2afa44d77bb468eabbc44e550b85f4 │
└────────────────────────────┘ │ Author: Test User <test@example.com> │
┌─ 2 Files (3) ──────────────┐ │ Date: Wed Jan 21 17:54:56 2026 -0500 │
│ M file2.txt │ │ │
│ M file1.txt │ │ Initial commit │
│ ?? newfile.txt │ │ --- │
│ │ │ README.md | 1 + │
└────────────────────────────┘ │ file1.txt | 1 + │
┌─ 3 Branches [L] R T ───────┐ │ file2.txt | 1 + │
│ feature-branch │ │ 3 files changed, 3 insertions(+) │
│ * main │ │ │
│ │ │ diff --git a/README.md b/README.md │
│ │ │ new file mode 100644 │
└────────────────────────────┘ │ index 0000000..181e1c3 │
╔═ 4 Commits [C] R ══════════╗ │ --- /dev/null │
║ 95bc2ab Initial commit ║ │ +++ b/README.md │
║ ║ │ @@ -0,0 +1 @@ │
║ ║ │ +# Test Project │
║ ║ │ diff --git a/file1.txt b/file1.txt │
╚════════════════════════════╝ │ new file mode 100644 │
┌─ 5 Stash (0) ──────────────┐ │ index 0000000..a29bdeb │
│ No stashes │ │ --- /dev/null │
│ │ └──────────────────────────────────────────────────────────────┘
│ │ ┌─ Command Log ────────────────────────────────────────────────┐
│ │ │ │
└────────────────────────────┘ │ │
└──────────────────────────────────────────────────────────────┘
q:quit ?:help h/l:panels j/k:nav []:tabs spc:checkout p/P:pull/push
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────────────┐ ┌─ 0 Main ─────────────────────────────────────────────────────┐
│ main → 95bc2ab │ │ commit 95bc2abf2b2afa44d77bb468eabbc44e550b85f4 │
└────────────────────────────┘ │ Author: Test User <test@example.com> │
┌─ 2 Files (3) ──────────────┐ │ Date: Wed Jan 21 17:54:56 2026 -0500 │
│ M file2.txt │ │ │
│ M file1.txt │ │ Initial commit │
│ ?? newfile.txt │ │ --- │
│ │ │ README.md | 1 + │
└────────────────────────────┘ │ file1.txt | 1 + │
┌─ 3 Branches [L] R T ───────┐ │ file2.txt | 1 + │
│ feature-branch │ │ 3 files changed, 3 insertions(+) │
│ * main │ │ │
│ │ │ diff --git a/README.md b/README.md │
│ │ │ new file mode 100644 │
└────────────────────────────┘ │ index 0000000..181e1c3 │
╔═ 4 Commits [C] R ══════════╗ │ --- /dev/null │
║ 95bc2ab Initial commit ║ │ +++ b/README.md │
║ ║ │ @@ -0,0 +1 @@ │
║ ║ │ +# Test Project │
║ ║ │ diff --git a/file1.txt b/file1.txt │
╚════════════════════════════╝ │ new file mode 100644 │
┌─ 5 Stash (0) ──────────────┐ │ index 0000000..a29bdeb │
│ No stashes │ │ --- /dev/null │
│ │ └──────────────────────────────────────────────────────────────┘
│ │ ┌─ Command Log ────────────────────────────────────────────────┐
│ │ │ │
└────────────────────────────┘ │ │
└──────────────────────────────────────────────────────────────┘
q:quit ?:help h/l:panels j/k:nav []:tabs spc:checkout p/P:pull/push
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────╔═ Help - Keybindings ══════════════════════════════╗────────────────────┐
│ main → 95bc2ab ║ Global: ║0b85f4 │
└────────────────────║ q - Quit r - Refresh ║ │
┌─ 2 Files (3) ──────║ h/l - Prev/Next panel 2-5 - Jump to panel ║ │
│ M file2.txt ║ j/k - Move down/up z/Z - Undo/Redo ║ │
│ M file1.txt ║ p - Pull P - Push ║ │
│ ?? newfile.txt ║ ? - Help D - Reset options ║ │
│ ║ ║ │
└────────────────────║ Files (2): ║ │
┌─ 3 Branches [L] R T║ space - Stage/unstage a - Stage all ║ │
│ feature-branch ║ c - Commit d - Discard file ║ │
│ * main ║ s - Quick stash S - Stash options ║ │
│ ║ ║ │
│ ║ Branches (3): ║ │
└────────────────────║ [/] - Switch tabs enter - Checkout ║ │
╔═ 4 Commits [C] R ══║ n - New branch d - Delete branch ║ │
║ 95bc2ab Initial com║ R - Rename M - Merge ║ │
║ ║ f - Fast-forward ║ │
║ ║ ║ │
║ ║ Commits (4): ║ │
╚════════════════════║ [/] - Switch tabs space - Checkout ║ │
┌─ 5 Stash (0) ──────║ g - Reset to C - Cherry-pick ║ │
│ No stashes ║ t - Revert r - Reword (HEAD only) ║ │
│ ║ y - Show SHA ║────────────────────┘
│ ║ ║────────────────────┐
│ ║ Stash (5): ║ │
└────────────────────║ space - Apply g - Pop (apply+drop) ║ │
║ d - Drop n - Branch from stash ║────────────────────┘
q:quit ?:help h/l:pan║ ║
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────╔═ Help - Keybindings ══════════════════════════════╗────────────────────┐
│ main → 95bc2ab ║ Global: ║0b85f4 │
└────────────────────║ q - Quit r - Refresh ║ │
┌─ 2 Files (3) ──────║ h/l - Prev/Next panel 2-5 - Jump to panel ║ │
│ M file2.txt ║ j/k - Move down/up z/Z - Undo/Redo ║ │
│ M file1.txt ║ p - Pull P - Push ║ │
│ ?? newfile.txt ║ ? - Help D - Reset options ║ │
│ ║ ║ │
└────────────────────║ Files (2): ║ │
┌─ 3 Branches [L] R T║ space - Stage/unstage a - Stage all ║ │
│ feature-branch ║ c - Commit d - Discard file ║ │
│ * main ║ s - Quick stash S - Stash options ║ │
│ ║ ║ │
│ ║ Branches (3): ║ │
└────────────────────║ [/] - Switch tabs enter - Checkout ║ │
╔═ 4 Commits [C] R ══║ n - New branch d - Delete branch ║ │
║ 95bc2ab Initial com║ R - Rename M - Merge ║ │
║ ║ f - Fast-forward ║ │
║ ║ ║ │
║ ║ Commits (4): ║ │
╚════════════════════║ [/] - Switch tabs space - Checkout ║ │
┌─ 5 Stash (0) ──────║ g - Reset to C - Cherry-pick ║ │
│ No stashes ║ t - Revert r - Reword (HEAD only) ║ │
│ ║ y - Show SHA ║────────────────────┘
│ ║ ║────────────────────┐
│ ║ Stash (5): ║ │
└────────────────────║ space - Apply g - Pop (apply+drop) ║ │
║ d - Drop n - Branch from stash ║────────────────────┘
q:quit ?:help h/l:pan║ ║
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────╔═ Help - Keybindings ══════════════════════════════╗────────────────────┐
│ main → 95bc2ab ║ Global: ║0b85f4 │
└────────────────────║ q - Quit r - Refresh ║ │
┌─ 2 Files (3) ──────║ h/l - Prev/Next panel 2-5 - Jump to panel ║ │
│ M file2.txt ║ j/k - Move down/up z/Z - Undo/Redo ║ │
│ M file1.txt ║ p - Pull P - Push ║ │
│ ?? newfile.txt ║ ? - Help D - Reset options ║ │
│ ║ ║ │
└────────────────────║ Files (2): ║ │
┌─ 3 Branches [L] R T║ space - Stage/unstage a - Stage all ║ │
│ feature-branch ║ c - Commit d - Discard file ║ │
│ * main ║ s - Quick stash S - Stash options ║ │
│ ║ ║ │
│ ║ Branches (3): ║ │
└────────────────────║ [/] - Switch tabs enter - Checkout ║ │
╔═ 4 Commits [C] R ══║ n - New branch d - Delete branch ║ │
║ 95bc2ab Initial com║ R - Rename M - Merge ║ │
║ ║ f - Fast-forward ║ │
║ ║ ║ │
║ ║ Commits (4): ║ │
╚════════════════════║ [/] - Switch tabs space - Checkout ║ │
┌─ 5 Stash (0) ──────║ g - Reset to C - Cherry-pick ║ │
│ No stashes ║ t - Revert r - Reword (HEAD only) ║ │
│ ║ y - Show SHA ║────────────────────┘
│ ║ ║────────────────────┐
│ ║ Stash (5): ║ │
└────────────────────║ space - Apply g - Pop (apply+drop) ║ │
║ d - Drop n - Branch from stash ║────────────────────┘
q:quit ?:help h/l:pan║ ║
────────────────────────────────────────────────────────────────────────────────
┌─ 1 Status ─────────────────┐ ┌─ 0 Main ─────────────────────────────────────────────────────┐
│ main → 95bc2ab │ │ commit 95bc2abf2b2afa44d77bb468eabbc44e550b85f4 │
└────────────────────────────┘ │ Author: Test User <test@example.com> │
┌─ 2 Files (3) ──────────────┐ │ Date: Wed Jan 21 17:54:56 2026 -0500 │
│ M file2.txt │ │ │
│ M file1.txt │ │ Initial commit │
│ ?? newfile.txt │ │ --- │
│ │ │ README.md | 1 + │
└────────────────────────────┘ │ file1.txt | 1 + │
┌─ 3 Branches [L] R T ───────┐ │ file2.txt | 1 + │
│ feature-branch │ │ 3 files changed, 3 insertions(+) │
│ * main │ │ │
│ │ │ diff --git a/README.md b/README.md │
│ │ │ new file mode 100644 │
└────────────────────────────┘ │ index 0000000..181e1c3 │
╔═ 4 Commits [C] R ══════════╗ │ --- /dev/null │
║ 95bc2ab Initial commit ║ │ +++ b/README.md │
║ ║ │ @@ -0,0 +1 @@ │
║ ║ │ +# Test Project │
║ ║ │ diff --git a/file1.txt b/file1.txt │
╚════════════════════════════╝ │ new file mode 100644 │
┌─ 5 Stash (0) ──────────────┐ │ index 0000000..a29bdeb │
│ No stashes │ │ --- /dev/null │
│ │ └──────────────────────────────────────────────────────────────┘
│ │ ┌─ Command Log ────────────────────────────────────────────────┐
│ │ │ │
└────────────────────────────┘ │ │
└──────────────────────────────────────────────────────────────┘
q:quit ?:help h/l:panels j/k:nav []:tabs spc:checkout p/P:pull/push
────────────────────────────────────────────────────────────────────────────────
> ./test/e2e/setup-test-repo.sh /tmp/lazygitclj-e2e-modal && cd /tmp/lazygitclj-e2e-modal && bb
--config /home/ajet/repos/lazygitclj/bb.edn start
Initialized empty Git repository in /tmp/lazygitclj-e2e-modal/.git/
[main (root-commit) 95bc2ab] Initial commit
3 files changed, 3 insertions(+)
create mode 100644 README.md
create mode 100644 file1.txt
create mode 100644 file2.txt
Switched to a new branch 'feature-branch'
[feature-branch ffa41af] Feature work
1 file changed, 1 insertion(+)
Switched to branch 'main'
Test repo created at /tmp/lazygitclj-e2e-modal
- main branch with 1 commit
- feature-branch with 1 extra commit
- 1 staged file (file2.txt)
- 1 unstaged file (file1.txt)
- 1 untracked file (newfile.txt)
Starting lazygitclj...
Goodbye!
>
────────────────────────────────────────────────────────────────────────────────
> ./test/e2e/setup-test-repo.sh /tmp/lazygitclj-e2e-modal && cd /tmp/lazygitclj-e2e-modal && bb
--config /home/ajet/repos/lazygitclj/bb.edn start
Initialized empty Git repository in /tmp/lazygitclj-e2e-modal/.git/
[main (root-commit) 95bc2ab] Initial commit
3 files changed, 3 insertions(+)
create mode 100644 README.md
create mode 100644 file1.txt
create mode 100644 file2.txt
Switched to a new branch 'feature-branch'
[feature-branch ffa41af] Feature work
1 file changed, 1 insertion(+)
Switched to branch 'main'
Test repo created at /tmp/lazygitclj-e2e-modal
- main branch with 1 commit
- feature-branch with 1 extra commit
- 1 staged file (file2.txt)
- 1 unstaged file (file1.txt)
- 1 untracked file (newfile.txt)
Starting lazygitclj...
Goodbye!
>
────────────────────────────────────────────────────────────────────────────────