Fix high prio recommendations, add error / health screen
This commit is contained in:
23
tui_test.go
23
tui_test.go
@@ -1732,3 +1732,26 @@ func TestPeopleMetadataUsesColoredHandles(t *testing.T) {
|
||||
t.Fatal("people handles do not use the deterministic author color")
|
||||
}
|
||||
}
|
||||
|
||||
func TestDashboardFrameDoesNotChangeWhenBackgroundRefreshStarts(t *testing.T) {
|
||||
m := NewApp(&recordingService{}, "", "", false, 50, time.Minute)
|
||||
m.screen, m.loading, m.width, m.height = dashboardScreen, false, 100, 30
|
||||
m.lastRefresh = time.Date(2026, 7, 28, 12, 0, 0, 0, time.Local)
|
||||
m.details = PRDetails{
|
||||
PullRequest: PullRequest{
|
||||
ID: "pr", Owner: "o", Repository: "r", RepoWithOwner: "o/r",
|
||||
Number: 1, Title: "Stable dashboard", Author: "alice",
|
||||
},
|
||||
BaseRef: "main", HeadRef: "feature",
|
||||
}
|
||||
before := m.View()
|
||||
updated, _ := m.Update(tickMsg(time.Now()))
|
||||
m = updated.(App)
|
||||
after := m.View()
|
||||
if !m.loading {
|
||||
t.Fatal("background refresh did not start")
|
||||
}
|
||||
if after != before {
|
||||
t.Fatal("dashboard frame changed solely because a background refresh started")
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user