From 8a867cee229b78f5bfde6a05fdbe0d7d3d608e11 Mon Sep 17 00:00:00 2001
From: Misko Hevery
Date: Fri, 22 Oct 2010 22:46:51 -0700
Subject: Workaround for http://bugs.jquery.com/ticket/7292
---
test/manual.html | 103 +++++++++++++++++++++++++++++++++++++++++++++++
test/testabilityPatch.js | 15 ++++++-
test/widgetsSpec.js | 6 +--
3 files changed, 119 insertions(+), 5 deletions(-)
create mode 100644 test/manual.html
(limited to 'test')
diff --git a/test/manual.html b/test/manual.html
new file mode 100644
index 00000000..3b1886f3
--- /dev/null
+++ b/test/manual.html
@@ -0,0 +1,103 @@
+
+
+
+ Jasmine Test Runner
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/test/testabilityPatch.js b/test/testabilityPatch.js
index 247faa19..b4602c39 100644
--- a/test/testabilityPatch.js
+++ b/test/testabilityPatch.js
@@ -1,5 +1,16 @@
-jstd = jstestdriver;
-dump = bind(jstd.console, jstd.console.log);
+/**
+ * Here is the problem: http://bugs.jquery.com/ticket/7292
+ * basically jQuery treats change event on some browsers (IE) as a
+ * special event and changes it form 'change' to 'click/keyup' and
+ * few others. This horrible hack removes the special treatment
+ */
+_jQuery.event.special.change = undefined;
+
+
+if (window.jstestdriver) {
+ jstd = jstestdriver;
+ dump = bind(jstd.console, jstd.console.log);
+}
beforeEach(function(){
this.addMatchers({
diff --git a/test/widgetsSpec.js b/test/widgetsSpec.js
index c0cdd565..df0941c0 100644
--- a/test/widgetsSpec.js
+++ b/test/widgetsSpec.js
@@ -345,9 +345,9 @@ describe("widget", function(){
it('should initialize to selected', function(){
compile(
'');
+ '' +
+ '' +
+ '');
expect(scope.selection).toEqual('B');
scope.selection = 'A';
scope.$eval();
--
cgit v1.2.3