diff --git a/assets/javascripts/admin_needle.js b/assets/javascripts/admin_needle.js index 9178c0b6756..69a3e7cfbc5 100644 --- a/assets/javascripts/admin_needle.js +++ b/assets/javascripts/admin_needle.js @@ -30,7 +30,7 @@ function setupAdminNeedles() { if (type === 'display' && data != 'never') { var ri = 'last_seen_link'; if (data == row['last_match']) ri = 'last_match_link'; - return "" + jQuery.timeago(new Date(data)) + ''; + return "" + jQuery.timeago(new Date(data)) + ''; } else { return data; } diff --git a/t/ui/21-admin-needles.t b/t/ui/21-admin-needles.t index 05cdce44286..94cd3841820 100644 --- a/t/ui/21-admin-needles.t +++ b/t/ui/21-admin-needles.t @@ -165,6 +165,11 @@ subtest 'dereference symlink when displaying needles info' => sub { is((shift @symlink_needle_tds)->get_text(), 'bootloader.json', 'symlink needle file name is displayed correctly'); my $last_used_td = shift @symlink_needle_tds; is($last_used_td->get_text(), 'a day ago', 'symlink needle last use is displayed correctly'); + is( + $last_used_td->child('a')->get_attribute('title'), + $real_needle->last_seen_time . 'Z', + 'symlink needle last use tooltip is displayed correctly' + ); like( $driver->find_child_element($last_used_td, 'a')->get_attribute('href'), qr/admin\/needles\/$last_seen_module_id\/$real_needle_id/,