From 91298f9b5f89a7d1805a3ab252398274badf4372 Mon Sep 17 00:00:00 2001 From: Tatiana Ovchinnikova Date: Fri, 11 Sep 2020 12:58:28 -0500 Subject: [PATCH] Make getPorts and setBreadcrumb tests work This patch adds expectations to the tests and make them work. Partial-Bug: #1894127 Change-Id: Ic22033343c344a42148b0ec5a31bccb1e08478c6 --- .../framework/util/navigations/navigations.service.spec.js | 4 +++- .../launch-instance/launch-instance-model.service.spec.js | 1 + 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/horizon/static/framework/util/navigations/navigations.service.spec.js b/horizon/static/framework/util/navigations/navigations.service.spec.js index 44c3e3bfdc..8a83a6430e 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 b165413afd..d3b70cdf44 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() {