From 69bb18a0e50535e4ec779e45e8ee1cdbe472e674 Mon Sep 17 00:00:00 2001 From: John Chilton Date: Wed, 18 Sep 2019 15:32:50 -0400 Subject: [PATCH] Rework SeleniumTestCase.ensure_registered to get test dumps. Looks like a lot of problems are happening before we even enter the test case - so our retry handling for instance will not work and we don't get pretty test outputs. --- test/selenium_tests/framework.py | 5 ++--- test/selenium_tests/test_library_landing.py | 1 + 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/test/selenium_tests/framework.py b/test/selenium_tests/framework.py index 3ad89b820c5..0c4fb2a320a 100644 --- a/test/selenium_tests/framework.py +++ b/test/selenium_tests/framework.py @@ -223,6 +223,8 @@ class SeleniumTestCase(FunctionalTestCase, NavigatesGalaxy, UsesApiTestCaseMixin Overriding this instead of setUp will ensure debug data such as screenshots and stack traces are dumped if there are problems with the setup and it will be re-ran on test retries. """ + if self.ensure_registered: + self.login() def tearDown(self): exception = None @@ -298,9 +300,6 @@ class SeleniumTestCase(FunctionalTestCase, NavigatesGalaxy, UsesApiTestCaseMixin self._setup_galaxy_logging() - if self.ensure_registered: - self.login() - def _setup_galaxy_logging(self): self.home() self.driver.execute_script(SETUP_LOGGING_JS) diff --git a/test/selenium_tests/test_library_landing.py b/test/selenium_tests/test_library_landing.py index 001e227030e..39d1d14eb05 100644 --- a/test/selenium_tests/test_library_landing.py +++ b/test/selenium_tests/test_library_landing.py @@ -10,6 +10,7 @@ class LibraryLandingTestCase(SeleniumTestCase): requires_admin = True def setup_with_driver(self): + super(LibraryLandingTestCase, self).setup_with_driver() self.admin_login() self.libraries_open()