Skip to content

Commit

Permalink
fix integration, use warning sign for error to match previous
Browse files Browse the repository at this point in the history
  • Loading branch information
silverwind committed Aug 9, 2022
1 parent 6fd1c67 commit b6b0509
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions integrations/pull_status_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@ func TestPullCreate_CommitStatus(t *testing.T) {
}

statesIcons := map[api.CommitStatusState]string{
api.CommitStatusPending: "circle icon yellow",
api.CommitStatusSuccess: "check icon green",
api.CommitStatusError: "warning icon red",
api.CommitStatusFailure: "remove icon red",
api.CommitStatusWarning: "warning sign icon yellow",
api.CommitStatusPending: "octicon-dot-fill",
api.CommitStatusSuccess: "octicon-check",
api.CommitStatusError: "octicon-alert",
api.CommitStatusFailure: "octicon-x",
api.CommitStatusWarning: "octicon-alert",
}

testCtx := NewAPITestContext(t, "user1", "repo1")
Expand All @@ -80,9 +80,9 @@ func TestPullCreate_CommitStatus(t *testing.T) {
assert.NotEmpty(t, commitURL)
assert.EqualValues(t, commitID, path.Base(commitURL))

cls, ok := doc.doc.Find("#commits-table tbody tr td.message i.commit-status").Last().Attr("class")
cls, ok := doc.doc.Find("#commits-table tbody tr td.message .commit-status").Last().Attr("class")
assert.True(t, ok)
assert.EqualValues(t, "commit-status "+statesIcons[status], cls)
assert.Contains(t, cls, statesIcons[status])
}
})
}
Expand Down
2 changes: 1 addition & 1 deletion templates/repo/commit_status.tmpl
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{{svg "octicon-check" 18 "commit-status icon text green"}}
{{end}}
{{if eq .State "error"}}
{{svg "octicon-x" 18 "commit-status icon text red"}}
{{svg "octicon-alert" 18 "commit-status icon text red"}}
{{end}}
{{if eq .State "failure"}}
{{svg "octicon-x" 18 "commit-status icon text red"}}
Expand Down

0 comments on commit b6b0509

Please sign in to comment.