diff options
author | Tatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com> | 2020-09-11 12:58:28 -0500 |
---|---|---|
committer | Tatiana Ovchinnikova <t.v.ovtchinnikova@gmail.com> | 2020-09-11 12:58:39 -0500 |
commit | 91298f9b5f89a7d1805a3ab252398274badf4372 (patch) | |
tree | 6b5377a834db41593e533e011dbec95018077b26 | |
parent | 2423bd0b04fdc62e92f86ca8d60df41ae1821c2b (diff) | |
download | horizon-91298f9b5f89a7d1805a3ab252398274badf4372.tar.gz |
Make getPorts and setBreadcrumb tests work
This patch adds expectations to the tests and make them work.
Partial-Bug: #1894127
Change-Id: Ic22033343c344a42148b0ec5a31bccb1e08478c6
2 files changed, 4 insertions, 1 deletions
diff --git a/horizon/static/framework/util/navigations/navigations.service.spec.js b/horizon/static/framework/util/navigations/navigations.service.spec.js index 44c3e3bfd..8a83a6430 100644 --- a/horizon/static/framework/util/navigations/navigations.service.spec.js +++ b/horizon/static/framework/util/navigations/navigations.service.spec.js @@ -154,7 +154,9 @@ describe('setBreadcrumb', function() { it('sets breadcrumb items from specified array', function() { - service.setBreadcrumb(breadcrumb); + service.setBreadcrumb(['Identity', 'Roles']); + expect(navigations.text('Identity').length).toBe(1); + expect(navigations.text('Roles').length).toBe(1); }); }); diff --git a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js index b165413af..d3b70cdf4 100644 --- a/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js +++ b/openstack_dashboard/dashboards/project/static/dashboard/project/workflow/launch-instance/launch-instance-model.service.spec.js @@ -621,6 +621,7 @@ neutronEnabled = true; model.initialize(true); scope.$apply(); + expect(model.newInstanceSpec.ports.length).toBe(0); }); it('should have the proper entries in allowedBootSources', function() { |