From bdcbb78fc0b9cefb2a12bef1d3c434dbabaf2ee7 Mon Sep 17 00:00:00 2001 From: Carl Eberhard Date: Tue, 24 Jun 2014 17:02:23 -0400 Subject: [PATCH] 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 --- static/scripts/mvc/history/history-panel.js | 2 +- test/casperjs/modules/api.js | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/static/scripts/mvc/history/history-panel.js b/static/scripts/mvc/history/history-panel.js index 61727581812..e418ceefe33 100644 --- a/static/scripts/mvc/history/history-panel.js +++ b/static/scripts/mvc/history/history-panel.js @@ -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 ); }, diff --git a/test/casperjs/modules/api.js b/test/casperjs/modules/api.js index 7a13999ba47..be7dca9141a 100644 --- a/test/casperjs/modules/api.js +++ b/test/casperjs/modules/api.js @@ -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(){