mirror of
https://github.com/ansible/awx.git
synced 2026-02-26 07:26:03 -03:30
Display finished date once the job is finished
Display finished date once the job is finished. See: https://github.com/ansible/awx/issues/10977
This commit is contained in:
@@ -139,11 +139,13 @@ function JobDetail({ job, inventorySourceLabels }) {
|
|||||||
label={t`Started`}
|
label={t`Started`}
|
||||||
value={formatDateString(job.started)}
|
value={formatDateString(job.started)}
|
||||||
/>
|
/>
|
||||||
<Detail
|
{job?.finished && (
|
||||||
dataCy="job-finished-date"
|
<Detail
|
||||||
label={t`Finished`}
|
dataCy="job-finished-date"
|
||||||
value={formatDateString(job.finished)}
|
label={t`Finished`}
|
||||||
/>
|
value={formatDateString(job.finished)}
|
||||||
|
/>
|
||||||
|
)}
|
||||||
{jobTemplate && (
|
{jobTemplate && (
|
||||||
<Detail
|
<Detail
|
||||||
dataCy="job-template"
|
dataCy="job-template"
|
||||||
|
|||||||
@@ -111,6 +111,18 @@ describe('<JobDetail />', () => {
|
|||||||
).toHaveLength(1);
|
).toHaveLength(1);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('should not display finished date', () => {
|
||||||
|
wrapper = mountWithContexts(
|
||||||
|
<JobDetail
|
||||||
|
job={{
|
||||||
|
...mockJobData,
|
||||||
|
finished: null,
|
||||||
|
}}
|
||||||
|
/>
|
||||||
|
);
|
||||||
|
expect(wrapper.find(`Detail[label="Finished"]`).length).toBe(0);
|
||||||
|
});
|
||||||
|
|
||||||
test('should display module name and module arguments', () => {
|
test('should display module name and module arguments', () => {
|
||||||
wrapper = mountWithContexts(
|
wrapper = mountWithContexts(
|
||||||
<JobDetail
|
<JobDetail
|
||||||
|
|||||||
Reference in New Issue
Block a user