Fix: phantomjs apparently lacks the bind fn on the Function prototype - correct failures in history-panel (line 252) by using underscore bind instead; up the standard upload timeout interval for api tests

This commit is contained in:
Carl Eberhard
2014-06-24 17:02:23 -04:00
parent a9cc12455c
commit bdcbb78fc0
2 changed files with 5 additions and 2 deletions
+1 -1
View File
@@ -249,7 +249,7 @@ var HistoryPanel = readonlyPanel.ReadOnlyHistoryPanel.extend(
actions.push( {
// TODO: Only show quick pair if two things selected.
html: _l( 'Build List of Dataset Pairs (Experimental)' ),
func: panel._showPairedCollectionModal.bind( panel )
func: _.bind( panel._showPairedCollectionModal, panel )
});
return new PopupMenu( $where.find( '.history-dataset-action-popup-btn' ), actions );
},
+4 -1
View File
@@ -555,7 +555,7 @@ ToolsAPI.prototype.upload = function upload( historyId, options ){
};
/** amount of time allowed to upload a file (before erroring) */
ToolsAPI.prototype.DEFAULT_UPLOAD_TIMEOUT = 12000;
ToolsAPI.prototype.DEFAULT_UPLOAD_TIMEOUT = 30 * 1000;
/** add two casperjs steps - upload a file, wait for the job to complete, and run 'then' when they are */
ToolsAPI.prototype.thenUpload = function thenUpload( historyId, options, then ){
@@ -569,6 +569,9 @@ ToolsAPI.prototype.thenUpload = function thenUpload( historyId, options, then ){
this.debug( 'uploadedId: ' + uploadedId );
});
spaceghost.debug( '---------------------------------------------------------- timeout: ' + ( options.timeout || spaceghost.api.tools.DEFAULT_UPLOAD_TIMEOUT ) );
spaceghost.debug( 'timeout: ' + options.timeout );
spaceghost.debug( 'timeout: ' + spaceghost.api.tools.DEFAULT_UPLOAD_TIMEOUT );
spaceghost.then( function(){
this.waitFor(
function testHdaState(){