fix: simplify dashboard and disable unauthorized actions
hermetic-ci / test (push) Canceled after 0s
hermetic-ci / test (push) Canceled after 0s
This commit is contained in:
@@ -33,7 +33,7 @@ func TestCompleteModelFixedSizeCoverageAcrossCompletedWorkflows(t *testing.T) {
|
||||
}
|
||||
return resizedModel(t, &recordingModule{snapshot: snapshot}, themeModeNoColor, width, height)
|
||||
},
|
||||
want: []string{"Operations Console", "Checking", "Target availability"},
|
||||
want: []string{"Profile:", "Checking", "Target availability"},
|
||||
},
|
||||
{
|
||||
name: "refresh",
|
||||
@@ -46,7 +46,7 @@ func TestCompleteModelFixedSizeCoverageAcrossCompletedWorkflows(t *testing.T) {
|
||||
}
|
||||
return model
|
||||
},
|
||||
want: []string{"Operations Console", "Checking Target availability and state"},
|
||||
want: []string{"Profile:", "Checking Target availability and state"},
|
||||
},
|
||||
{
|
||||
name: "Target action",
|
||||
@@ -155,7 +155,7 @@ func TestCompleteModelLightDarkAndNoColorRetainEquivalentSemantics(t *testing.T)
|
||||
model, _ = applyOperationCommand(t, model, command)
|
||||
model = updateKey(model, "e")
|
||||
views[mode] = progressFrame + "--- operation completed ---\n" + model.View()
|
||||
for _, semantic := range []string{"[focused]", "Disabled", "Drifted", "Applying", "mutations disabled", "Current error:", "REDACTED", "Action: Enable"} {
|
||||
for _, semantic := range []string{"[focused]", "Disabled", "Drifted", "Applying", "q: Stop", "Current error:", "REDACTED", "Space: Enable"} {
|
||||
if !strings.Contains(views[mode], semantic) {
|
||||
t.Fatalf("theme %d lost %q:\n%s", mode, semantic, views[mode])
|
||||
}
|
||||
@@ -163,7 +163,7 @@ func TestCompleteModelLightDarkAndNoColorRetainEquivalentSemantics(t *testing.T)
|
||||
}
|
||||
|
||||
plain := views[themeModeNoColor]
|
||||
for _, symbol := range []string{"● Enabled", "○ Disabled", "! Drifted", "▶ Target details [focused]"} {
|
||||
for _, symbol := range []string{"○ Disabled", "! Drifted", "▶ Target details [focused]"} {
|
||||
if !strings.Contains(plain, symbol) {
|
||||
t.Fatalf("standard Unicode/ASCII status strategy lost %q:\n%s", symbol, plain)
|
||||
}
|
||||
@@ -188,7 +188,7 @@ func TestCompleteModelBoundsUnicodeAndKeepsLongContentReachable(t *testing.T) {
|
||||
snapshot.Profiles[0].Name = longProfile
|
||||
snapshot.Targets[0].Description.Name = longName
|
||||
snapshot.Targets[0].Evidence = strings.Repeat("証拠 and wrapped evidence ", 80) + " EVIDENCE-END"
|
||||
snapshot.Targets[0].Description.Details = strings.Repeat("詳細 line ", 100) + " DETAILS-END"
|
||||
snapshot.Targets[0].Evidence = strings.Repeat("証拠 and wrapped evidence ", 120) + " EVIDENCE-END"
|
||||
model := resizedModel(t, &recordingModule{snapshot: snapshot}, themeModeNoColor, 80, 24)
|
||||
|
||||
assertCellBoundedFrame(t, model.View(), 80, 24, "Disabled")
|
||||
@@ -196,7 +196,7 @@ func TestCompleteModelBoundsUnicodeAndKeepsLongContentReachable(t *testing.T) {
|
||||
for range 120 {
|
||||
model = updateKey(model, "pgdown")
|
||||
}
|
||||
assertCellBoundedFrame(t, model.View(), 80, 24, "DETAILS-END")
|
||||
assertCellBoundedFrame(t, model.View(), 80, 24, "EVIDENCE-END")
|
||||
|
||||
model = updateKey(model, "m")
|
||||
for range 60 {
|
||||
@@ -318,7 +318,7 @@ func TestCompleteModelLongFieldsAndDialogsRemainReachableAcrossResizeAtNontermin
|
||||
|
||||
func TestCompleteModelResizeStressPreservesDialogFocusSelectionViewportInFlightAndDeferredExit(t *testing.T) {
|
||||
snapshot := hardeningSnapshot()
|
||||
snapshot.Targets[1].Description.Details = strings.Repeat("APT scrollable detail. ", 90) + " APT-VIEWPORT-END"
|
||||
snapshot.Targets[1].Evidence = strings.Repeat("APT scrollable evidence. ", 90) + " APT-VIEWPORT-END"
|
||||
updates := make(chan app.OperationUpdate, 2)
|
||||
module := &interactiveScriptModule{snapshot: snapshot, streams: []chan app.OperationUpdate{updates}}
|
||||
model := resizedModel(t, module, themeModeNoColor, 120, 36)
|
||||
@@ -354,8 +354,8 @@ func TestCompleteModelResizeStressPreservesDialogFocusSelectionViewportInFlightA
|
||||
|
||||
model = updateKey(model, "q")
|
||||
assertCellBoundedFrame(t, model.View(), 80, 24,
|
||||
"> ! Drifted APT", "▶ Target details [focused]", "APT-VIEWPORT-", "END",
|
||||
"Applying", "Exit requested", "new work disabled")
|
||||
"> ! Drifted APT", "▶ Target details [focused]", "VIEWPORT-END",
|
||||
"Applying", "Exit requested", "changes disabled")
|
||||
|
||||
updates <- app.SucceededOperationUpdate(snapshot,
|
||||
app.OperationStatus{Summary: "Shell Target is now Enabled", TargetID: "shell"},
|
||||
|
||||
Reference in New Issue
Block a user