Merge "Add configuration mechanism to turn off browser maximisation"
This commit is contained in:
commit
5af1205c9d
1
.gitignore
vendored
1
.gitignore
vendored
@ -21,6 +21,7 @@ openstack_dashboard/local/local_settings.py
|
|||||||
openstack_dashboard/local/local_settings.diff
|
openstack_dashboard/local/local_settings.diff
|
||||||
openstack_dashboard/local/.secret_key_store
|
openstack_dashboard/local/.secret_key_store
|
||||||
openstack_dashboard/test/.secret_key_store
|
openstack_dashboard/test/.secret_key_store
|
||||||
|
openstack_dashboard/test/integration_tests/local-horizon.conf
|
||||||
openstack_dashboard/wsgi/horizon.wsgi
|
openstack_dashboard/wsgi/horizon.wsgi
|
||||||
doc/build/
|
doc/build/
|
||||||
doc/source/sourcecode
|
doc/source/sourcecode
|
||||||
|
@ -8,7 +8,8 @@ Running the integration tests
|
|||||||
|
|
||||||
#. Set up an OpenStack server
|
#. 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. ::
|
#. Run the tests. ::
|
||||||
|
|
||||||
|
@ -85,6 +85,9 @@ SeleniumGroup = [
|
|||||||
cfg.StrOpt('screenshots_directory',
|
cfg.StrOpt('screenshots_directory',
|
||||||
default="integration_tests_screenshots",
|
default="integration_tests_screenshots",
|
||||||
help="Output screenshot directory"),
|
help="Output screenshot directory"),
|
||||||
|
cfg.BoolOpt('maximize_browser',
|
||||||
|
default=True,
|
||||||
|
help="Is the browser size maximized for each test?"),
|
||||||
]
|
]
|
||||||
|
|
||||||
ScenarioGroup = [
|
ScenarioGroup = [
|
||||||
@ -129,7 +132,12 @@ def _get_config_files():
|
|||||||
'integration_tests')
|
'integration_tests')
|
||||||
conf_file = os.environ.get('HORIZON_INTEGRATION_TESTS_CONFIG_FILE',
|
conf_file = os.environ.get('HORIZON_INTEGRATION_TESTS_CONFIG_FILE',
|
||||||
"%s/horizon.conf" % conf_dir)
|
"%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():
|
def get_config():
|
||||||
|
@ -86,7 +86,8 @@ class BaseTestCase(testtools.TestCase):
|
|||||||
self.driver = webdriver.WebDriverWrapper(
|
self.driver = webdriver.WebDriverWrapper(
|
||||||
desired_capabilities=desired_capabilities
|
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.implicitly_wait(self.CONFIG.selenium.implicit_wait)
|
||||||
self.driver.set_page_load_timeout(
|
self.driver.set_page_load_timeout(
|
||||||
self.CONFIG.selenium.page_timeout)
|
self.CONFIG.selenium.page_timeout)
|
||||||
|
@ -29,6 +29,10 @@ implicit_wait=10
|
|||||||
# (integer value)
|
# (integer value)
|
||||||
explicit_wait=300
|
explicit_wait=300
|
||||||
|
|
||||||
|
# Maximize the browser window at the start of each test?
|
||||||
|
# (boolean)
|
||||||
|
maximize_browser=yes
|
||||||
|
|
||||||
[image]
|
[image]
|
||||||
# http accessible image (string value)
|
# http accessible image (string value)
|
||||||
http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
|
http_image=http://download.cirros-cloud.net/0.3.1/cirros-0.3.1-x86_64-uec.tar.gz
|
||||||
|
Loading…
x
Reference in New Issue
Block a user