Fix orange statuses, run tests for [AppveyorCi AzureDevOps Bitbucket CircleCi Gitlab Readthedocs Shippable Wercker] (#2776)
* Fix orange statuses * Add test for partially succeeded build * Add service test for partially succeeded builds * Add service test for partially succeeded builds
This commit is contained in:
committed by
Caleb Cartwright
parent
4597d77015
commit
678359bdd6
@@ -47,6 +47,7 @@ function renderBuildStatusBadge({ label, status }) {
|
||||
message = 'passing'
|
||||
color = 'brightgreen'
|
||||
} else if (orangeStatuses.includes(status)) {
|
||||
message = status === 'partially succeeded' ? 'passing' : status
|
||||
color = 'orange'
|
||||
} else if (redStatuses.includes(status)) {
|
||||
message = status === 'failed' ? 'failing' : status
|
||||
|
||||
@@ -15,6 +15,11 @@ test(renderBuildStatusBadge, () => {
|
||||
message: 'passing',
|
||||
color: 'brightgreen',
|
||||
})
|
||||
given({ label: 'build', status: 'partially succeeded' }).expect({
|
||||
label: 'build',
|
||||
message: 'passing',
|
||||
color: 'orange',
|
||||
})
|
||||
given({ label: 'build', status: 'failed' }).expect({
|
||||
label: 'build',
|
||||
message: 'failing',
|
||||
|
||||
@@ -43,3 +43,10 @@ t.create('unknown project')
|
||||
t.create('unknown user')
|
||||
.get('/azure-devops/build/notarealuser/foo/515.json')
|
||||
.expectJSON({ name: 'build', value: 'user or project not found' })
|
||||
|
||||
// The following build definition has always a partially succeeded status
|
||||
t.create('partially succeeded build')
|
||||
.get(
|
||||
'/azure-devops/build/totodem/8cf3ec0e-d0c2-4fcd-8206-ad204f254a96/4.json?style=_shields_test'
|
||||
)
|
||||
.expectJSON({ name: 'build', value: 'passing', color: 'orange' })
|
||||
|
||||
Reference in New Issue
Block a user