From b638b8d84f64207a9198a11f01ff2d1c767bb2ec Mon Sep 17 00:00:00 2001 From: Bryan Helmkamp Date: Mon, 30 Mar 2026 08:59:10 -0400 Subject: [PATCH] Convert workflow list test to use fabro_snapshot Replace predicates::str::contains assertion with a full snapshot, making the test more precise and consistent with other cmd/ tests. Co-Authored-By: Claude Opus 4.6 (1M context) --- lib/crates/fabro-cli/tests/it/cmd/workflow.rs | 29 ++++++++++++------- 1 file changed, 19 insertions(+), 10 deletions(-) diff --git a/lib/crates/fabro-cli/tests/it/cmd/workflow.rs b/lib/crates/fabro-cli/tests/it/cmd/workflow.rs index 8d5b4e6ff..a55d379b4 100644 --- a/lib/crates/fabro-cli/tests/it/cmd/workflow.rs +++ b/lib/crates/fabro-cli/tests/it/cmd/workflow.rs @@ -1,5 +1,4 @@ -use fabro_test::test_context; -use predicates; +use fabro_test::{fabro_snapshot, test_context}; #[test] fn list() { @@ -12,12 +11,22 @@ fn list() { "version = 1\ngoal = \"A test workflow\"\n", ); - context - .command() - .args(["workflow", "list"]) - .current_dir(&context.temp_dir) - .assert() - .success() - // workflow list prints to stderr - .stderr(predicates::str::contains("my_test_wf")); + let mut cmd = context.command(); + cmd.args(["workflow", "list"]); + cmd.current_dir(&context.temp_dir); + fabro_snapshot!(context.filters(), cmd, @" + success: true + exit_code: 0 + ----- stdout ----- + ----- stderr ----- + 1 workflow(s) found + + User Workflows (~/.fabro/workflows) + (none) + + Project Workflows (workflows) + + NAME DESCRIPTION + my_test_wf A test workflow + "); }