Commit 76d6b947 authored by worlword's avatar worlword

changed testcase for toolbar. now expects 3 buttons instead of 2

parent 83c0d42e
...@@ -46313,34 +46313,34 @@ __p += '\n'; ...@@ -46313,34 +46313,34 @@ __p += '\n';
return __p return __p
};}); };});
/* /*
The MIT License (MIT) The MIT License (MIT)
Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org> Copyright (c) 2014 Klaus Herberth <klaus@jsxc.org>
Permission is hereby granted, free of charge, to any person obtaining a copy Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions: furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software. all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE. THE SOFTWARE.
*/ */
/** /**
* Implements Http File Upload (XEP-0363) * Implements Http File Upload (XEP-0363)
* *
* @see {@link http://xmpp.org/extensions/xep-0363.html} * @see {@link http://xmpp.org/extensions/xep-0363.html}
*/ */
(function (root, factory) { (function (root, factory) {
define('converse-httpFileUpload',["converse-core"], factory); define('converse-httpFileUpload',["converse-core"], factory);
...@@ -46371,10 +46371,10 @@ return __p ...@@ -46371,10 +46371,10 @@ return __p
var file; var file;
var chatBox; var chatBox;
_converse.FileUpload = Backbone.NativeView.extend({ _converse.FileUpload = Backbone.NativeView.extend({
/** /**
* Set up http file upload. * Set up http file upload.
* *
* @param {*} connection the current strophe-connection * @param {*} connection the current strophe-connection
*/ */
initFiletransfer: function initFiletransfer() { initFiletransfer: function initFiletransfer() {
connection = _converse.connection; connection = _converse.connection;
...@@ -46388,9 +46388,9 @@ return __p ...@@ -46388,9 +46388,9 @@ return __p
this.discoverUploadService(); this.discoverUploadService();
}, },
/** /**
* Discover upload service for http upload. * Discover upload service for http upload.
* *
*/ */
discoverUploadService: function discoverUploadService() { discoverUploadService: function discoverUploadService() {
var self = this; var self = this;
...@@ -46411,11 +46411,11 @@ return __p ...@@ -46411,11 +46411,11 @@ return __p
}); });
}, },
/** /**
* Query item for upload service. * Query item for upload service.
* *
* @param {String} jid of the logged-in user * @param {String} jid of the logged-in user
* @param {Function} cb Callback on success * @param {Function} cb Callback on success
*/ */
queryItemForUploadService: function queryItemForUploadService(jid) { queryItemForUploadService: function queryItemForUploadService(jid) {
var self = this; var self = this;
...@@ -46436,11 +46436,11 @@ return __p ...@@ -46436,11 +46436,11 @@ return __p
}); });
}, },
/** /**
* Saves the file the user has picked. * Saves the file the user has picked.
* *
* @param {*} file the name of the file the user has picked. * @param {*} file the name of the file the user has picked.
* @param {*} chatBox the chatbox from which the user initiated the file-upload * @param {*} chatBox the chatbox from which the user initiated the file-upload
*/ */
setFile: function setFile(file1, chatBox1) { setFile: function setFile(file1, chatBox1) {
file = file1; file = file1;
...@@ -46448,10 +46448,10 @@ return __p ...@@ -46448,10 +46448,10 @@ return __p
this.sendFile(); this.sendFile();
}, },
/** /**
* Upload file. * Upload file.
* Waits till the Upload-Service is discovered and till the user has picked a file. * Waits till the Upload-Service is discovered and till the user has picked a file.
* *
*/ */
sendFile: function sendFile() { sendFile: function sendFile() {
var self = this; var self = this;
...@@ -46486,11 +46486,11 @@ return __p ...@@ -46486,11 +46486,11 @@ return __p
}); });
}, },
/** /**
* Request upload slot from xmpp-server * Request upload slot from xmpp-server
* *
* @param {File} file the file the user picked * @param {File} file the file the user picked
* @param {Function} cb Callback after finished request * @param {Function} cb Callback after finished request
*/ */
requestSlot: function requestSlot(file, cb) { requestSlot: function requestSlot(file, cb) {
var self = this; var self = this;
...@@ -46508,12 +46508,12 @@ return __p ...@@ -46508,12 +46508,12 @@ return __p
}); });
}, },
/** /**
* Upload the given file to the given url. * Upload the given file to the given url.
* *
* @param {String} url upload url * @param {String} url upload url
* @param {File} file the file the user picked * @param {File} file the file the user picked
* @param {Function} success_cb callback on successful transition * @param {Function} success_cb callback on successful transition
*/ */
uploadFile: function uploadFile(url, file, success_cb) { uploadFile: function uploadFile(url, file, success_cb) {
console.log("uploadFile start"); console.log("uploadFile start");
...@@ -46546,11 +46546,11 @@ return __p ...@@ -46546,11 +46546,11 @@ return __p
console.log("uploadFile end"); console.log("uploadFile end");
}, },
/** /**
* Process successful response to slot request. * Process successful response to slot request.
* *
* @param {String} stanza * @param {String} stanza
* @param {Function} cb * @param {Function} cb
*/ */
successfulRequestSlotCB: function successfulRequestSlotCB(stanza, cb) { successfulRequestSlotCB: function successfulRequestSlotCB(stanza, cb) {
var slot = stanza.getElementsByTagName('slot')[0]; var slot = stanza.getElementsByTagName('slot')[0];
...@@ -46567,11 +46567,11 @@ return __p ...@@ -46567,11 +46567,11 @@ return __p
} }
}, },
/** /**
* Process failed response to slot request. * Process failed response to slot request.
* *
* @param {String} stanza * @param {String} stanza
* @param {Function} cb * @param {Function} cb
*/ */
failedRequestSlotCB: function failedRequestSlotCB(stanza, cb) { failedRequestSlotCB: function failedRequestSlotCB(stanza, cb) {
chatBox.showHelpMessages([__('Fileupload failed')], 'info'); chatBox.showHelpMessages([__('Fileupload failed')], 'info');
...@@ -50410,7 +50410,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat ...@@ -50410,7 +50410,6 @@ function _typeof(obj) { if (typeof Symbol === "function" && typeof Symbol.iterat
}); });
return Backbone.VDOMView; return Backbone.VDOMView;
}); });
//# sourceMappingURL=backbone.vdomview.js.map;
(function (root, factory) { (function (root, factory) {
if (typeof define === 'function' && define.amd) { if (typeof define === 'function' && define.amd) {
define('converse-modal',["converse-core", "bootstrap", "underscore", "backbone", "backbone.vdomview"], factory); define('converse-modal',["converse-core", "bootstrap", "underscore", "backbone", "backbone.vdomview"], factory);
...@@ -416,7 +416,7 @@ ...@@ -416,7 +416,7 @@
expect(view).toBeDefined(); expect(view).toBeDefined();
var $toolbar = $(view.el).find('ul.chat-toolbar'); var $toolbar = $(view.el).find('ul.chat-toolbar');
expect($toolbar.length).toBe(1); expect($toolbar.length).toBe(1);
expect($toolbar.children('li').length).toBe(2); expect($toolbar.children('li').length).toBe(3);
done(); done();
})); }));
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment