com um clique
update-test-snapshots
// Regenerate test snapshot files after intentional markdown output changes. Use after modifying templates or rendering logic.
// Regenerate test snapshot files after intentional markdown output changes. Use after modifying templates or rendering logic.
Create and (optionally) merge a GitHub pull request (prefer GitHub chat tools; gh/wrappers are fallback), following the repo policy to use rebase and merge for a linear history.
Export and analyze VS Code Copilot chat logs for retrospective metrics. Extracts model usage, tool invocations, approval patterns, and timing data.
Generate the comprehensive demo markdown artifacts from the current codebase. Use before UAT to ensure test artifacts reflect the latest code.
Run User Acceptance Testing by creating a PR with rendered markdown on GitHub or Azure DevOps. Use when validating markdown rendering in real platforms.
Simulate the UAT workflow (create PR, comment, poll) on GitHub or Azure DevOps using a minimal test artifact and simulated fixes.
View GitHub PR status/details (prefer GitHub chat tools; gh is fallback).
| name | update-test-snapshots |
| description | Regenerate test snapshot files after intentional markdown output changes. Use after modifying templates or rendering logic. |
| compatibility | Requires .NET SDK and access to the test project. |
Regenerate all test snapshot (golden file) baselines when intentional changes are made to markdown output. This updates the expected outputs that snapshot tests compare against.
scripts/update-test-snapshots.shscripts/update-test-snapshots.sh
This single command:
tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/[INFO] Deleting existing snapshot files...
[INFO] ✓ Deleted 6 snapshot files
[INFO] Running snapshot tests to regenerate files...
[INFO] (Tests will fail on first run, but will create new snapshots)
[INFO] ✓ Generated 6 new snapshot files
[INFO] Running snapshot tests again to verify...
[INFO] ✅ All snapshot tests pass!
Snapshots updated successfully. Review changes with:
git diff tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots
.scriban templates)Snapshot files in tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/:
comprehensive-demo.md - Full comprehensive demo outputsummary-template.md - Summary template outputbreaking-plan.md - Edge cases with escapingrole-assignments.md - Role assignment renderingfirewall-rules.md - Firewall rule semantic diffmulti-module.md - Multi-module plan outputAlways review the changes:
git diff tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/
Verify the changes match your expectations, then stage and commit:
git add tests/Oocx.TfPlan2Md.Tests/TestData/Snapshots/
git commit -m "test: update snapshots after [describe change]"