diff --git a/openstack_dashboard/templates/jasmine/index.html b/openstack_dashboard/templates/jasmine/index.html deleted file mode 100644 index 3082deb73a..0000000000 --- a/openstack_dashboard/templates/jasmine/index.html +++ /dev/null @@ -1,15 +0,0 @@ - - - - Jasmine Spec Runner Index - -

Available tests

- - - - diff --git a/openstack_dashboard/templates/jasmine/jasmine.html b/openstack_dashboard/templates/jasmine/jasmine.html deleted file mode 100644 index 46cf002210..0000000000 --- a/openstack_dashboard/templates/jasmine/jasmine.html +++ /dev/null @@ -1,85 +0,0 @@ -{% load url from future %} - - - - Jasmine Spec Runner - - - - - - - - - - - - - - - - - - {% for file in sources %} - - {% endfor %} - - - {% for file in specs %} - - {% endfor %} - - - {% for file in HORIZON_CONFIG.js_files %} - - {% endfor %} - - - {% for file in HORIZON_CONFIG.js_spec_files %} - - {% endfor %} - - - - - - - - diff --git a/openstack_dashboard/test/jasmine/jasmine.py b/openstack_dashboard/test/jasmine/jasmine.py index 102b78945b..f72304d340 100644 --- a/openstack_dashboard/test/jasmine/jasmine.py +++ b/openstack_dashboard/test/jasmine/jasmine.py @@ -30,7 +30,7 @@ def dispatcher(request, test_name): if not test_name: return django.shortcuts.render( request, - "jasmine/index.html", + "horizon/jasmine/index.html", {'classes': (cls_name for cls_name, _ in classes)} ) else: @@ -39,7 +39,7 @@ def dispatcher(request, test_name): template = cls.template_name if not template: - template = "jasmine/jasmine.html" + template = "horizon/jasmine/jasmine.html" return django.shortcuts.render( request, diff --git a/openstack_dashboard/test/jasmine/jasmine_tests.py b/openstack_dashboard/test/jasmine/jasmine_tests.py index 81a911369e..a12919d048 100644 --- a/openstack_dashboard/test/jasmine/jasmine_tests.py +++ b/openstack_dashboard/test/jasmine/jasmine_tests.py @@ -14,14 +14,16 @@ # under the License. -from horizon.test import helpers as test +from horizon.test.jasmine import jasmine_tests as test LAUNCH_INST = "dashboard/launch-instance" -class ServicesTests(test.JasmineTests): - # sources would go here - sources = [ +class ServicesTests(test.ServicesTests): + + # We rely on sources from horizon + # therefore, we must append the sources + dashboard_sources = [ 'dashboard/dashboard.module.js', 'dashboard/workflow/workflow.js', LAUNCH_INST + '/launch-instance.js', @@ -33,7 +35,9 @@ class ServicesTests(test.JasmineTests): LAUNCH_INST + '/network/network.js', LAUNCH_INST + '/source/source.js', ] - # spec files would go here + + # We are only testing dashboard specs here + # so we override the parent specs specs = [ 'dashboard/dashboard.module.js', 'dashboard/workflow/workflow.js', @@ -46,5 +50,8 @@ class ServicesTests(test.JasmineTests): LAUNCH_INST + '/network/network.spec.js', LAUNCH_INST + '/source/source.spec.js', ] - externalTemplates = [ - ] + externalTemplates = [] + + def __init__(self, *args, **kwargs): + super(test.ServicesTests, self).__init__(*args, **kwargs) + self.sources = self.sources.extend(self.dashboard_sources)