Bug Tracker

Changeset 5815

Show
Ignore:
Timestamp:
08/08/08 18:07:04 (5 months ago)
Author:
joern.zaefferer
Message:

qunit: added id/classes to result element to enable integration with browser automation tools, see http://docs.jquery.com/QUnit#Integration_into_Browser_Automation_Tools

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qunit/testrunner.js

    r5812 r5815  
    9292function runTest() { 
    9393    _config.blocking = false; 
    94     var time = new Date(); 
     94    var started = +new Date; 
    9595    _config.fixture = document.getElementById('main').innerHTML; 
    9696    _config.ajaxSettings = jQuery.ajaxSettings; 
    9797    synchronize(function() { 
    98         time = new Date() - time; 
    99         jQuery("<div>").html(['<p class="result">Tests completed in ', 
    100             time, ' milliseconds.<br/>', 
    101             _config.stats.bad, ' tests of ', _config.stats.all, ' failed.</p>'] 
     98        jQuery('<p id="testresult" class="result">').html(['Tests completed in ', 
     99            +new Date - started, ' milliseconds.<br/>', 
     100            '<span class="bad">', _config.stats.bad, '</span> tests of <span class="all">', _config.stats.all, '</span> failed.</p>'] 
    102101            .join('')) 
    103102            .appendTo("body");