Sha256: fcc628366aa372380651976167b7468f26a91f57485da40a7dbce79abeeaf638

Contents?: true

Size: 982 Bytes

Versions: 7

Compression:

Stored size: 982 Bytes

Contents

new Test.Unit.Runner({
  testInput: function() {
    this.assert($("input").present != null);
    this.assert(typeof $("input").present == 'function');
    this.assert($("input").select != null);
    this.assertRespondsTo('present', Form.Element);
    this.assertRespondsTo('present', Form.Element.Methods);
    this.assertRespondsTo('coffee', $('input'));
    this.assertIdentical(Prototype.K, Form.Element.coffee);
    this.assertIdentical(Prototype.K, Form.Element.Methods.coffee);
  },
  
  testForm: function() {
    this.assert($("form").reset != null);
    this.assert($("form").getInputs().length == 2);
  },
  
  testEvent: function() {
    this.assert($("form").observe != null)
    // Can't really test this one with TestUnit...
    $('form').observe("submit", function(e) { 
      alert("yeah!"); 
      Event.stop(e); 
    });
  },
  
  testCollections: function() {
    this.assert($$("input").all(function(input) {
      return (input.focus != null);
    }));
  }
});

Version data entries

7 entries across 7 versions & 3 rubygems

Version Path
Fingertips-headless-squirrel-0.2.0 test/regression/prototype/unit/tests/element_mixins_test.js
Fingertips-headless-squirrel-0.3.0 test/regression/prototype/unit/tests/element_mixins_test.js
Fingertips-headless-squirrel-0.4.0 test/regression/prototype/unit/tests/element_mixins_test.js
Fingertips-headless-squirrel-0.5.0 test/regression/prototype/unit/tests/element_mixins_test.js
alloy-js-test-san-0.1.0 test/regression/prototype/unit/tests/element_mixins_test.js
alloy-js-test-san-0.1.1 test/regression/prototype/unit/tests/element_mixins_test.js
headless-squirrel-0.5.1 test/regression/prototype/unit/tests/element_mixins_test.js