on main help sign in
chore(tests): update golden files for status
commitf5f7a10b2650201606866a1cb220b5540a25cbf8 authorChristian Rocha <christian@rocha.is> dateMon 4 Aug 2025, 21:35 (1 year ago) parent19d3cd0
16 files changed+16−17
CRUSH.md+2 internal/tui/components/core/status_test.go−3 internal/tui/components/core/testdata/TestStatus/AllFieldsWithExtraContent.golden+1−1 internal/tui/components/core/testdata/TestStatus/Default.golden+1−1 internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden+1−1 internal/tui/components/core/testdata/TestStatus/LongDescription.golden+1−1 internal/tui/components/core/testdata/TestStatus/NarrowWidth.golden+1−1 internal/tui/components/core/testdata/TestStatus/VeryNarrowWidth.golden+1−1 internal/tui/components/core/testdata/TestStatus/WithColors.golden+1−1 internal/tui/components/core/testdata/TestStatus/WithCustomIcon.golden+1−1 internal/tui/components/core/testdata/TestStatus/WithExtraContent.golden+1−1 internal/tui/components/core/testdata/TestStatusTruncation/Width20.golden+1−1 internal/tui/components/core/testdata/TestStatusTruncation/Width30.golden+1−1 internal/tui/components/core/testdata/TestStatusTruncation/Width40.golden+1−1 internal/tui/components/core/testdata/TestStatusTruncation/Width50.golden+1−1 internal/tui/components/core/testdata/TestStatusTruncation/Width60.golden+1−1
CRUSH.md+2
@@ -4,6 +4,8 @@
44
55- **Build**: `go build .` or `go run .`
66- **Test**: `task test` or `go test ./...` (run single test: `go test ./internal/llm/prompt -run TestGetContextFromPaths`)
7+- **Update Golden Files**: `go test ./... -update` (regenerates .golden files when test output changes)
8+ - Update specific package: `go test ./internal/tui/components/core -update` (in this case, we're updating "core")
79- **Lint**: `task lint-fix`
810- **Format**: `task fmt` (gofumpt -w .)
911- **Dev**: `task dev` (runs with profiling enabled)
internal/tui/components/core/status_test.go−3
@@ -37,7 +37,6 @@ func TestStatus(t *testing.T) {
3737 {
3838 name: "NoIcon",
3939 opts: core.StatusOpts{
40− NoIcon: true,
4140 Title: "Info",
4241 Description: "This status has no icon",
4342 },
@@ -47,7 +46,6 @@ func TestStatus(t *testing.T) {
4746 name: "WithColors",
4847 opts: core.StatusOpts{
4948 Icon: "⚠",
50− IconColor: color.RGBA{255, 165, 0, 255}, // Orange
5149 Title: "Warning",
5250 TitleColor: color.RGBA{255, 255, 0, 255}, // Yellow
5351 Description: "This is a warning message",
@@ -102,7 +100,6 @@ func TestStatus(t *testing.T) {
102100 name: "AllFieldsWithExtraContent",
103101 opts: core.StatusOpts{
104102 Icon: "🚀",
105− IconColor: color.RGBA{0, 255, 0, 255}, // Green
106103 Title: "Deployment",
107104 TitleColor: color.RGBA{0, 0, 255, 255}, // Blue
108105 Description: "Deploying to production environment",
internal/tui/components/core/testdata/TestStatus/AllFieldsWithExtraContent.golden+1−1
@@ -1 +1 @@
1−🚀 Deployment Deploying to production environment v1.2.3
1+🚀 Deployment Deploying to production environment v1.2.3
internal/tui/components/core/testdata/TestStatus/Default.golden+1−1
@@ -1 +1 @@
1−● Status Everything is working fine
1+Status Everything is working fine
internal/tui/components/core/testdata/TestStatus/EmptyDescription.golden+1−1
@@ -1 +1 @@
1−● Title Only 
1+● Title Only 
internal/tui/components/core/testdata/TestStatus/LongDescription.golden+1−1
@@ -1 +1 @@
1−● Processing This is a very long description that should be…
1+Processing This is a very long description that should be …
internal/tui/components/core/testdata/TestStatus/NarrowWidth.golden+1−1
@@ -1 +1 @@
1−● Status Short message
1+● Status Short message
internal/tui/components/core/testdata/TestStatus/VeryNarrowWidth.golden+1−1
@@ -1 +1 @@
1−● Test This will be…
1+● Test This will be…
internal/tui/components/core/testdata/TestStatus/WithColors.golden+1−1
@@ -1 +1 @@
1−⚠ Warning This is a warning message
1+⚠ Warning This is a warning message
internal/tui/components/core/testdata/TestStatus/WithCustomIcon.golden+1−1
@@ -1 +1 @@
1−✓ Success Operation completed successfully
1+✓ Success Operation completed successfully
internal/tui/components/core/testdata/TestStatus/WithExtraContent.golden+1−1
@@ -1 +1 @@
1−● Build Building project [2/5]
1+Build Building project [2/5]
internal/tui/components/core/testdata/TestStatusTruncation/Width20.golden+1−1
@@ -1 +1 @@
1−● Very Long Title  [extra]
1+● Very Long Title  [extra]
internal/tui/components/core/testdata/TestStatusTruncation/Width30.golden+1−1
@@ -1 +1 @@
1−● Very Long Title Thi… [extra]
1+● Very Long Title Thi… [extra]
internal/tui/components/core/testdata/TestStatusTruncation/Width40.golden+1−1
@@ -1 +1 @@
1−● Very Long Title This is an ex… [extra]
1+● Very Long Title This is an ex… [extra]
internal/tui/components/core/testdata/TestStatusTruncation/Width50.golden+1−1
@@ -1 +1 @@
1−● Very Long Title This is an extremely lo… [extra]
1+● Very Long Title This is an extremely lo… [extra]
internal/tui/components/core/testdata/TestStatusTruncation/Width60.golden+1−1
@@ -1 +1 @@
1−● Very Long Title This is an extremely long descrip… [extra]
1+● Very Long Title This is an extremely long descrip… [extra]