1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/fdcd30ffdafd/ Changeset: fdcd30ffdafd User: carlfeberhard Date: 2013-07-23 19:55:39 Summary: base controller, get_history_dataset_association: remove deleted=False flag; api/histories, update: remove deleted flag; casperjs tests: update for previous and remove tool iframe code Affected #: 7 files diff -r 6187607058e66e1b8b31f2da905d603ae0c65f23 -r fdcd30ffdafd0a11ba7c90d5c01d1a3b5cb1f60c lib/galaxy/web/base/controller.py --- a/lib/galaxy/web/base/controller.py +++ b/lib/galaxy/web/base/controller.py @@ -512,7 +512,8 @@ """ #TODO: duplicate of above? alias to above (or vis-versa) self.security_check( trans, history, check_ownership=check_ownership, check_accessible=check_accessible ) - hda = self.get_object( trans, dataset_id, 'HistoryDatasetAssociation', check_ownership=False, check_accessible=False, deleted=False ) + hda = self.get_object( trans, dataset_id, 'HistoryDatasetAssociation', + check_ownership=False, check_accessible=False ) if check_accessible: if not trans.app.security_agent.can_access_dataset( trans.get_current_user_roles(), hda.dataset ): diff -r 6187607058e66e1b8b31f2da905d603ae0c65f23 -r fdcd30ffdafd0a11ba7c90d5c01d1a3b5cb1f60c lib/galaxy/webapps/galaxy/api/histories.py --- a/lib/galaxy/webapps/galaxy/api/histories.py +++ b/lib/galaxy/webapps/galaxy/api/histories.py @@ -193,7 +193,7 @@ """ #TODO: PUT /api/histories/{encoded_history_id} payload = { rating: rating } (w/ no security checks) try: - history = self.get_history( trans, id, check_ownership=True, check_accessible=True, deleted=True ) + history = self.get_history( trans, id, check_ownership=True, check_accessible=True ) # validation handled here and some parsing, processing, and conversion payload = self._validate_and_parse_update_payload( payload ) # additional checks here (security, etc.) diff -r 6187607058e66e1b8b31f2da905d603ae0c65f23 -r fdcd30ffdafd0a11ba7c90d5c01d1a3b5cb1f60c test/casperjs/api-hda-tests.js --- a/test/casperjs/api-hda-tests.js +++ b/test/casperjs/api-hda-tests.js @@ -217,7 +217,7 @@ deleted: true }); //this.debug( 'returned:\n' + this.jsonStr( returned ) ); - hdaShow = this.api.hdas.show( lastHistory.id, firstHda.id ); + hdaShow = this.api.hdas.show( lastHistory.id, firstHda.id, true ); this.test.assert( hdaShow.deleted === true, "Update set the deleted flag: " + hdaShow.deleted ); this.test.comment( 'update should allow changing the deleted flag back' ); diff -r 6187607058e66e1b8b31f2da905d603ae0c65f23 -r fdcd30ffdafd0a11ba7c90d5c01d1a3b5cb1f60c test/casperjs/api-history-tests.js --- a/test/casperjs/api-history-tests.js +++ b/test/casperjs/api-history-tests.js @@ -107,7 +107,7 @@ this.test.comment( 'A bad id to show should throw an error' ); this.assertRaises( function(){ this.api.histories.show( '1234123412341234' ); - }, 'Error in history API at showing history detail: 400 Bad Request', 'Raises an exception' ); + }, '400 Bad Request', 'Raises an exception' ); // ------------------------------------------------------------------------------------------- CREATE @@ -131,8 +131,10 @@ this.test.comment( 'calling delete should delete the given history and remove it from the standard index' ); var deletedHistory = this.api.histories.delete_( createdHistory.id ); //this.debug( 'returned from delete:\n' + this.jsonStr( deletedHistory ) ); - this.test.assert( deletedHistory === 'OK', - "Deletion returned 'OK' - even though that's not a great, informative response: " + deletedHistory ); + this.test.assert( deletedHistory.id === createdHistory.id, + "Deletion returned id matching created history: " + deletedHistory.id ); + this.test.assert( deletedHistory.deleted === true, + "Deletion return 'deleted: true': " + deletedHistory.deleted ); newFirstHistory = this.api.histories.index()[0]; //this.debug( 'newFirstHistory:\n' + this.jsonStr( newFirstHistory ) ); @@ -252,7 +254,7 @@ deleted: true }); //this.debug( 'returned:\n' + this.jsonStr( returned ) ); - historyShow = this.api.histories.show( newFirstHistory.id ); + historyShow = this.api.histories.show( newFirstHistory.id, true ); this.test.assert( historyShow.deleted === true, "Update set the deleted flag: " + historyShow.deleted ); this.test.comment( 'update should allow changing the deleted flag back' ); diff -r 6187607058e66e1b8b31f2da905d603ae0c65f23 -r fdcd30ffdafd0a11ba7c90d5c01d1a3b5cb1f60c test/casperjs/modules/api.js --- a/test/casperjs/modules/api.js +++ b/test/casperjs/modules/api.js @@ -261,7 +261,7 @@ }; HDAAPI.prototype.show = function show( historyId, id, deleted ){ - this.api.spaceghost.info( 'hdas.show: ' + [ historyId, id, (( deleted )?( 'w deleted' ):( '' )) ] ); + this.api.spaceghost.info( 'hdas.show: ' + [ historyId, id, (( deleted )?( 'w/deleted' ):( '' )) ] ); id = ( id === 'most_recently_used' )?( id ):( this.api.ensureId( id ) ); deleted = deleted || false; diff -r 6187607058e66e1b8b31f2da905d603ae0c65f23 -r fdcd30ffdafd0a11ba7c90d5c01d1a3b5cb1f60c test/casperjs/modules/tools.js --- a/test/casperjs/modules/tools.js +++ b/test/casperjs/modules/tools.js @@ -87,7 +87,7 @@ uploadInfo[ spaceghost.data.selectors.tools.upload.fileInput ] = filepath; // click the upload tool - spaceghost.thenOpen( spaceghost.baseUrl ).withToolPanel( function(){ + spaceghost.thenOpen( spaceghost.baseUrl, function(){ // we can apprently click a tool label without expanding the tool container for it this.clickLabel( spaceghost.data.labels.tools.upload.panelLabel ); this.jumpToMain( function(){ diff -r 6187607058e66e1b8b31f2da905d603ae0c65f23 -r fdcd30ffdafd0a11ba7c90d5c01d1a3b5cb1f60c test/casperjs/spaceghost.js --- a/test/casperjs/spaceghost.js +++ b/test/casperjs/spaceghost.js @@ -635,13 +635,6 @@ return this.withFrame( this.data.selectors.frames.history, then ); }; -/** Version of Casper#withFrame for the tool iframe. - * @param {Function} then function called when in the frame - */ -SpaceGhost.prototype.withToolPanel = function withToolPanel( then ){ - return this.withFrame( this.data.selectors.frames.tools, then ); -}; - /** Version of Casper#withFrame for the main iframe. * @param {Function} then function called when in the frame */ @@ -687,15 +680,6 @@ return this.jumpToFrame( this.data.selectors.frames.history, fn ); }; -/** Jumps into tools frame, exectutes fn, and jumps back to original frame. - * @param {Selector} frame the selector for the frame to jump to - * @param {Function} fn function called when in the frame - * @returns {Any} the return value of fn - */ -SpaceGhost.prototype.jumpToTools = function jumpToTools( fn ){ - return this.jumpToFrame( this.data.selectors.frames.tools, fn ); -}; - /** Jumps into main frame, exectutes fn, and jumps back to original frame. * @param {Selector} frame the selector for the frame to jump to * @param {Function} fn function called when in the frame @@ -1141,7 +1125,6 @@ frames : { main : 'galaxy_main', - tools : 'galaxy_tools', history : 'galaxy_history' }, Repository URL: https://bitbucket.org/galaxy/galaxy-central/ -- This is a commit notification from bitbucket.org. You are receiving this because you have the service enabled, addressing the recipient of this email.