Skip to content

Commit c8819d1

Browse files
committed
fix: tests
1 parent 193463f commit c8819d1

3 files changed

Lines changed: 11 additions & 5 deletions

File tree

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ jobs:
6161
run: go build -v -o bin/tracto ./cmd
6262

6363
- name: Run tests
64-
run: go test -v -cover ./...
64+
run: go test -cover ./...

internal/ui/sidebar/sidebar.go

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -169,8 +169,10 @@ func Layout(gtx layout.Context, host *Host) layout.Dimensions {
169169
}),
170170
layout.Rigid(layout.Spacer{Width: unit.Dp(2)}.Layout),
171171
layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
172-
lbl := material.Label(host.Theme, unit.Sp(12), "Collections")
173-
return lbl.Layout(gtx)
172+
return layout.Inset{Top: unit.Dp(1), Bottom: unit.Dp(1)}.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
173+
lbl := material.Label(host.Theme, unit.Sp(12), "Collections")
174+
return lbl.Layout(gtx)
175+
})
174176
}),
175177
)
176178
})
@@ -960,8 +962,10 @@ func Layout(gtx layout.Context, host *Host) layout.Dimensions {
960962
}),
961963
layout.Rigid(layout.Spacer{Width: unit.Dp(2)}.Layout),
962964
layout.Flexed(1, func(gtx layout.Context) layout.Dimensions {
963-
lbl := material.Label(host.Theme, unit.Sp(12), "Environments")
964-
return lbl.Layout(gtx)
965+
return layout.Inset{Top: unit.Dp(1), Bottom: unit.Dp(1)}.Layout(gtx, func(gtx layout.Context) layout.Dimensions {
966+
lbl := material.Label(host.Theme, unit.Sp(12), "Environments")
967+
return lbl.Layout(gtx)
968+
})
965969
}),
966970
)
967971
})

internal/ui/workspace/http_test.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -541,6 +541,8 @@ func TestFormatTimings(t *testing.T) {
541541
func TestExecuteRequest_CapturesTimingsAndFilename(t *testing.T) {
542542
setupTestConfigDir(t)
543543
srv := httptest.NewServer(http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
544+
// Small delay so TTFB exceeds Windows time.Now() granularity.
545+
time.Sleep(5 * time.Millisecond)
544546
w.Header().Set("Content-Disposition", `attachment; filename="hello.txt"`)
545547
_, _ = w.Write([]byte("hello"))
546548
}))

0 commit comments

Comments
 (0)