repo: janusweb action: commit revision: path_from: revision_from: 42f8fdcbcc80778b6b5cb7193dbcca4ac8c02520: path_to: revision_to:
commit 42f8fdcbcc80778b6b5cb7193dbcca4ac8c02520 Author: James BaicoianuDate: Tue May 31 13:45:07 2016 -0700 test screenshot uploading diff --git a/tests/janusweb.test.js b/tests/janusweb.test.js
--- a/tests/janusweb.test.js
+++ b/tests/janusweb.test.js
@@ -60,12 +60,30 @@ describe("JanusWeb", function() {
done();
});
});
-/*
it('takes a screenshot', function(done) {
setTimeout(function() {
expect(canvas).toBeDefined();
var shot = canvas.toDataURL('image/png');
+ elation.net.post('https://api.imgur.com/3/upload.json',
+ {
+ type: 'base64',
+ name: 'testscreenshot.png',
+ title: 'Test Screenshot',
+ image: shot.split(',')[1]
+ },
+ {
+ headers: {
+ Authorization: 'Client-ID 3c6bb1075f20701'
+ },
+ callback: function(data) {
+ var json = JSON.parse(data);
+ console.log('UPLOAD SUCCESS', json.data.link);
+ setTimeout( done, 1000);
+ }
+ });
+
+/*
var newimg = new Image();
newimg.src = shot;
newimg.crossOrigin = '';
@@ -79,8 +97,8 @@ describe("JanusWeb", function() {
expect(diff).toBe(true);
done();
});
+*/
}, 5000);
});
-*/
});
-----END OF PAGE-----