commit/galaxy-central: carlfeberhard: Functional browser tests: update history panel tests
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/b315c6178309/ Changeset: b315c6178309 User: carlfeberhard Date: 2014-01-08 21:41:32 Summary: Functional browser tests: update history panel tests Affected #: 3 files diff -r a7101734b29e8ff8aff0a8170bb8d0c5ec1a5455 -r b315c617830932da07e9cd3247790d3d2d3486c7 test/casperjs/history-panel-tests.js --- a/test/casperjs/history-panel-tests.js +++ b/test/casperjs/history-panel-tests.js @@ -40,7 +40,7 @@ // selectors and labels var tooltipSelector = spaceghost.data.selectors.tooltipBalloon, editableTextClass = spaceghost.data.selectors.editableText, - editableTextInput = spaceghost.data.selectors.editableTextInput, + editableTextInput = spaceghost.historypanel.data.selectors.history.nameEditableTextInput, nameSelector = spaceghost.historypanel.data.selectors.history.name, subtitleSelector = spaceghost.historypanel.data.selectors.history.subtitle, @@ -56,8 +56,7 @@ nameTooltip = spaceghost.historypanel.data.text.history.tooltips.name, refreshButtonSelector = 'a#history-refresh-button', - refreshButtonIconSelector = 'span.fa-icon-refresh', - refreshButtonHref = '/history', + refreshButtonIconSelector = 'span.fa-refresh', includeDeletedOptionsLabel = spaceghost.historyoptions.data.labels.options.includeDeleted; @@ -76,9 +75,6 @@ // ------------------------------------------------------------------- check structure of empty history spaceghost.thenOpen( spaceghost.baseUrl ).historypanel.waitForHdas( function(){ this.test.comment( 'history panel with a new, empty history should be well formed' ); - this.test.comment( "frame should have proper url and title: 'History'" ); - this.test.assertMatch( this.getCurrentUrl(), /\/history/, 'Found history frame url' ); - this.test.assertTitle( this.getTitle(), 'History', 'Found history frame title' ); this.test.comment( "history name should exist, be visible, and have text " + unnamedName ); this.test.assertExists( nameSelector, nameSelector + ' exists' ); @@ -103,11 +99,11 @@ }); // ------------------------------------------------------------------- name editing -spaceghost.withHistoryPanel( function(){ +spaceghost.then( function(){ this.test.comment( 'history panel, editing the history name' ); this.test.comment( 'name should have a tooltip with proper info on name editing' ); - this.historypanel.hoverOver( nameSelector ); + this.hoverOver( nameSelector ); this.test.assertExists( tooltipSelector, "Found tooltip after name hover" ); this.test.assertSelectorHasText( tooltipSelector, nameTooltip ); // clear the tooltip @@ -116,6 +112,7 @@ this.test.comment( 'name should be create an input when clicked' ); this.assertHasClass( nameSelector, editableTextClass, "Name field classed for editable text" ); this.click( nameSelector ); + spaceghost.debug( editableTextInput ); this.test.assertExists( editableTextInput, "Clicking on name creates an input" ); this.test.comment( 'name should be editable by entering keys and pressing enter' ); @@ -129,7 +126,7 @@ }); }); -spaceghost.withHistoryPanel( function(){ +spaceghost.then( function(){ this.test.comment( 'name should revert if user clicks away while editing' ); this.click( nameSelector ); @@ -142,7 +139,7 @@ }); }); -spaceghost.withHistoryPanel( function(){ +spaceghost.then( function(){ this.test.comment( 'name should revert if user hits ESC while editing' ); this.click( nameSelector ); @@ -168,7 +165,7 @@ testUploadInfo = _uploadInfo; }); -spaceghost.withHistoryPanel( function checkPanelStructure(){ +spaceghost.then( function checkPanelStructure(){ this.test.comment( 'checking structure of non-empty panel' ); this.test.comment( "history name should exist, be visible, and have text " + unnamedName ); @@ -196,7 +193,7 @@ // ------------------------------------------------------------------- tags // keeping this light here - better for it's own test file //TODO: check tooltips -spaceghost.withHistoryPanel( function openTags(){ +spaceghost.then( function openTags(){ this.test.comment( 'tag area should open when the history panel tag icon is clicked' ); this.click( tagIconSelector ); @@ -204,7 +201,7 @@ this.test.assertVisible( tagAreaSelector, 'Tag area is now displayed' ); }); }); -spaceghost.withHistoryPanel( function closeAnnotation(){ +spaceghost.then( function closeAnnotation(){ this.test.comment( 'annotation area should close when the history panel tag icon is clicked again' ); this.click( tagIconSelector ); @@ -216,7 +213,7 @@ // ------------------------------------------------------------------- annotation // keeping this light here - better for it's own test file //TODO: check tooltips -spaceghost.withHistoryPanel( function openAnnotation(){ +spaceghost.then( function openAnnotation(){ this.test.comment( 'annotation area should open when the history panel annotation icon is clicked' ); this.click( annoIconSelector ); @@ -224,7 +221,7 @@ this.test.assertVisible( annoAreaSelector, 'Annotation area is now displayed' ); }); }); -spaceghost.withHistoryPanel( function closeAnnotation(){ +spaceghost.then( function closeAnnotation(){ this.test.comment( 'annotation area should close when the history panel tag icon is clicked again' ); this.click( annoIconSelector ); @@ -240,12 +237,10 @@ this.test.assertExists( refreshButtonSelector, "Found refresh button" ); this.test.assertVisible( refreshButtonSelector, "Refresh button is visible" ); this.test.assertVisible( refreshButtonSelector + ' ' + refreshButtonIconSelector, "Refresh icon is visible" ); - this.test.assert( this.getElementAttribute( refreshButtonSelector, 'href' ) === refreshButtonHref, - "Refresh button has href: " + refreshButtonHref ); - this.assertNavigationRequested( refreshButtonHref, "History refreshed when clicking refresh icon", function(){ - this.click( refreshButtonSelector ); - }); + //this.assertNavigationRequested( refreshButtonHref, "History refreshed when clicking refresh icon", function(){ + // this.click( refreshButtonSelector ); + //}); }); // ------------------------------------------------------------------- hdas can be expanded by clicking on the hda name @@ -275,7 +270,7 @@ }); // ------------------------------------------------------------------- expanded hdas collapse by clicking name again -spaceghost.withHistoryPanel( function(){ +spaceghost.then( function(){ this.test.comment( 'Expanded hdas collapse by clicking name again' ); var uploadedSelector = '#' + testUploadInfo.hdaElement.attributes.id; diff -r a7101734b29e8ff8aff0a8170bb8d0c5ec1a5455 -r b315c617830932da07e9cd3247790d3d2d3486c7 test/casperjs/modules/historypanel.js --- a/test/casperjs/modules/historypanel.js +++ b/test/casperjs/modules/historypanel.js @@ -330,6 +330,7 @@ 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', diff -r a7101734b29e8ff8aff0a8170bb8d0c5ec1a5455 -r b315c617830932da07e9cd3247790d3d2d3486c7 test/casperjs/spaceghost.js --- a/test/casperjs/spaceghost.js +++ b/test/casperjs/spaceghost.js @@ -559,7 +559,7 @@ SpaceGhost.prototype.hoverOver = function hoverOver( selector, whenHovering ){ var elementInfo = this.getElementInfo( selector ); this.page.sendEvent( 'mousemove', elementInfo.x + 1, elementInfo.y + 1 ); - whenHovering.call( this ); + if( whenHovering ){ whenHovering.call( this ); } return this; }; @@ -1107,7 +1107,6 @@ tooltipBalloon : '.tooltip', editableText : '.editable-text', - editableTextInput : 'input#renaming-active', messages : { all : '[class*="message"]', 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