Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 1521157 - Update dataset for unit tests (#4502)
- Loading branch information
Cameron Dawson
committed
Jan 29, 2019
1 parent
c32f673
commit 8365550
Showing
9 changed files
with
161 additions
and
22 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { FontAwesomeIcon } from '@fortawesome/react-fontawesome'; | ||
import { faStar } from '@fortawesome/free-solid-svg-icons'; | ||
import { Badge, Row, Col } from 'reactstrap'; | ||
|
||
import { getJobsUrl } from '../helpers/url'; | ||
|
||
export default class TestFailure extends React.PureComponent { | ||
render() { | ||
const { failure, repo, revision } = this.props; | ||
const { | ||
testName, | ||
jobName, | ||
jobId, | ||
classification, | ||
failureLine, | ||
confidence, | ||
} = failure; | ||
|
||
return ( | ||
<Col className="mt-2 mb-3 ml-2"> | ||
<Row className="border-bottom border-secondary justify-content-between"> | ||
<span className="font-weight-bold">{testName}</span> | ||
<span> | ||
Line confidence: | ||
<Badge color="secondary" className="ml-2 mr-3"> | ||
{confidence} | ||
</Badge> | ||
</span> | ||
</Row> | ||
<div className="small"> | ||
<a | ||
className="text-dark ml-3" | ||
href={getJobsUrl({ selectedJob: jobId, repo, revision })} | ||
> | ||
{jobName} | ||
</a> | ||
<span className="ml-1"> | ||
<FontAwesomeIcon icon={faStar} /> | ||
{classification} | ||
</span> | ||
</div> | ||
<Row className="small text-monospace mt-2 ml-3">{failureLine}</Row> | ||
</Col> | ||
); | ||
} | ||
} | ||
|
||
TestFailure.propTypes = { | ||
failure: PropTypes.object.isRequired, | ||
repo: PropTypes.object.isRequired, | ||
revision: PropTypes.object.isRequired, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.metric-name { | ||
font-size: 24px; | ||
} |