Skip to content

Worktrunk is a CLI for Git worktree management, designed for parallel AI agent workflows

Add tests for uncovered user message paths (#300)

Maximilian Roose20508d79e31
diff --git a/tests/common/mod.rs b/tests/common/mod.rs
index 9fd18fdba..7402afcc5 100644
--- a/tests/common/mod.rs
+++ b/tests/common/mod.rs
@@ -1950,6 +1950,16 @@ pub fn setup_snapshot_settings(repo: &TestRepo) -> insta::Settings {
// when capturing stderr from shell commands due to timing/buffering differences
settings.add_filter(r"Broken pipe \(os error 32\)", "Error: connection refused");
+ // Normalize shell "command not found" errors across platforms
+ // - macOS: "sh: nonexistent-command: command not found"
+ // - Windows Git Bash: "/usr/bin/bash: line 1: nonexistent-command: command not found"
+ // - Linux (dash): "sh: 1: nonexistent-command: not found"
+ // Normalize to a consistent format
+ settings.add_filter(
+ r"(?:/usr/bin/bash: line \d+|sh|bash)(?:: \d+)?: ([^:]+): (?:command )?not found",
+ "sh: $1: command not found",
+ );
+
// Filter out PowerShell lines on Windows - these appear only on Windows
// and would cause snapshot mismatches with Unix snapshots
settings.add_filter(r"(?m)^.*[Pp]owershell.*\n", "");
diff --git a/tests/integration_tests/approvals.rs b/tests/integration_tests/approvals.rs
index 828799eef..7e8278363 100644
--- a/tests/integration_tests/approvals.rs
+++ b/tests/integration_tests/approvals.rs
@@ -176,3 +176,42 @@ lint = "echo 'third'"
// Now clear approvals (should show count of 3)
snapshot_clear_approvals("clear_approvals_multiple_approvals", &repo, &[]);
}
+
+// ============================================================================
+// add-approvals additional coverage tests
+// ============================================================================
+
+#[rstest]
+fn test_add_approvals_all_already_approved(repo: TestRepo) {
+ let project_id = format!("{}/origin", repo.root_path().display());
+ repo.commit("Initial commit");
+ repo.write_project_config(r#"post-create = "echo 'test'""#);
+ repo.commit("Add config");
+
+ // Manually approve the command
+ let mut config = WorktrunkConfig::default();
+ config
+ .approve_command_to(
+ project_id,
+ "echo 'test'".to_string(),
+ Some(repo.test_config_path()),
+ )
+ .unwrap();
+
+ // Try to add approvals - should show "all already approved"
+ snapshot_add_approvals("add_approvals_all_already_approved", &repo, &[]);
+}
+
+#[rstest]
+fn test_add_approvals_project_config_no_commands(repo: TestRepo) {
+ // Create project config with only non-hook settings
+ repo.write_project_config(
+ r#"# Project config without any hook sections
+worktree-path = "../project.{{ branch }}"
+"#,
+ );
+ repo.commit("Add config without hooks");
+
+ // Try to add approvals - should show "no commands configured"
+ snapshot_add_approvals("add_approvals_no_commands", &repo, &[]);
+}
diff --git a/tests/integration_tests/config_show.rs b/tests/integration_tests/config_show.rs
index fcbd9098f..dabd45cfa 100644
--- a/tests/integration_tests/config_show.rs
+++ b/tests/integration_tests/config_show.rs
@@ -522,3 +522,69 @@ fn test_config_show_gitlab_remote(mut repo: TestRepo, temp_home: TempDir) {
assert_cmd_snapshot!(cmd);
});
}
+
+/// Test `wt config show` with empty project config file
+#[rstest]
+fn test_config_show_empty_project_config(mut repo: TestRepo, temp_home: TempDir) {
+ // Setup mock gh/glab for deterministic BINARIES output
+ repo.setup_mock_ci_tools_unauthenticated();
+
+ // Create fake global config
+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");
+ fs::create_dir_all(&global_config_dir).unwrap();
+ fs::write(
+ global_config_dir.join("config.toml"),
+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"
+"#,
+ )
+ .unwrap();
+
+ // Create empty project config file
+ let config_dir = repo.root_path().join(".config");
+ fs::create_dir_all(&config_dir).unwrap();
+ fs::write(config_dir.join("wt.toml"), "").unwrap();
+
+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.clean_cli_env(&mut cmd);
+ repo.configure_mock_commands(&mut cmd);
+ cmd.arg("config").arg("show").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
+/// Test `wt config show` with whitespace-only project config file
+#[rstest]
+fn test_config_show_whitespace_only_project_config(mut repo: TestRepo, temp_home: TempDir) {
+ // Setup mock gh/glab for deterministic BINARIES output
+ repo.setup_mock_ci_tools_unauthenticated();
+
+ // Create fake global config
+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");
+ fs::create_dir_all(&global_config_dir).unwrap();
+ fs::write(
+ global_config_dir.join("config.toml"),
+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"
+"#,
+ )
+ .unwrap();
+
+ // Create project config file with only whitespace
+ let config_dir = repo.root_path().join(".config");
+ fs::create_dir_all(&config_dir).unwrap();
+ fs::write(config_dir.join("wt.toml"), " \n\t\n ").unwrap();
+
+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.clean_cli_env(&mut cmd);
+ repo.configure_mock_commands(&mut cmd);
+ cmd.arg("config").arg("show").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
diff --git a/tests/integration_tests/config_state.rs b/tests/integration_tests/config_state.rs
index 06bfdca89..d12515e7a 100644
--- a/tests/integration_tests/config_state.rs
+++ b/tests/integration_tests/config_state.rs
@@ -456,6 +456,29 @@ fn test_state_get_logs_with_files(repo: TestRepo) {
assert!(stderr.contains("bugfix-remove.log"));
}
+#[rstest]
+fn test_state_get_logs_dir_exists_no_log_files(repo: TestRepo) {
+ // Create wt-logs directory with non-.log files (empty of actual log files)
+ let git_dir = repo.root_path().join(".git");
+ let log_dir = git_dir.join("wt-logs");
+ std::fs::create_dir_all(&log_dir).unwrap();
+ std::fs::write(log_dir.join("README.txt"), "not a log file").unwrap();
+ std::fs::write(log_dir.join(".gitkeep"), "").unwrap();
+
+ let output = wt_state_cmd(&repo, "logs", "get", &[]).output().unwrap();
+ assert!(output.status.success());
+ // Should show "(none)" since no .log files exist
+ let stderr = String::from_utf8_lossy(&output.stderr);
+ assert!(
+ stderr.contains("LOG FILES"),
+ "Expected LOG FILES heading: {stderr}"
+ );
+ assert!(
+ stderr.contains("(none)"),
+ "Expected (none) when log dir exists but has no .log files: {stderr}"
+ );
+}
+
#[rstest]
fn test_state_clear_logs_empty(repo: TestRepo) {
let output = wt_state_cmd(&repo, "logs", "clear", &[]).output().unwrap();
@@ -775,3 +798,130 @@ fn test_state_get_json_with_logs(repo: TestRepo) {
assert!(log.get("modified_at").is_some());
}
}
+
+// ============================================================================
+// Additional coverage tests for uncovered user messages
+// ============================================================================
+
+#[rstest]
+fn test_state_clear_ci_status_all_with_entries(repo: TestRepo) {
+ // Add file-based CI cache entries (the format used by CachedCiStatus::clear_all)
+ write_ci_cache(
+ &repo,
+ "feature",
+ &format!(
+ r#"{{"status":{{"ci_status":"passed","source":"pull-request","is_stale":false}},"checked_at":{TEST_EPOCH},"head":"abc12345"}}"#
+ ),
+ );
+ write_ci_cache(
+ &repo,
+ "bugfix",
+ &format!(
+ r#"{{"status":{{"ci_status":"failed","source":"branch","is_stale":false}},"checked_at":{TEST_EPOCH},"head":"def67890"}}"#
+ ),
+ );
+
+ let output = wt_state_cmd(&repo, "ci-status", "clear", &["--all"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"✓ Cleared 2 CI cache entries");
+}
+
+#[rstest]
+fn test_state_clear_ci_status_all_single_entry(repo: TestRepo) {
+ // Test singular form "entry" vs "entries"
+ write_ci_cache(
+ &repo,
+ "feature",
+ &format!(
+ r#"{{"status":{{"ci_status":"passed","source":"pull-request","is_stale":false}},"checked_at":{TEST_EPOCH},"head":"abc12345"}}"#
+ ),
+ );
+
+ let output = wt_state_cmd(&repo, "ci-status", "clear", &["--all"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"✓ Cleared 1 CI cache entry");
+}
+
+#[rstest]
+fn test_state_clear_ci_status_specific_branch(repo: TestRepo) {
+ // Create a feature branch
+ repo.git_command(&["branch", "feature"]).status().unwrap();
+
+ // Add CI cache via git config for the specific branch
+ repo.git_command(&[
+ "config",
+ "worktrunk.state.feature.ci-status",
+ &format!(r#"{{"status":{{"ci_status":"passed","source":"pull-request","is_stale":false}},"checked_at":{TEST_EPOCH},"head":"abc12345"}}"#),
+ ])
+ .status()
+ .unwrap();
+
+ let output = wt_state_cmd(&repo, "ci-status", "clear", &["--branch", "feature"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"✓ Cleared CI cache for feature");
+}
+
+#[rstest]
+fn test_state_clear_ci_status_specific_branch_not_cached(repo: TestRepo) {
+ // Create a feature branch without any CI cache
+ repo.git_command(&["branch", "feature"]).status().unwrap();
+
+ let output = wt_state_cmd(&repo, "ci-status", "clear", &["--branch", "feature"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"○ No CI cache for feature");
+}
+
+#[rstest]
+fn test_state_clear_marker_specific_branch(repo: TestRepo) {
+ // Create a feature branch and set marker
+ repo.git_command(&["branch", "feature"]).status().unwrap();
+ repo.set_marker("feature", "🔧");
+
+ let output = wt_state_cmd(&repo, "marker", "clear", &["--branch", "feature"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"✓ Cleared marker for feature");
+}
+
+#[rstest]
+fn test_state_clear_marker_specific_branch_not_set(repo: TestRepo) {
+ // Create a feature branch without any marker
+ repo.git_command(&["branch", "feature"]).status().unwrap();
+
+ let output = wt_state_cmd(&repo, "marker", "clear", &["--branch", "feature"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"○ No marker set for feature");
+}
+
+#[rstest]
+fn test_state_clear_marker_current_branch_not_set(repo: TestRepo) {
+ // Clear marker on current branch (main) when none is set
+ let output = wt_state_cmd(&repo, "marker", "clear", &[])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"○ No marker set for main");
+}
+
+#[rstest]
+fn test_state_clear_marker_all_single(repo: TestRepo) {
+ // Test singular form "marker" vs "markers"
+ repo.set_marker("main", "🚧");
+
+ let output = wt_state_cmd(&repo, "marker", "clear", &["--all"])
+ .output()
+ .unwrap();
+ assert!(output.status.success());
+ assert_snapshot!(String::from_utf8_lossy(&output.stderr), @"✓ Cleared 1 marker");
+}
diff --git a/tests/integration_tests/configure_shell.rs b/tests/integration_tests/configure_shell.rs
index b34cf0151..0f7953f90 100644
--- a/tests/integration_tests/configure_shell.rs
+++ b/tests/integration_tests/configure_shell.rs
@@ -229,6 +229,43 @@ fn test_configure_shell_fish_extension_exists(repo: TestRepo, temp_home: TempDir
);
}
+/// Test `wt config shell install` when fish extension AND completions already exist
+#[rstest]
+fn test_configure_shell_fish_all_already_configured(repo: TestRepo, temp_home: TempDir) {
+ // Create fish conf.d directory with wt.fish (extension exists)
+ let conf_d = temp_home.path().join(".config/fish/conf.d");
+ fs::create_dir_all(&conf_d).unwrap();
+ let fish_config = conf_d.join("wt.fish");
+ fs::write(
+ &fish_config,
+ "if type -q wt; command wt config shell init fish | source; end",
+ )
+ .unwrap();
+
+ // Also create completions file
+ let completions_d = temp_home.path().join(".config/fish/completions");
+ fs::create_dir_all(&completions_d).unwrap();
+ let completions_file = completions_d.join("wt.fish");
+ fs::write(&completions_file, "# existing completions").unwrap();
+
+ let settings = setup_home_snapshot_settings(&temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.clean_cli_env(&mut cmd);
+ set_temp_home_env(&mut cmd, temp_home.path());
+ cmd.env("SHELL", "/bin/fish");
+ cmd.arg("config")
+ .arg("shell")
+ .arg("install")
+ .arg("fish")
+ .arg("--force")
+ .current_dir(repo.root_path());
+
+ // Both extension and completions already exist
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
/// Test `wt config shell install` when no config files exist
#[rstest]
fn test_configure_shell_no_files(repo: TestRepo, temp_home: TempDir) {
diff --git a/tests/integration_tests/for_each.rs b/tests/integration_tests/for_each.rs
index 1d4acc1df..182749e88 100644
--- a/tests/integration_tests/for_each.rs
+++ b/tests/integration_tests/for_each.rs
@@ -91,3 +91,15 @@ fn test_for_each_detached_branch_variable(mut repo: TestRepo) {
&["for-each", "--", "echo", "Branch: {{ branch }}"],
);
}
+
+#[rstest]
+fn test_for_each_spawn_fails(mut repo: TestRepo) {
+ // Test when command cannot be spawned (binary doesn't exist)
+ repo.add_worktree("feature");
+
+ snapshot_for_each(
+ "for_each_spawn_fails",
+ &repo,
+ &["for-each", "--", "nonexistent-command-12345", "--some-arg"],
+ );
+}
diff --git a/tests/integration_tests/hook_show.rs b/tests/integration_tests/hook_show.rs
index 58b40ee49..999f52eef 100644
--- a/tests/integration_tests/hook_show.rs
+++ b/tests/integration_tests/hook_show.rs
@@ -169,6 +169,38 @@ fn test_error_with_context_formatting(temp_home: TempDir) {
});
}
+/// Test `wt hook show` when project config exists but has no hooks
+#[rstest]
+fn test_hook_show_project_config_no_hooks(repo: TestRepo, temp_home: TempDir) {
+ // Create user config without hooks
+ let global_config_dir = temp_home.path().join(".config").join("worktrunk");
+ fs::create_dir_all(&global_config_dir).unwrap();
+ fs::write(
+ global_config_dir.join("config.toml"),
+ r#"worktree-path = "../{{ main_worktree }}.{{ branch }}"
+"#,
+ )
+ .unwrap();
+
+ // Create project config without any hook sections
+ repo.write_project_config(
+ r#"# Project config with no hooks
+worktree-path = "../project.{{ branch }}"
+"#,
+ );
+ repo.commit("Add project config without hooks");
+
+ let settings = setup_snapshot_settings_with_home(&repo, &temp_home);
+ settings.bind(|| {
+ let mut cmd = wt_command();
+ repo.clean_cli_env(&mut cmd);
+ cmd.arg("hook").arg("show").current_dir(repo.root_path());
+ set_temp_home_env(&mut cmd, temp_home.path());
+
+ assert_cmd_snapshot!(cmd);
+ });
+}
+
/// Test `wt hook show` outside git repo
#[rstest]
fn test_hook_show_outside_git_repo(temp_home: TempDir) {
diff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_already_approved.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_already_approved.snap
new file mode 100644
index 000000000..ac37e4646
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_all_already_approved.snap
@@ -0,0 +1,40 @@
+---
+source: tests/integration_tests/approvals.rs
+info:
+ program: wt
+ args:
+ - hook
+ - approvals
+ - add
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: false
+exit_code: 1
+----- stdout -----
+
+----- stderr -----
+▲ repo needs approval to execute 1 command:
+
+○ post-create:
+  echo 'test'
+✗ Cannot prompt for approval in non-interactive environment
+
+↳ To skip prompts in CI/CD, add --force; to pre-approve commands, run wt hook approvals add
diff --git a/tests/snapshots/integration__integration_tests__approvals__add_approvals_no_commands.snap b/tests/snapshots/integration__integration_tests__approvals__add_approvals_no_commands.snap
new file mode 100644
index 000000000..32cc44857
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__approvals__add_approvals_no_commands.snap
@@ -0,0 +1,34 @@
+---
+source: tests/integration_tests/approvals.rs
+info:
+ program: wt
+ args:
+ - hook
+ - approvals
+ - add
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+○ No commands configured in project
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap
new file mode 100644
index 000000000..f3537f689
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_empty_project_config.snap
@@ -0,0 +1,42 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - show
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+USER CONFIG ~/.config/worktrunk/config.toml
+  worktree-path = "../{{ main_worktree }}.{{ branch }}"
+
+PROJECT CONFIG _REPO_/.config/wt.toml
+↳ Empty file
+
+SHELL INTEGRATION
+○ Skipped bash; ~/.bashrc not found
+○ Skipped zsh; ~/.zshrc not found
+○ Skipped fish; ~/.config/fish/conf.d not found
diff --git a/tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap b/tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap
new file mode 100644
index 000000000..f3537f689
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__config_show__config_show_whitespace_only_project_config.snap
@@ -0,0 +1,42 @@
+---
+source: tests/integration_tests/config_show.rs
+info:
+ program: wt
+ args:
+ - config
+ - show
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+USER CONFIG ~/.config/worktrunk/config.toml
+  worktree-path = "../{{ main_worktree }}.{{ branch }}"
+
+PROJECT CONFIG _REPO_/.config/wt.toml
+↳ Empty file
+
+SHELL INTEGRATION
+○ Skipped bash; ~/.bashrc not found
+○ Skipped zsh; ~/.zshrc not found
+○ Skipped fish; ~/.config/fish/conf.d not found
diff --git a/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_all_already_configured.snap b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_all_already_configured.snap
new file mode 100644
index 000000000..3a3ed2a88
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__configure_shell__configure_shell_fish_all_already_configured.snap
@@ -0,0 +1,40 @@
+---
+source: tests/integration_tests/configure_shell.rs
+info:
+ program: wt
+ args:
+ - config
+ - shell
+ - install
+ - fish
+ - "--force"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SHELL: /bin/fish
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+○ Already configured shell extension for fish @ ~/.config/fish/conf.d/wt.fish
+✓ Created completions for fish @ ~/.config/fish/completions/wt.fish
+
+✓ Configured 1 shell
diff --git a/tests/snapshots/integration__integration_tests__for_each__for_each_spawn_fails.snap b/tests/snapshots/integration__integration_tests__for_each__for_each_spawn_fails.snap
new file mode 100644
index 000000000..c37a2a994
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__for_each__for_each_spawn_fails.snap
@@ -0,0 +1,45 @@
+---
+source: tests/integration_tests/for_each.rs
+info:
+ program: wt
+ args:
+ - step
+ - for-each
+ - "--"
+ - nonexistent-command-12345
+ - "--some-arg"
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: false
+exit_code: 1
+----- stdout -----
+
+----- stderr -----
+◎ Running in main...
+sh: nonexistent-command-12345: command not found
+✗ Failed in main (exit code 127)
+◎ Running in feature...
+sh: nonexistent-command-12345: command not found
+✗ Failed in feature (exit code 127)
+
+▲ 2 of 2 worktrees failed
+  main
+  feature
diff --git a/tests/snapshots/integration__integration_tests__hook_show__hook_show_project_config_no_hooks.snap b/tests/snapshots/integration__integration_tests__hook_show__hook_show_project_config_no_hooks.snap
new file mode 100644
index 000000000..20ed77590
--- /dev/null
+++ b/tests/snapshots/integration__integration_tests__hook_show__hook_show_project_config_no_hooks.snap
@@ -0,0 +1,37 @@
+---
+source: tests/integration_tests/hook_show.rs
+info:
+ program: wt
+ args:
+ - hook
+ - show
+ env:
+ APPDATA: "[TEST_CONFIG_HOME]"
+ CLICOLOR_FORCE: "1"
+ COLUMNS: "150"
+ GIT_AUTHOR_DATE: "2025-01-01T00:00:00Z"
+ GIT_COMMITTER_DATE: "2025-01-01T00:00:00Z"
+ GIT_CONFIG_GLOBAL: "[TEST_GIT_CONFIG]"
+ GIT_CONFIG_SYSTEM: /dev/null
+ GIT_EDITOR: ""
+ GIT_TERMINAL_PROMPT: "0"
+ HOME: "[TEST_HOME]"
+ LANG: C
+ LC_ALL: C
+ PATH: "[PATH]"
+ RUST_LOG: warn
+ SOURCE_DATE_EPOCH: "1735776000"
+ USERPROFILE: "[TEST_HOME]"
+ WORKTRUNK_CONFIG_PATH: "[TEST_CONFIG]"
+ XDG_CONFIG_HOME: "[TEST_CONFIG_HOME]"
+---
+success: true
+exit_code: 0
+----- stdout -----
+
+----- stderr -----
+[TEST_CONFIG]
+↳ (none configured)
+
+PROJECT HOOKS _REPO_/.config/wt.toml
+↳ (none configured)