pi-agent: Fix final integrated review
This commit is contained in:
@@ -38,6 +38,23 @@ func TestCompleteModelWideOperationsConsoleShowsStableAvailableTargetDashboard(t
|
||||
}
|
||||
}
|
||||
|
||||
func TestCompleteModelFailedProgressSupplementsTruthfulTargetState(t *testing.T) {
|
||||
for _, state := range []target.State{target.Enabled, target.Disabled, target.External, target.Drifted} {
|
||||
t.Run(string(state), func(t *testing.T) {
|
||||
module := &recordingModule{snapshot: app.Snapshot{Targets: []app.TargetSnapshot{{
|
||||
ID: "shell", Description: target.Description{Name: "Shell"}, Available: true, State: state,
|
||||
}}}}
|
||||
model := resizedModel(t, module, themeModeNoColor, 120, 36)
|
||||
model.operation.progress["shell"] = app.TargetProgressFailed
|
||||
view := model.View()
|
||||
wantState := targetStateLabel(state)
|
||||
if !strings.Contains(view, "> "+wantState+" ! Failed Shell") {
|
||||
t.Fatalf("failed progress replaced truthful %s state instead of supplementing it:\n%s", state, view)
|
||||
}
|
||||
})
|
||||
}
|
||||
}
|
||||
|
||||
func TestCompleteModelDashboardRevealsUnavailableEvidenceAndStructuredDetails(t *testing.T) {
|
||||
module := &recordingModule{snapshot: app.Snapshot{Targets: []app.TargetSnapshot{
|
||||
{ID: "shell", Description: target.Description{Name: "Shell"}, Available: true, State: target.Disabled, Evidence: "fragment absent"},
|
||||
|
||||
Reference in New Issue
Block a user