diff --git a/.gitignore b/.gitignore index 5ab2e48380..bbc6363d52 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ openstack_dashboard/local/local_settings.py openstack_dashboard/local/local_settings.diff openstack_dashboard/local/.secret_key_store openstack_dashboard/test/.secret_key_store +openstack_dashboard/test/integration_tests/local-horizon.conf openstack_dashboard/wsgi/horizon.wsgi doc/build/ doc/source/sourcecode diff --git a/openstack_dashboard/test/integration_tests/README.rst b/openstack_dashboard/test/integration_tests/README.rst index dedf124a0d..e9d72c229e 100644 --- a/openstack_dashboard/test/integration_tests/README.rst +++ b/openstack_dashboard/test/integration_tests/README.rst @@ -8,7 +8,8 @@ Running the integration tests #. Set up an OpenStack server -#. Update the configuration file at `horizon.conf` +#. Update the configuration file at `horizon.conf` or add overrides + to that file in `local-horizon.conf` which is ignored by git. #. Run the tests. :: diff --git a/openstack_dashboard/test/integration_tests/config.py b/openstack_dashboard/test/integration_tests/config.py index a0662c4e0b..c4b0c287e3 100644 --- a/openstack_dashboard/test/integration_tests/config.py +++ b/openstack_dashboard/test/integration_tests/config.py @@ -85,6 +85,9 @@ SeleniumGroup = [ cfg.StrOpt('screenshots_directory', default="integration_tests_screenshots", help="Output screenshot directory"), + cfg.BoolOpt('maximize_browser', + default=True, + help="Is the browser size maximized for each test?"), ] ScenarioGroup = [ @@ -129,7 +132,12 @@ def _get_config_files(): 'integration_tests') conf_file = os.environ.get('HORIZON_INTEGRATION_TESTS_CONFIG_FILE', "%s/horizon.conf" % conf_dir) - return [conf_file] + config_files = [conf_file] + local_config = os.environ.get('HORIZON_INTEGRATION_TESTS_LOCAL_CONFIG', + "%s/local-horizon.conf" % conf_dir) + if os.path.isfile(local_config): + config_files.append(local_config) + return config_files def get_config(): diff --git a/openstack_dashboard/test/integration_tests/helpers.py b/openstack_dashboard/test/integration_tests/helpers.py index 40b63e4bb0..60b1b8df1d 100644 --- a/openstack_dashboard/test/integration_tests/helpers.py +++ b/openstack_dashboard/test/integration_tests/helpers.py @@ -86,7 +86,8 @@ class BaseTestCase(testtools.TestCase): self.driver = webdriver.WebDriverWrapper( desired_capabilities=desired_capabilities ) - self.driver.maximize_window() + if self.CONFIG.selenium.maximize_browser: + self.driver.maximize_window() self.driver.implicitly_wait(self.CONFIG.selenium.implicit_wait) self.driver.set_page_load_timeout( self.CONFIG.selenium.page_timeout) diff --git a/openstack_dashboard/test/integration_tests/horizon.conf b/openstack_dashboard/test/integration_tests/horizon.conf index 1da8357de7..fbfa378746 100644 --- a/openstack_dashboard/test/integration_tests/horizon.conf +++ b/openstack_dashboard/test/integration_tests/horizon.conf @@ -29,6 +29,10 @@ implicit_wait=10 # (integer value) explicit_wait=300 +# Maximize the browser window at the start of each test? +# (boolean) +maximize_browser=yes + [image] # http accessible image (string value) http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz