commit/galaxy-central: davebgx: Modify test framework to account for recent UI changes.
1 new commit in galaxy-central: https://bitbucket.org/galaxy/galaxy-central/commits/f3c5d9a5ed95/ Changeset: f3c5d9a5ed95 User: davebgx Date: 2014-04-16 15:18:56 Summary: Modify test framework to account for recent UI changes. Affected #: 2 files diff -r 6f698dec58950f0f56421a13474df0359c0777d7 -r f3c5d9a5ed95956442dbd39e9ce97367cdc0d93b test/base/twilltestcase.py --- a/test/base/twilltestcase.py +++ b/test/base/twilltestcase.py @@ -385,12 +385,6 @@ return value == hda[ key ] return False - def clear_history( self ): - """Empties a history of all datasets""" - self.visit_page( "clear_history" ) - self.check_history_for_string( 'Your history is empty' ) - self.home() - def delete_history( self, id ): """Deletes one or more histories""" history_list = self.get_histories_as_data_list() @@ -466,7 +460,8 @@ self.visit_url( "%s/history_new?name=%s" % ( self.url, name ) ) else: self.visit_url( "%s/history_new" % self.url ) - self.check_history_for_string('Your history is empty') + self.check_page_for_string( 'New history created' ) + assert self.is_history_empty(), 'Creating new history did not result in an empty history.' self.home() def rename_history( self, id, old_name, new_name ): diff -r 6f698dec58950f0f56421a13474df0359c0777d7 -r f3c5d9a5ed95956442dbd39e9ce97367cdc0d93b test/functional/test_history_functions.py --- a/test/functional/test_history_functions.py +++ b/test/functional/test_history_functions.py @@ -98,7 +98,7 @@ if not historyB.deleted: raise AssertionError( "Problem deleting history id %d" % historyB.id ) # Since we deleted the current history, make sure the history frame was refreshed - self.check_history_for_string( 'Your history is empty.' ) + assert self.is_history_empty(), 'Deleting active history did not result in a new empty history being created.' # We'll now test deleting a list of histories # After deleting the current history, a new one should have been created global history1 @@ -121,7 +121,7 @@ ids = '%s,%s' % ( self.security.encode_id( history1.id ), self.security.encode_id( history2.id ) ) self.delete_history( ids ) # Since we deleted the current history, make sure the history frame was refreshed - self.check_history_for_string( 'Your history is empty.' ) + assert self.is_history_empty(), 'Deleting active history did not result in a new empty history being created.' try: self.view_stored_active_histories( strings_displayed=[ history1.name ] ) raise AssertionError( "History %s is displayed in the active history list after it was deleted" % history1.name ) @@ -790,7 +790,7 @@ self.check_page_for_string( 'hg15' ) self.assertEqual( len( self.get_history_as_data_list() ), 1 ) # Delete the history item - self.delete_history_item( str( latest_hda.id ), strings_displayed=[ "Your history is empty" ] ) + self.delete_history_item( str( latest_hda.id ), strings_displayed=[] ) self.assertEqual( len( self.get_history_as_data_list() ), 0 ) # Try deleting an invalid hid try: 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