Fix browser triggering in scenario to always do native events.

- Also fixed angular.suffix for scenarios
 - refactored click() to browserTrigger()
 - Fixed Rakefile with CSS and jQuery
This commit is contained in:
Misko Hevery
2010-10-19 15:34:58 -07:00
parent e7e894a2e3
commit 01c7abab35
16 changed files with 119 additions and 152 deletions

View File

@@ -189,25 +189,6 @@ function assertThrows(error, fn){
log = noop;
error = noop;
function click(element) {
element = jqLite(element);
var type = lowercase(element.attr('type'));
var name = lowercase(nodeName(element));
if (msie) {
if (name == 'input') {
if (type == 'radio' || type == 'checkbox') {
element[0].checked = ! element[0].checked;
}
}
}
if (name == 'option') {
element.parent().val(element.val());
JQLite.prototype.trigger.call(element.parent(), 'change');
} else {
JQLite.prototype.trigger.call(element, 'click');
}
}
function rethrow(e) {
if(e) {
throw e;