1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/70e221c1f382/ Changeset: 70e221c1f382 User: carlfeberhard Date: 2014-01-08 23:47:26 Summary: Functional browser tests: update history options tests Affected #: 3 files diff -r 97d124fbe9fbbe2e7026b92db35e77e87e4ef435 -r 70e221c1f38213b21c08ca44d9f92a892612d67b test/casperjs/history-options-tests.js --- a/test/casperjs/history-options-tests.js +++ b/test/casperjs/history-options-tests.js @@ -114,8 +114,15 @@ this.test.assertDoesntExist( '#' + testUploadInfo.hdaElement.attributes.id, "Deleted HDA is not in the DOM (using history options -> " + includeDeletedOptionsLabel + ")" ); }); +}); + +spaceghost.then( function(){ // undelete the uploaded file - this.historypanel.undeleteHda( '#' + testUploadInfo.hdaElement.attributes.id ); + this.historyoptions.includeDeleted( function(){ + this.historypanel.undeleteHda( '#' + testUploadInfo.hdaElement.attributes.id ); + spaceghost.debug( 'undeleted' ); + }); + }); // ------------------------------------------------------------------- hidden hdas aren't shown @@ -132,10 +139,8 @@ this.historyoptions.collapseExpanded( function(){ var uploadedSelector = '#' + testUploadInfo.hdaElement.attributes.id; - this.withHistoryPanel( function(){ - this.test.assertNotVisible( uploadedSelector + ' ' + this.historypanel.data.selectors.hda.body, - "Body for uploaded file is not visible" ); - }); + this.test.assertNotVisible( uploadedSelector + ' ' + this.historypanel.data.selectors.hda.body, + "Body for uploaded file is not visible" ); }); }); diff -r 97d124fbe9fbbe2e7026b92db35e77e87e4ef435 -r 70e221c1f38213b21c08ca44d9f92a892612d67b test/casperjs/modules/historyoptions.js --- a/test/casperjs/modules/historyoptions.js +++ b/test/casperjs/modules/historyoptions.js @@ -34,8 +34,11 @@ * @returns {Any} the return value of fn */ HistoryOptions.prototype.openMenu = function openMenu( fn ){ + return this.spaceghost.jumpToTop( function(){ - this.click( this.historyoptions.data.selectors.button ); + if( !spaceghost.visible( this.historyoptions.data.selectors.menu ) ){ + this.click( this.historyoptions.data.selectors.button ); + } return fn.call( this ); }); }; @@ -170,41 +173,32 @@ * @param {Function} then casper step to run when option is set */ HistoryOptions.prototype.includeDeleted = function includeDeleted( then ){ - return this.spaceghost.then( function(){ - this.historyoptions.toggle( this.historyoptions.data.labels.options.includeDeleted, true ); - this.historypanel.waitForHdas( then ); - }); + this.toggle( this.data.labels.options.includeDeleted, true ); + this.spaceghost.historypanel.waitForHdas( then ); }; /** set 'Include Deleted Datasets' to off * @param {Function} then casper step to run when option is set */ HistoryOptions.prototype.excludeDeleted = function excludeDeleted( then ){ - return this.spaceghost.then( function(){ - this.historyoptions.toggle( this.historyoptions.data.labels.options.includeDeleted, false ); - //TODO:?? this puts in the history frame. Is that what we want? - this.historypanel.waitForHdas( then ); - }); + this.toggle( this.data.labels.options.includeDeleted, false ); + this.spaceghost.historypanel.waitForHdas( then ); }; /** set 'Include Hidden Datasets' to on * @param {Function} then casper step to run when option is set */ HistoryOptions.prototype.includeHidden = function includeHidden( then ){ - return this.spaceghost.then( function(){ - this.historyoptions.toggle( this.historyoptions.data.labels.options.includeHidden, true ); - this.historypanel.waitForHdas( then ); - }); + this.toggle( this.data.labels.options.includeHidden, true ); + this.spaceghost.historypanel.waitForHdas( then ); }; /** set 'Include Hidden Datasets' to off * @param {Function} then casper step to run when option is set */ HistoryOptions.prototype.excludeHidden = function excludeHidden( then ){ - return this.spaceghost.then( function(){ - this.historyoptions.toggle( this.historyoptions.data.labels.options.includeHidden, false ); - this.historypanel.waitForHdas( then ); - }); + this.toggle( this.data.labels.options.includeHidden, false ); + this.spaceghost.historypanel.waitForHdas( then ); }; @@ -213,14 +207,14 @@ HistoryOptions.prototype.data = { selectors : { button : '#history-options-button', - buttonIcon : '#history-options-button span.fa-icon-cog', + buttonIcon : '#history-options-button span.fa-cog', menu : '#history-options-button-menu', optionXpathByLabelFn : function optionXpathByLabelFn( label ){ return xpath( '//ul[@id="history-options-button-menu"]/li/a[text()[contains(.,"' + label + '")]]' ); }, optionIsOnXpathByLabelFn : function optionIsOnXpathByLabelFn( label ){ return xpath( '//ul[@id="history-options-button-menu"]/li/a[text()[contains(.,"' + label + '")]]' - + '/span[@class="fa-icon-ok"]' ); + + '/span[@class="fa fa-check"]' ); } }, labels : { diff -r 97d124fbe9fbbe2e7026b92db35e77e87e4ef435 -r 70e221c1f38213b21c08ca44d9f92a892612d67b test/casperjs/modules/historypanel.js --- a/test/casperjs/modules/historypanel.js +++ b/test/casperjs/modules/historypanel.js @@ -271,7 +271,7 @@ */ HistoryPanel.prototype.undeleteHda = function undeleteHda( hdaSelector, whenUndeletedFn ){ this.spaceghost.historyoptions.includeDeleted( function(){ - this.click( hdaSelector + ' ' + this.historypanel.data.selectors.history.undeleteLink ); + this.click( hdaSelector + ' ' + this.historypanel.data.selectors.hda.undeleteLink ); this.historyoptions.excludeDeleted( function(){ this.info( 'hda undeleted: ' + hdaSelector ); if( utils.isFunction( whenUndeletedFn ) ){ whenUndeletedFn.call( this ); } @@ -338,7 +338,6 @@ annoArea : '.history-controls .annotation-display', emptyMsg : '.empty-history-message', hdaContainer: '.datasets-list' - //undeleteLink : '.historyItemUndelete', }, hda : { wrapper : { @@ -361,6 +360,9 @@ primaryActionButtons : '.dataset-actions .left', secondaryActionButtons : '.dataset-actions .right', + undeleteLink : '.dataset-undelete', + purgeLink : '.dataset-purge', + peek : '.dataset-peek' } }, 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.