Sha256: a5fb7912c7d7963b3dc27fc38e4319252c9bd0257a92dd866e6e6f72b098e9e6

Contents?: true

Size: 1.36 KB

Versions: 9

Compression:

Stored size: 1.36 KB

Contents

(function($) {
  $(Screw)
    .bind('loaded', function() {    
      $('.describe, .it')
        .click(function() {
          document.location = location.href.split('?')[0] + '?' + $(this).fn('selector');
          return false;
        })
        .focus(function() {
          return $(this).addClass('focused');
        })
        .bind('scroll', function() {
          document.body.scrollTop = $(this).offset().top;
        });

      $('.it')
        .bind('enqueued', function() {
          $(this).addClass('enqueued');
        })
        .bind('running', function() {
          $(this).addClass('running');
        })
        .bind('passed', function() {
          $(this).addClass('passed');
        })
        .bind('failed', function(e, reason) {
          $(this)
            .addClass('failed')
            .append($('<p class="error"></p>').text(reason.message || reason.toString()));

          var file = reason.fileName || reason.sourceURL;
          var line = reason.lineNumber || reason.line;          
          if (file || line) {
            $(this).append($('<p class="error"></p>').text('line ' + line + ', ' + file));
          }
        });
    })
    .bind('before', function() {
      Screw.suite_start_time = new Date();
      $('.status').text('Running...');
    })
    .bind('after', function() {
      $('body .status').fn('display');
    });
})(jQuery);

Version data entries

9 entries across 9 versions & 2 rubygems

Version Path
rsutphin-shenandoah-0.1.0 lib/shenandoah/javascript/common/screw.events.js
rsutphin-shenandoah-0.1.1 lib/shenandoah/javascript/common/screw.events.js
rsutphin-shenandoah-0.1.2 lib/shenandoah/javascript/common/screw.events.js
shenandoah-0.2.0 lib/shenandoah/javascript/common/screw.events.js
shenandoah-0.1.3 lib/shenandoah/javascript/common/screw.events.js
shenandoah-0.1.0 lib/shenandoah/javascript/common/screw.events.js
shenandoah-0.1.1 lib/shenandoah/javascript/common/screw.events.js
shenandoah-0.1.2 lib/shenandoah/javascript/common/screw.events.js
shenandoah-0.0.0 lib/shenandoah/javascript/common/screw.events.js