on main help sign in
chore(tests): update golden files for status
f5f7a10Christian Rocha
CRUSH.md+2
@@ -4,6 +4,8 @@
4
4
5- **Build**: `go build .` or `go run .`
5- **Build**: `go build .` or `go run .`
6- **Test**: `task test` or `go test ./...` (run single test: `go test ./internal/llm/prompt -run TestGetContextFromPaths`)
6- **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")
7- **Lint**: `task lint-fix`
9- **Lint**: `task lint-fix`
8- **Format**: `task fmt` (gofumpt -w .)
10- **Format**: `task fmt` (gofumpt -w .)
9- **Dev**: `task dev` (runs with profiling enabled)
11- **Dev**: `task dev` (runs with profiling enabled)
internal/tui/components/core/status_test.go−3
@@ -37,7 +37,6 @@ func TestStatus(t *testing.T) {
37 {
37 {
38 name: "NoIcon",
38 name: "NoIcon",
39 opts: core.StatusOpts{
39 opts: core.StatusOpts{
40− NoIcon: true,
41 Title: "Info",
40 Title: "Info",
42 Description: "This status has no icon",
41 Description: "This status has no icon",
43 },
42 },
@@ -47,7 +46,6 @@ func TestStatus(t *testing.T) {
47 name: "WithColors",
46 name: "WithColors",
48 opts: core.StatusOpts{
47 opts: core.StatusOpts{
49 Icon: "⚠",
48 Icon: "⚠",
50− IconColor: color.RGBA{255, 165, 0, 255}, // Orange
51 Title: "Warning",
49 Title: "Warning",
52 TitleColor: color.RGBA{255, 255, 0, 255}, // Yellow
50 TitleColor: color.RGBA{255, 255, 0, 255}, // Yellow
53 Description: "This is a warning message",
51 Description: "This is a warning message",
@@ -102,7 +100,6 @@ func TestStatus(t *testing.T) {
102 name: "AllFieldsWithExtraContent",
100 name: "AllFieldsWithExtraContent",
103 opts: core.StatusOpts{
101 opts: core.StatusOpts{
104 Icon: "🚀",
102 Icon: "🚀",
105− IconColor: color.RGBA{0, 255, 0, 255}, // Green
106 Title: "Deployment",
103 Title: "Deployment",
107 TitleColor: color.RGBA{0, 0, 255, 255}, // Blue
104 TitleColor: color.RGBA{0, 0, 255, 255}, // Blue
108 Description: "Deploying to production environment",
105 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]