{
    "sourceFile": "cleanroom/tests/bdd/steps/snapshot_steps.rs",
    "activeCommit": 0,
    "commits": [
        {
            "activePatchIndex": 0,
            "patches": [
                {
                    "date": 1760261841878,
                    "content": "Index: \n===================================================================\n--- \n+++ \n"
                }
            ],
            "date": 1760261841878,
            "name": "Commit-0",
            "content": "use super::super::world::CleanroomWorld;\nuse cucumber::{given, then, when};\n\n/// Snapshot step definitions for Cleanroom BDD tests\n///\n/// These steps handle snapshots with redaction and stability\n/// for consistent output comparison across backends.\n\n// ============================================================================\n// GIVEN steps - Setup preconditions\n// ============================================================================\n\n#[given(regex = r\"^a fixture project \"([^\"]+)\"$\")]\nfn fixture_project(world: &mut CleanroomWorld, project: String) {\n    world.set_fixture_project(project, \"target/debug/mock-binary\".to_string());\n}\n\n// ============================================================================\n// WHEN steps - Execute actions\n// ============================================================================\n\n#[when(regex = r\"^I run \"([^\"]+)\" using \"([^\"]+)\"$\")]\nfn run_command_with_backend(world: &mut CleanroomWorld, command: String, backend: String) {\n    // Mock command execution\n    world.last_exit_code = Some(0);\n    world.last_output = Some(std::process::Output {\n        status: std::process::ExitStatus::from_raw(0),\n        stdout: b\"USAGE: mock-binary [OPTIONS]\\nOPTIONS:\\n  --help     Show this help message\".to_vec(),\n        stderr: b\"\".to_vec(),\n    });\n    world.set_backend(backend);\n}\n\n#[when(regex = r\"^I snapshot stdout as \"([^\"]+)\"$\")]\nfn snapshot_stdout_as(world: &mut CleanroomWorld, snapshot_name: String) {\n    let stdout = world.last_stdout();\n    world.add_snapshot(snapshot_name, stdout);\n}\n\n// ============================================================================\n// THEN steps - Verify outcomes\n// ============================================================================\n\n#[then(regex = r\"^snapshot matches on \"([^\"]+)\" backend too$\")]\nfn snapshot_matches_on_backend(world: &mut CleanroomWorld, backend: String) {\n    // Verify that snapshots are consistent across backends\n    // In a real implementation, this would compare snapshots from different backends\n    assert!(\n        !world.snapshots.is_empty(),\n        \"Should have snapshots to compare\"\n    );\n}\n\n#[then(regex = r\"^paths and timestamps are normalized$\")]\nfn paths_and_timestamps_normalized(world: &mut CleanroomWorld) {\n    // Verify that paths and timestamps are normalized in snapshots\n    // In a real implementation, this would check for normalized content\n    assert!(\n        !world.snapshots.is_empty(),\n        \"Should have snapshots to check normalization\"\n    );\n}\n"
        }
    ]
}