Add an additional table above the tests table that will display only the failures for quick viewing of test failures.

CommentFileSizeAuthor
#5 631616-non-pass-table.patch2.29 KBboombatower

Comments

redndahead’s picture

You can use this jquery in firebug to kind of get the idea.

var tableHead = $('#tabs-tabset-3 table thead:first').html();
var tableText = '<table>' + tableHead;
$('.pifr-assertion-header, .pifr-assertion-wrapper').each(function () {
  tableText = tableText + '<tr>' + $(this).html() + '</tr>';
});

tableText = tableText + '</table>';

$('div.pifr-assertion-summary').after('<br /><h3>Failed Tests</h3>' + tableText + '<br /><h3>All Tests</h3>');
boombatower’s picture

redndahead’s picture

This one is better.

var tableHead = $('#tabs-tabset-3 table thead:first').html();
var tableText = '<table id="failures">' + tableHead;
var classVal='';
$('.pifr-assertion-header, .pifr-assertion-wrapper').each(function (i) {
  if (i%2) {
    classVal='pifr-assertion-wrapper';
  }
  else {
    classVal='pifr-fail odd pifr-assertion-header';
  }
  tableText = tableText + '<tr class="' + classVal + '">' + $(this).html() + '</tr>';
});

tableText = tableText + '</table>';

$('div.pifr-assertion-summary').after('<br /><h3>Failed Tests</h3>' + tableText + '<br /><h3>All Tests</h3>');

$('#failures .pifr-assertion-wrapper').hide();
$('#failures .pifr-assertion-header').click(function() {
  $(this).next().toggle();
});
boombatower’s picture

Assigned: Unassigned » boombatower

Doesn't quite work, but I think I have the idea.

Only local images are allowed.

boombatower’s picture

Status: Active » Needs review
StatusFileSize
new2.29 KB
boombatower’s picture

Title: Create additional table above tests table that displays just the failures. » Create additional table above tests table that displays just the failures
Status: Needs review » Fixed

Committed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.