mirror of
https://github.com/ansible/awx.git
synced 2026-01-12 02:19:58 -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:
parent
9ee9de76b5
commit
fb5394e31c
@ -139,11 +139,13 @@ function JobDetail({ job, inventorySourceLabels }) {
|
||||
label={t`Started`}
|
||||
value={formatDateString(job.started)}
|
||||
/>
|
||||
<Detail
|
||||
dataCy="job-finished-date"
|
||||
label={t`Finished`}
|
||||
value={formatDateString(job.finished)}
|
||||
/>
|
||||
{job?.finished && (
|
||||
<Detail
|
||||
dataCy="job-finished-date"
|
||||
label={t`Finished`}
|
||||
value={formatDateString(job.finished)}
|
||||
/>
|
||||
)}
|
||||
{jobTemplate && (
|
||||
<Detail
|
||||
dataCy="job-template"
|
||||
|
||||
@ -111,6 +111,18 @@ describe('<JobDetail />', () => {
|
||||
).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', () => {
|
||||
wrapper = mountWithContexts(
|
||||
<JobDetail
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user