Live Job Update for failing tests
This commit is contained in:
parent
360ff368e1
commit
204bcbb7c1
3 changed files with 26 additions and 9 deletions
|
@ -48,11 +48,12 @@ export default function FailingBox(props) {
|
|||
failedMessage,
|
||||
isCompound,
|
||||
jobStatus: testJobStatus,
|
||||
job
|
||||
} = failingTest;
|
||||
|
||||
const navigate = useNavigate();
|
||||
|
||||
const { state: jobState, retrySingle } = useContext(JobContext);
|
||||
const { state: jobState, jobFactory } = useContext(JobContext);
|
||||
|
||||
const { state: store, updateStore, removeFailure } = useContext(StoreContext);
|
||||
|
||||
|
@ -77,12 +78,13 @@ export default function FailingBox(props) {
|
|||
}
|
||||
|
||||
const retryTest = () => {
|
||||
const jobId = retrySingle(failingTest);
|
||||
const jobId = jobFactory({testNames: [testName], isTriage: true});
|
||||
if (store.focusJob) navigate(`/qualiteer/jobs#${jobId}`);
|
||||
};
|
||||
|
||||
const jobOnClick = () => {
|
||||
switch (testJobStatus) {
|
||||
if(!job) return retryTest;
|
||||
switch (job.status) {
|
||||
case jobStatus.OK:
|
||||
return null;
|
||||
case jobStatus.ERROR:
|
||||
|
@ -101,7 +103,8 @@ export default function FailingBox(props) {
|
|||
};
|
||||
|
||||
function jobIcon() {
|
||||
switch (testJobStatus) {
|
||||
if(!job) return <ReplayIcon />;
|
||||
switch (job.status) {
|
||||
case jobStatus.OK:
|
||||
return <CheckIcon color="success" />;
|
||||
case jobStatus.ERROR:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue