Skip to content

Commit 06cc82a

Browse files
committed
Add baseline snapshots for visual regression tests
Includes text-based baselines showing expected prompt output for: - no_git: Directory without git repo - git_clean/staged/unstaged/untracked/mixed: Various git states - error: After failed command (red prompt char) - long_command: 5s execution time shown - very_long_command: 1h execution time shown - deep_path: Deeply nested directory
1 parent d25588c commit 06cc82a

File tree

12 files changed

+41
-6
lines changed

12 files changed

+41
-6
lines changed

test/visual/.gitignore

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,4 @@ actual/
33
diff/
44
test-repo/
55

6-
# Keep snapshots directory but ignore if empty
7-
!snapshots/
8-
snapshots/*
9-
!snapshots/.gitkeep
6+
# Snapshots are committed as baselines

test/visual/snapshots/.gitkeep

Lines changed: 0 additions & 2 deletions
This file was deleted.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── deep-path ───
2+
~/test-repo/very/deep/nested/directory/structure main
3+
4+
12:34:56

test/visual/snapshots/error.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── error-exit ───
2+
~/test-repo main
3+
4+
12:34:56
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── git-clean ───
2+
~/test-repo main
3+
4+
12:34:56
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── git-mixed ───
2+
~/test-repo main+!?
3+
4+
12:34:56
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── git-staged ───
2+
~/test-repo main+
3+
4+
12:34:56
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── git-unstaged ───
2+
~/test-repo main!
3+
4+
12:34:56
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── git-untracked ───
2+
~/test-repo main?
3+
4+
12:34:56
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
─── long-command-5s ───
2+
~/test-repo main
3+
4+
took 5s 12:34:56

0 commit comments

Comments
 (0)