commit/galaxy-central: carlfeberhard: QA, casperjs: fix selectors changed in 7005608
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f926988f8e0a/ Changeset: f926988f8e0a User: carlfeberhard Date: 2014-08-12 17:42:03 Summary: QA, casperjs: fix selectors changed in 7005608 Affected #: 5 files diff -r 3aad77adffba5e3cbb8910ca21387c3effefc429 -r f926988f8e0a480c09d3462002f482b5ac806682 static/scripts/mvc/collection/collection-li.js --- a/static/scripts/mvc/collection/collection-li.js +++ b/static/scripts/mvc/collection/collection-li.js @@ -16,7 +16,11 @@ //logger : console, className : ListItemView.prototype.className + " dataset-collection", - /** */ + id : function(){ + return [ 'dataset_collection', this.model.get( 'id' ) ].join( '-' ); + }, + + /** jq speed for effects used */ fxSpeed : 'fast', //TODO: ununsed diff -r 3aad77adffba5e3cbb8910ca21387c3effefc429 -r f926988f8e0a480c09d3462002f482b5ac806682 static/scripts/mvc/dataset/dataset-li.js --- a/static/scripts/mvc/dataset/dataset-li.js +++ b/static/scripts/mvc/dataset/dataset-li.js @@ -16,6 +16,10 @@ //logger : console, className : _super.prototype.className + " dataset", + //TODO:?? doesn't exactly match an hda's type_id + id : function(){ + return [ 'dataset', this.model.get( 'id' ) ].join( '-' ); + }, /** Set up: instance vars, options, and event handlers */ initialize : function( attributes ){ @@ -240,7 +244,7 @@ // gen. safe to show in all cases return faIconButton({ title : _l( 'View details' ), - classes : 'dataset-params-btn', + classes : 'params-btn', href : this.model.urls.show_params, target : this.linkTarget, faIcon : 'fa-info-circle' diff -r 3aad77adffba5e3cbb8910ca21387c3effefc429 -r f926988f8e0a480c09d3462002f482b5ac806682 test/casperjs/hda-state-tests.js --- a/test/casperjs/hda-state-tests.js +++ b/test/casperjs/hda-state-tests.js @@ -321,7 +321,7 @@ // set state directly through model, wait for re-render //TODO: not ideal to test this this.evaluate( function(){ - return Galaxy.currHistoryPanel.model.hdas.at( 0 ).set( 'state', 'new' ); + return Galaxy.currHistoryPanel.model.contents.at( 0 ).set( 'state', 'new' ); }); this.wait( 1000, function(){ this.test.comment( 'HDAs in the "new" state should be well formed' ); @@ -359,7 +359,7 @@ var errorString = 'Blah!'; this.evaluate( function( errorString ){ - return Galaxy.currHistoryPanel.model.hdas.getByHid( 1 ).set( 'error', errorString ); + return Galaxy.currHistoryPanel.model.contents.getByHid( 1 ).set( 'error', errorString ); }, errorString ); // wait for re-render @@ -382,8 +382,8 @@ this.historypanel.thenCollapseHda( uploadSelector, function(){ this.evaluate( function(){ - Galaxy.currHistoryPanel.model.hdas.getByHid( 1 ).unset( 'error' ); - return Galaxy.currHistoryPanel.model.hdas.at( 0 ).set( 'state', 'ok' ); + Galaxy.currHistoryPanel.model.contents.getByHid( 1 ).unset( 'error' ); + return Galaxy.currHistoryPanel.model.contents.at( 0 ).set( 'state', 'ok' ); }); }); this.wait( 1000 ); diff -r 3aad77adffba5e3cbb8910ca21387c3effefc429 -r f926988f8e0a480c09d3462002f482b5ac806682 test/casperjs/history-panel-tests.js --- a/test/casperjs/history-panel-tests.js +++ b/test/casperjs/history-panel-tests.js @@ -230,6 +230,7 @@ // broken in webkit w/ jq 1.7 spaceghost.historypanel.waitForHdas( function(){ this.test.comment( 'HDAs can be expanded by clicking on the name' ); + this.debug( this.jsonStr( testUploadInfo ) ); var uploadedSelector = '#' + testUploadInfo.hdaElement.attributes.id; this.click( uploadedSelector + ' ' + this.historypanel.data.selectors.hda.title ); diff -r 3aad77adffba5e3cbb8910ca21387c3effefc429 -r f926988f8e0a480c09d3462002f482b5ac806682 test/casperjs/modules/historypanel.js --- a/test/casperjs/modules/historypanel.js +++ b/test/casperjs/modules/historypanel.js @@ -63,7 +63,7 @@ * @returns {Object|null} ElementInfo of the historyItemWrapper found, null if not found */ HistoryPanel.prototype.hdaElementInfoByTitle = function hdaElementInfoByTitle( title ){ - var wrapperXpath = xpath( '//span[@class="dataset-name" and contains(text(),"' + title + '")]/../../..' ); + var wrapperXpath = xpath( '//span[@class="name" and contains(text(),"' + title + '")]/../../..' ); return this.spaceghost.elementInfoOrNull( wrapperXpath ); }; @@ -138,9 +138,13 @@ if( state !== 'ok' ){ return false; } var hdaOpacity = this.evaluate( function( name ){ - return $( '.dataset-name:contains("' + name + '")' ).parents( '.hda' ).css( 'opacity' ); + // locate the hda by name and return its opacity + console.debug( name ); + console.debug( $( '.name:contains("' + name + '")' ) ); + console.debug( $( '.name:contains("' + name + '")' ).parents( '.hda' ) ); + return $( '.name:contains("' + name + '")' ).parents( '.dataset' ).css( 'opacity' ); }, hdaName ); - this.debug( 'fading in: ' + hdaOpacity ); + //this.debug( 'fading in: ' + hdaOpacity ); return hdaOpacity >= 1; }, function _then(){ then.call( this, hdaElement ); }, @@ -310,19 +314,19 @@ hdaTitleButtons : { // mixing text and selectors here display : { - selector : '.icon-btn.dataset-display', + selector : '.icon-btn.display-btn', tooltip : 'View data', hrefTpl : '/datasets/%s/display', nodeName : 'a' }, edit : { - selector : '.icon-btn.dataset-edit', + selector : '.icon-btn.edit-btn', tooltip : 'Edit attributes', hrefTpl : '/datasets/%s/edit', nodeName : 'a' }, 'delete' : { - selector : '.icon-btn.dataset-delete', + selector : '.icon-btn.delete-btn', tooltip : 'Delete', hrefTpl : 'javascript:void(0);', nodeName : 'a' @@ -330,19 +334,19 @@ }, hdaPrimaryActionButtons : { download : { - selector : '.icon-btn.dataset-download-btn', + selector : '.icon-btn.download-btn', tooltip : 'Download', hrefTpl : '/datasets/%s/display?to_ext=', nodeName : 'a' }, info : { - selector : '.icon-btn.dataset-params-btn', + selector : '.icon-btn.params-btn', tooltip : 'View details', hrefTpl : '/datasets/%s/show_params', nodeName : 'a' }, rerun : { - selector : '.icon-btn.dataset-rerun-btn', + selector : '.icon-btn.rerun-btn', tooltip : 'Run this job again', hrefTpl : '/tool_runner/rerun?id=%s', nodeName : 'a' @@ -365,7 +369,7 @@ }, hda : { wrapper : { - itemClass : '.hda', + itemClass : '.history-content.dataset', stateClasses : { prefix : 'state-', ok : 'state-ok', @@ -374,18 +378,18 @@ }, errorMessage : '.errormessagesmall', - title : '.dataset-title', - titleButtonArea : '.dataset-primary-actions', - summary : '.dataset-summary', - dbkey : '.dataset-dbkey .value', - info : '.dataset-info', - body : '.dataset-body', + title : '.title', + titleButtonArea : '.primary-actions', + summary : '.summary', + dbkey : '.dbkey .value', + info : '.info', + body : '.details', - primaryActionButtons : '.dataset-actions .left', - secondaryActionButtons : '.dataset-actions .right', + primaryActionButtons : '.actions .left', + secondaryActionButtons : '.actions .right', - undeleteLink : '.dataset-undelete', - purgeLink : '.dataset-purge', + undeleteLink : '.undelete-link', + purgeLink : '.purge-link', 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.
participants (1)
-
commits-noreply@bitbucket.org