mirror of
https://github.com/galaxyproject/galaxy.git
synced 2026-09-24 16:30:27 +08:00
Fix casper tests.
This commit is contained in:
@@ -48,7 +48,7 @@ var panelSectionKeys = [
|
||||
'id', 'name', 'description', 'version', 'inputs'
|
||||
],
|
||||
toolInputKeys = [
|
||||
'html', 'label', 'name', 'type'
|
||||
'label', 'name', 'type'
|
||||
// there are others, but it's not consistent across all inputs
|
||||
];
|
||||
|
||||
|
||||
@@ -189,8 +189,8 @@ HistoryOptions.prototype.data = {
|
||||
unhideHiddenDatasets : "Unhide Hidden Datasets",
|
||||
deleteHiddenDatasets : "Delete Hidden Datasets",
|
||||
showStructure : "Show Structure",
|
||||
exportCitations : "Export Citations",
|
||||
exportToFile : "Export to File",
|
||||
exportCitations : "Export Tool Citations",
|
||||
exportToFile : "Export History to File",
|
||||
deleteHistory : "Delete",
|
||||
//deleteHistoryPermanently : "Delete Permanently",
|
||||
//Other Actions
|
||||
|
||||
@@ -45,7 +45,7 @@ User.prototype._submitRegistration = function _submitRegistration( email, passwo
|
||||
};
|
||||
|
||||
spaceghost.openHomePage( function(){
|
||||
this.clickLabel( spaceghost.data.labels.masthead.menus.user );
|
||||
this.click( xpath( spaceghost.data.selectors.masthead.user ) )
|
||||
this.clickLabel( spaceghost.data.labels.masthead.userMenu.register );
|
||||
|
||||
this.waitForNavigation( 'user/create', function beforeRegister(){
|
||||
@@ -83,7 +83,7 @@ User.prototype._submitLogin = function _submitLogin( email, password ){
|
||||
};
|
||||
|
||||
spaceghost.openHomePage( function(){
|
||||
this.clickLabel( spaceghost.data.labels.masthead.menus.user );
|
||||
this.click( xpath( spaceghost.data.selectors.masthead.user ) )
|
||||
this.clickLabel( spaceghost.data.labels.masthead.userMenu.login );
|
||||
|
||||
this.waitForNavigation( 'user/login', function beforeLogin(){
|
||||
@@ -139,6 +139,7 @@ User.prototype.registerUser = function registerUser( email, password, username )
|
||||
*/
|
||||
User.prototype.login = function login( email, password ){
|
||||
var spaceghost = this.spaceghost;
|
||||
spaceghost.debug( '(' + spaceghost.getCurrentUrl() + ') attempting login with ' + email + ' using password ' + password );
|
||||
|
||||
this._submitLogin( email, password );
|
||||
//spaceghost.withMainPanel( function mainAfterLogin(){
|
||||
@@ -191,7 +192,8 @@ User.prototype.logout = function logout(){
|
||||
var spaceghost = this.spaceghost;
|
||||
this.spaceghost.openHomePage( function(){
|
||||
if( spaceghost.user.loggedInAs() ){
|
||||
spaceghost.clickLabel( spaceghost.data.labels.masthead.menus.user );
|
||||
this.click( xpath( spaceghost.data.selectors.masthead.user ) )
|
||||
//spaceghost.clickLabel( spaceghost.data.labels.masthead.menus.user );
|
||||
spaceghost.clickLabel( spaceghost.data.labels.masthead.userMenu.logout );
|
||||
spaceghost.waitForNavigation( 'user/logout', function _toLogoutPage() {
|
||||
spaceghost.clickLabel( 'go to the home page' );
|
||||
|
||||
@@ -26,7 +26,7 @@ spaceghost.test.begin( 'Testing registration of new users', 0, function suite( t
|
||||
this.user._submitRegistration( email, password, username, confirm );
|
||||
});
|
||||
spaceghost.openHomePage( function(){
|
||||
this.clickLabel( 'User' );
|
||||
this.click( xpath( spaceghost.data.selectors.masthead.user ) )
|
||||
var loggedInAs = this.fetchText( xpath( spaceghost.data.selectors.masthead.userMenu.userEmail_xpath ) );
|
||||
this.test.assert( loggedInAs.indexOf( email ) !== -1, 'found proper email in user menu: ' + loggedInAs );
|
||||
});
|
||||
|
||||
@@ -1162,7 +1162,7 @@ SpaceGhost.prototype.getUniverseSetting = function getUniverseSetting( iniKey ){
|
||||
};
|
||||
|
||||
SpaceGhost.prototype.waitForMasthead = function wait( then ) {
|
||||
return this.waitForText( this.data.labels.masthead.menus.user, then );
|
||||
return this.waitForText( this.data.labels.masthead.menus.analyze, then );
|
||||
};
|
||||
|
||||
|
||||
@@ -1193,7 +1193,8 @@ SpaceGhost.prototype.data = {
|
||||
adminLink : '#masthead a[href="/admin/index"]',
|
||||
userMenu : {
|
||||
userEmail_xpath : '//a[contains(text(),"Logged in as")]'
|
||||
}
|
||||
},
|
||||
user : '//ul[@id="user"]',
|
||||
},
|
||||
toolMenu : {
|
||||
container : '.toolMenuContainer'
|
||||
@@ -1225,7 +1226,12 @@ SpaceGhost.prototype.data = {
|
||||
labels : {
|
||||
masthead : {
|
||||
menus : {
|
||||
user : 'User'
|
||||
analyze: 'Analyze Data',
|
||||
workflow: 'Workflow',
|
||||
libraries: 'Shared Data',
|
||||
visualization: 'Visualization',
|
||||
help: 'Help',
|
||||
user : 'User',
|
||||
},
|
||||
userMenu : {
|
||||
register : 'Register',
|
||||
|
||||
Reference in New Issue
Block a user