summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJenkins <jenkins@review.openstack.org>2016-02-11 12:05:05 +0000
committerGerrit Code Review <review@openstack.org>2016-02-11 12:05:06 +0000
commit5af1205c9ddb3e459c1124e957515d49874dc904 (patch)
treeeb4081bfdc764f4ec99c625f5e772e05ecdb96fe
parent39ece9b9a9fdc1358bfdb50b3bce530a8327ddf3 (diff)
parentaf505dacd1d8d64f602629fa2e334582c3a89d5b (diff)
Merge "Add configuration mechanism to turn off browser maximisation"
-rw-r--r--.gitignore1
-rw-r--r--openstack_dashboard/test/integration_tests/README.rst3
-rw-r--r--openstack_dashboard/test/integration_tests/config.py10
-rw-r--r--openstack_dashboard/test/integration_tests/helpers.py3
-rw-r--r--openstack_dashboard/test/integration_tests/horizon.conf4
5 files changed, 18 insertions, 3 deletions
diff --git a/.gitignore b/.gitignore
index 5ab2e48..bbc6363 100644
--- a/.gitignore
+++ b/.gitignore
@@ -21,6 +21,7 @@ openstack_dashboard/local/local_settings.py
21openstack_dashboard/local/local_settings.diff 21openstack_dashboard/local/local_settings.diff
22openstack_dashboard/local/.secret_key_store 22openstack_dashboard/local/.secret_key_store
23openstack_dashboard/test/.secret_key_store 23openstack_dashboard/test/.secret_key_store
24openstack_dashboard/test/integration_tests/local-horizon.conf
24openstack_dashboard/wsgi/horizon.wsgi 25openstack_dashboard/wsgi/horizon.wsgi
25doc/build/ 26doc/build/
26doc/source/sourcecode 27doc/source/sourcecode
diff --git a/openstack_dashboard/test/integration_tests/README.rst b/openstack_dashboard/test/integration_tests/README.rst
index dedf124..e9d72c2 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
8 8
9#. Set up an OpenStack server 9#. Set up an OpenStack server
10 10
11#. Update the configuration file at `horizon.conf` 11#. Update the configuration file at `horizon.conf` or add overrides
12 to that file in `local-horizon.conf` which is ignored by git.
12 13
13#. Run the tests. :: 14#. Run the tests. ::
14 15
diff --git a/openstack_dashboard/test/integration_tests/config.py b/openstack_dashboard/test/integration_tests/config.py
index a0662c4..c4b0c28 100644
--- a/openstack_dashboard/test/integration_tests/config.py
+++ b/openstack_dashboard/test/integration_tests/config.py
@@ -85,6 +85,9 @@ SeleniumGroup = [
85 cfg.StrOpt('screenshots_directory', 85 cfg.StrOpt('screenshots_directory',
86 default="integration_tests_screenshots", 86 default="integration_tests_screenshots",
87 help="Output screenshot directory"), 87 help="Output screenshot directory"),
88 cfg.BoolOpt('maximize_browser',
89 default=True,
90 help="Is the browser size maximized for each test?"),
88] 91]
89 92
90ScenarioGroup = [ 93ScenarioGroup = [
@@ -129,7 +132,12 @@ def _get_config_files():
129 'integration_tests') 132 'integration_tests')
130 conf_file = os.environ.get('HORIZON_INTEGRATION_TESTS_CONFIG_FILE', 133 conf_file = os.environ.get('HORIZON_INTEGRATION_TESTS_CONFIG_FILE',
131 "%s/horizon.conf" % conf_dir) 134 "%s/horizon.conf" % conf_dir)
132 return [conf_file] 135 config_files = [conf_file]
136 local_config = os.environ.get('HORIZON_INTEGRATION_TESTS_LOCAL_CONFIG',
137 "%s/local-horizon.conf" % conf_dir)
138 if os.path.isfile(local_config):
139 config_files.append(local_config)
140 return config_files
133 141
134 142
135def get_config(): 143def get_config():
diff --git a/openstack_dashboard/test/integration_tests/helpers.py b/openstack_dashboard/test/integration_tests/helpers.py
index 40b63e4..60b1b8d 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):
86 self.driver = webdriver.WebDriverWrapper( 86 self.driver = webdriver.WebDriverWrapper(
87 desired_capabilities=desired_capabilities 87 desired_capabilities=desired_capabilities
88 ) 88 )
89 self.driver.maximize_window() 89 if self.CONFIG.selenium.maximize_browser:
90 self.driver.maximize_window()
90 self.driver.implicitly_wait(self.CONFIG.selenium.implicit_wait) 91 self.driver.implicitly_wait(self.CONFIG.selenium.implicit_wait)
91 self.driver.set_page_load_timeout( 92 self.driver.set_page_load_timeout(
92 self.CONFIG.selenium.page_timeout) 93 self.CONFIG.selenium.page_timeout)
diff --git a/openstack_dashboard/test/integration_tests/horizon.conf b/openstack_dashboard/test/integration_tests/horizon.conf
index 1da8357..fbfa378 100644
--- a/openstack_dashboard/test/integration_tests/horizon.conf
+++ b/openstack_dashboard/test/integration_tests/horizon.conf
@@ -29,6 +29,10 @@ implicit_wait=10
29# (integer value) 29# (integer value)
30explicit_wait=300 30explicit_wait=300
31 31
32# Maximize the browser window at the start of each test?
33# (boolean)
34maximize_browser=yes
35
32[image] 36[image]
33# http accessible image (string value) 37# http accessible image (string value)
34http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz 38http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz