summaryrefslogtreecommitdiff
path: root/openstack_dashboard/dashboards/project/images/tests.py
diff options
context:
space:
mode:
authorRichard Jones <r1chardj0n3s@gmail.com>2015-11-09 15:35:48 +1100
committerRichard Jones <r1chardj0n3s@gmail.com>2015-11-25 11:25:51 +1100
commit861f9c2c4afff891978cbe787b46528f5216a93c (patch)
tree343f977ba025ca1728534fe7a7bb19c807d55d6b /openstack_dashboard/dashboards/project/images/tests.py
parentab7d5c3ec5317dea2495b958c9f82b2716ba4b5a (diff)
downloadhorizon-861f9c2c4afff891978cbe787b46528f5216a93c.tar.gz
Enable PhantomJS for running Selenium tests
This patch enables the PhantomJS webdriver for running the Selenium test suite. Use it with the --selenium-phantomjs command-line switch when executing the selenium and integration suite. Change-Id: I443e6f6d7d1911df500b360f7c22686b417fbeae Blueprint: enable-phantomjs-selenium
Diffstat (limited to 'openstack_dashboard/dashboards/project/images/tests.py')
-rw-r--r--openstack_dashboard/dashboards/project/images/tests.py6
1 files changed, 6 insertions, 0 deletions
diff --git a/openstack_dashboard/dashboards/project/images/tests.py b/openstack_dashboard/dashboards/project/images/tests.py
index a1878eafa..e7d989e3a 100644
--- a/openstack_dashboard/dashboards/project/images/tests.py
+++ b/openstack_dashboard/dashboards/project/images/tests.py
@@ -17,7 +17,9 @@
# License for the specific language governing permissions and limitations
# under the License.
+import os
from socket import timeout as socket_timeout # noqa
+import unittest
from django.core.urlresolvers import reverse
from django import http
@@ -411,6 +413,8 @@ class SeleniumTests(test.SeleniumTestCase):
self.assertTrue("ISO" in body.text,
"ISO should be selected when the extension is *.iso")
+ @unittest.skipIf(os.environ.get('SELENIUM_PHANTOMJS'),
+ "PhantomJS cannot test file upload widgets.")
@test.create_stubs({api.glance: ('image_list_detailed',)})
def test_modal_create_image_from_file(self):
driver = self.selenium
@@ -471,6 +475,8 @@ class SeleniumTests(test.SeleniumTestCase):
self.assertTrue("ISO" in body.text,
"ISO should be selected when the extension is *.iso")
+ @unittest.skipIf(os.environ.get('SELENIUM_PHANTOMJS'),
+ "PhantomJS cannot test file upload widgets.")
@test.create_stubs({api.glance: ('image_list_detailed',)})
def test_create_image_from_file(self):
driver = self.selenium