diff --git a/t/ui/18-tests-details.t b/t/ui/18-tests-details.t index 83f24b5737c..243baa6fbd2 100644 --- a/t/ui/18-tests-details.t +++ b/t/ui/18-tests-details.t @@ -469,6 +469,11 @@ subtest 'misc details: title, favicon, go back, go to source view, go to log vie my $t = Test::Mojo->new('OpenQA::WebAPI'); +subtest 'scheduled job' => sub { + $t->get_ok('/tests/99927/infopanel_ajax')->status_is(200); + $t->content_like(qr/scheduled.*, created.*\d\d\d\d-\d\d-\d\d \d\d:\d\d:\d\d/s, 'creation date displayed'); +}; + subtest 'route to latest' => sub { $t->get_ok('/tests/latest?distri=opensuse&version=13.1&flavor=DVD&arch=x86_64&test=kde&machine=64bit') ->status_is(200); diff --git a/templates/webapi/test/infopanel.html.ep b/templates/webapi/test/infopanel.html.ep index 75b5b4accbf..ec1c9016bd1 100644 --- a/templates/webapi/test/infopanel.html.ep +++ b/templates/webapi/test/infopanel.html.ep @@ -58,11 +58,15 @@ (\ <%= $job->t_started ? format_time_duration($job->t_finished - $job->t_started) : 0 =%>\ ) - % } elsif ($job->t_started) - % { + % } + % elsif ($job->t_started) { <%= ', started' =%> <%= format_time($job->t_started) %> % } + % else { + <%= ', created' =%> + <%= format_time($job->t_created) %> + % } % if (is_operator && $job->can_be_duplicated) {
%= link_post url_for('apiv1_restart', jobid => $testid) => (class => 'btn btn-link restart-result', 'data-remote' => 'true', id => 'restart-result', 'data-jobid' => $testid) => begin