From 100c1cbbce88862245d750a07b49d5d4852b0095 Mon Sep 17 00:00:00 2001 From: nixocio Date: Mon, 9 Aug 2021 16:53:32 -0400 Subject: [PATCH] Update Ids for Job Details page Update Ids for job details page to ease testing. Also, distinguish between Project and Inventory Source Project. See: https://github.com/ansible/awx/issues/10786#issuecomment-893658516 --- .../components/DetailList/LaunchedByDetail.js | 3 +- awx/ui/src/screens/Job/JobDetail/JobDetail.js | 97 ++++++++++++++++--- 2 files changed, 83 insertions(+), 17 deletions(-) diff --git a/awx/ui/src/components/DetailList/LaunchedByDetail.js b/awx/ui/src/components/DetailList/LaunchedByDetail.js index a4700e506e..099d2385a7 100644 --- a/awx/ui/src/components/DetailList/LaunchedByDetail.js +++ b/awx/ui/src/components/DetailList/LaunchedByDetail.js @@ -73,12 +73,13 @@ const getLaunchedByDetails = ({ summary_fields = {}, launch_type }) => { return { link, value }; }; -export default function LaunchedByDetail({ job }) { +export default function LaunchedByDetail({ job, dataCy = null }) { const { value: launchedByValue, link: launchedByLink } = getLaunchedByDetails(job) || {}; return ( - + } /> - - + + {jobTemplate && ( @@ -147,6 +157,7 @@ function JobDetail({ job }) { )} {workflowJobTemplate && ( @@ -167,10 +179,15 @@ function JobDetail({ job }) { } /> )} - - + + {inventory && ( {source_project.status && ( @@ -213,7 +232,11 @@ function JobDetail({ job }) { /> )} {project && ( - + )} {scmBranch && ( )} - - - - + + + + {job.type !== 'workflow_job' && !isJobRunning(job.status) && ( )} - + {instanceGroup && !instanceGroup?.is_container_group && ( )} {instanceGroup && instanceGroup?.is_container_group && ( @@ -248,16 +290,22 @@ function JobDetail({ job }) { {typeof job.job_slice_number === 'number' && typeof job.job_slice_count === 'number' && ( )} {job.type === 'workflow_job' && job.is_sliced_job && ( - + )} {credential && ( @@ -272,6 +320,7 @@ function JobDetail({ job }) { )} {credentials && credentials.length > 0 && ( 0 && ( 0 && ( 0 && ( )} - - + + - + {job.extra_vars && (