Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Fix for the failing uploader test; no code changes #337

Merged
merged 1 commit into from

2 participants

@allenrabinovich

A small filtering feature change in uploader resulted in a broken uploader test -- because the test didn't adequately populate the faux event facade. This change augments the test accordingly.

@davglass
Owner

This looks good, merge it so our builds can pass again. Thanks

@allenrabinovich allenrabinovich merged commit 85affcc into from
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
This page is out of date. Refresh to see the latest.
Showing with 12 additions and 11 deletions.
  1. +12 −11 src/uploader/tests/unit/uploaderhtml5.html
View
23 src/uploader/tests/unit/uploaderhtml5.html
@@ -87,6 +87,18 @@
var e = new Y.DOMEventFacade({type:'dragenter', preventDefault: function () {}, stopPropagation: function () {}});
+ Y.FileHTML5.prototype.isValidFile = function () { return true; };
+ Y.FileHTML5.prototype.canUpload = function () { return true; };
+
+ var filearray = [];
+
+ for (var i = 0; i <= 10; i++) {
+ filearray.push({name: i + ".jpg", size: i*1000, type: "jpg"});
+ }
+
+ e._event.dataTransfer = {files: filearray};
+ e._event.dataTransfer.types = ["Files"];
+
this.basicuploader._ddEventHandler(e);
e.type = 'dragleave';
@@ -99,17 +111,6 @@
e.type = 'drop';
- Y.FileHTML5.prototype.isValidFile = function () { return true; };
- Y.FileHTML5.prototype.canUpload = function () { return true; };
-
- var filearray = [];
-
- for (var i = 0; i <= 10; i++) {
- filearray.push({name: i + ".jpg", size: i*1000, type: "jpg"});
- }
-
- e._event.dataTransfer = {files: filearray};
-
this.basicuploader._ddEventHandler(e);
},
Something went wrong with that request. Please try again.