Fix to b0c8da2: fix collapse call to curr panel in options; Browser tests: fix history selectors, misc. fixes

This commit is contained in:
Carl Eberhard
2014-09-09 10:09:06 -04:00
parent 314c54a268
commit 12c03b57f4
8 changed files with 40 additions and 37 deletions
+1 -1
View File
@@ -66,7 +66,7 @@
},
"${_("Collapse Expanded Datasets")}": function() {
if( Galaxy && Galaxy.currHistoryPanel ){
Galaxy.currHistoryPanel.collapseAllHdaBodies();
Galaxy.currHistoryPanel.collapseAll();
}
},
"${_("Include Deleted Datasets")}": function( clickEvent, thisMenuOption ) {
+6 -6
View File
@@ -23,7 +23,7 @@ var tooltipSelector = spaceghost.data.selectors.tooltipBalloon,
unnamedName = spaceghost.historypanel.data.text.history.newName,
nameSelector = spaceghost.historypanel.data.selectors.history.name,
subtitleSelector = spaceghost.historypanel.data.selectors.history.subtitle,
sizeSelector = spaceghost.historypanel.data.selectors.history.size,
initialSizeStr = spaceghost.historypanel.data.text.history.newSize,
tagIconSelector = spaceghost.historypanel.data.selectors.history.tagIcon,
annoIconSelector = spaceghost.historypanel.data.selectors.history.annoIcon,
@@ -47,11 +47,11 @@ spaceghost.openHomePage().historypanel.waitForHdas( function testPanelStructure(
this.test.assertVisible( nameSelector, 'History name is visible' );
this.test.assertSelectorHasText( nameSelector, unnamedName, 'History name is ' + unnamedName );
this.test.comment( "history subtitle should display size and size should be 0 bytes" );
this.test.assertExists( subtitleSelector, 'Found ' + subtitleSelector );
this.test.assertVisible( subtitleSelector, 'History subtitle is visible' );
this.test.assertSelectorHasText( subtitleSelector, initialSizeStr,
'History subtitle has "' + initialSizeStr + '"' );
this.test.comment( "history should display size and size should be 0 bytes" );
this.test.assertExists( sizeSelector, 'Found ' + sizeSelector );
this.test.assertVisible( sizeSelector, 'History size is visible' );
this.test.assertSelectorHasText( sizeSelector, initialSizeStr,
'History size has "' + initialSizeStr + '"' );
this.test.comment( "NO tags or annotations icons should be available for an anonymous user" );
this.test.assertDoesntExist( tagIconSelector, 'Tag icon button not found' );
+2 -2
View File
@@ -8,7 +8,7 @@ spaceghost.test.begin( 'Test API functions for histories with an anonymous user'
spaceghost.start();
// =================================================================== TESTS
spaceghost.thenOpen( spaceghost.baseUrl ).waitForSelector( '.history-name' );
spaceghost.thenOpen( spaceghost.baseUrl ).waitForSelector( spaceghost.historypanel.data.selectors.history.name );
spaceghost.then( function(){
// ------------------------------------------------------------------------------------------- anon allowed
@@ -65,7 +65,7 @@ spaceghost.then( function(){
});
// ------------------------------------------------------------------------------------------- hdas
spaceghost.thenOpen( spaceghost.baseUrl ).waitForSelector( '.history-name' );
spaceghost.thenOpen( spaceghost.baseUrl ).waitForSelector( spaceghost.historypanel.data.selectors.history.name );
spaceghost.then( function(){
spaceghost.tools.uploadFile( '../../test-data/1.sam', function( uploadInfo ){
this.test.assert( uploadInfo.hdaElement !== null, "Convenience function produced hda" );
+12 -11
View File
@@ -27,6 +27,7 @@ var tooltipSelector = spaceghost.data.selectors.tooltipBalloon,
nameSelector = spaceghost.historypanel.data.selectors.history.name,
subtitleSelector = spaceghost.historypanel.data.selectors.history.subtitle,
sizeSelector = spaceghost.historypanel.data.selectors.history.size,
unnamedName = spaceghost.historypanel.data.text.history.newName,
initialSizeStr = spaceghost.historypanel.data.text.history.newSize,
tagIconSelector = spaceghost.historypanel.data.selectors.history.tagIcon,
@@ -64,11 +65,11 @@ spaceghost.openHomePage().historypanel.waitForHdas( function(){
this.test.assertVisible( nameSelector, 'History name is visible' );
this.test.assertSelectorHasText( nameSelector, unnamedName, 'History name is ' + unnamedName );
this.test.comment( "history subtitle should display size and size should be: " + initialSizeStr );
this.test.assertExists( subtitleSelector, 'Found ' + subtitleSelector );
this.test.assertVisible( subtitleSelector, 'History subtitle is visible' );
this.test.assertSelectorHasText( subtitleSelector, initialSizeStr,
'History subtitle has "' + initialSizeStr + '"' );
this.test.comment( "history should display size and size should be: " + initialSizeStr );
this.test.assertExists( sizeSelector, 'Found ' + sizeSelector );
this.test.assertVisible( sizeSelector, 'History size is visible' );
this.test.assertSelectorHasText( sizeSelector, initialSizeStr,
'History size has "' + initialSizeStr + '"' );
this.test.comment( "tags and annotation icons should be available" );
this.test.assertExists( tagIconSelector, 'Tag icon button found' );
@@ -157,12 +158,12 @@ spaceghost.then( function checkPanelStructure(){
this.test.assertSelectorHasText( nameSelector, newHistoryName, 'History name is ' + newHistoryName );
var onetxtFilesize = require( 'fs' ).size( filepathToUpload ),
expectedSubtitle = onetxtFilesize + ' bytes';
this.test.comment( "history subtitle should display size and size should be " + onetxtFilesize + " bytes" );
this.test.assertExists( subtitleSelector, 'Found ' + subtitleSelector );
this.test.assertVisible( subtitleSelector, 'History subtitle is visible' );
this.test.assertSelectorHasText( subtitleSelector, expectedSubtitle,
'History subtitle has "' + expectedSubtitle + '": ' + this.fetchText( subtitleSelector ).trim() );
expectedSize = onetxtFilesize + ' bytes';
this.test.comment( "history should display size and size should be " + onetxtFilesize + " bytes" );
this.test.assertExists( sizeSelector, 'Found ' + sizeSelector );
this.test.assertVisible( sizeSelector, 'History size is visible' );
this.test.assertSelectorHasText( sizeSelector, expectedSize,
'History size has "' + expectedSize + '": ' + this.fetchText( sizeSelector ).trim() );
this.test.comment( "tags and annotation icons should be available" );
this.test.assertExists( tagIconSelector, 'Tag icon button found' );
+2 -1
View File
@@ -17,7 +17,8 @@ if( spaceghost.fixtureData.testUser ){
password = spaceghost.fixtureData.testUser.password;
}
var userEmailSelector = '//a[contains(text(),"Logged in as")]';
//var userEmailSelector = '//a[contains(text(),"Logged in as")]';
var userEmailSelector = spaceghost.data.selectors.masthead.userMenu.userEmail_xpath;
// =================================================================== TESTS
// register a user (again...)
+10 -9
View File
@@ -356,15 +356,16 @@ HistoryPanel.prototype.data = {
},
selectors : {
history : {
title : '.history-title',
name : '.history-title .history-name',
nameEditableTextInput : '.history-name input',
subtitle : '.history-subtitle',
tagIcon : '.history-secondary-actions .history-tag-btn',
tagArea : '.history-controls .tags-display',
annoIcon : '.history-secondary-actions .history-annotate-btn',
annoArea : '.history-controls .annotation-display',
emptyMsg : '.empty-history-message',
title : '.controls .title',
name : '.title .name',
nameEditableTextInput : '.name input',
subtitle : '.subtitle',
size : '.history-size',
tagIcon : '.actions .history-tag-btn',
tagArea : '.controls .tags-display',
annoIcon : '.actions .history-annotate-btn',
annoArea : '.controls .annotation-display',
emptyMsg : '.empty-message',
hdaContainer: '.datasets-list'
},
hda : {
+6 -6
View File
@@ -56,14 +56,14 @@ User.prototype._submitRegistration = function _submitRegistration( email, passwo
// need manual submit (not a normal html form)
this.click( xpath( spaceghost.data.selectors.registrationPage.submit_xpath ) );
});
this.waitForNavigation( 'user/create', function afterRegister(){
// this.withMainPanel( function mainAfterRegister(){
// var messageInfo = spaceghost.getElementInfo( spaceghost.data.selectors.messages.all );
// spaceghost.debug( 'post registration message:\n' + spaceghost.jsonStr( messageInfo ) );
// });
});
});
this.waitForNavigation( 'user/create', function afterRegister(){
// this.withMainPanel( function mainAfterRegister(){
// var messageInfo = spaceghost.getElementInfo( spaceghost.data.selectors.messages.all );
// spaceghost.debug( 'post registration message:\n' + spaceghost.jsonStr( messageInfo ) );
// });
});
});
};
+1 -1
View File
@@ -638,7 +638,7 @@ SpaceGhost.prototype.waitForMultipleNavigation = function waitForMultipleNavigat
}
function catchNavReq( url ){
//this.debug( 'nav.req: ' + url );
this.debug( 'nav.req: ' + url );
for( var i=( urlsToWaitFor.length - 1 ); i>=0; i -= 1 ){
//this.debug( '\t checking: ' + urlsToWaitFor[i] );
if( urlMatches( urlsToWaitFor[i], url ) ){