AMBARI-20458 Admin/Version page doesn't mark StackAndVersion item as active (onechiporenko)
Project: http://git-wip-us.apache.org/repos/asf/ambari/repo Commit: http://git-wip-us.apache.org/repos/asf/ambari/commit/87d47f92 Tree: http://git-wip-us.apache.org/repos/asf/ambari/tree/87d47f92 Diff: http://git-wip-us.apache.org/repos/asf/ambari/diff/87d47f92 Branch: refs/heads/branch-feature-AMBARI-12556 Commit: 87d47f923505dd399f94c4bb97ed02c775bc0593 Parents: e34f41a Author: Oleg Nechiporenko <[email protected]> Authored: Wed Mar 15 14:18:35 2017 +0200 Committer: Oleg Nechiporenko <[email protected]> Committed: Wed Mar 15 14:18:35 2017 +0200 ---------------------------------------------------------------------- .../app/templates/main/side-menu-item.hbs | 2 +- ambari-web/test/views/main/menu_test.js | 52 +------------------- 2 files changed, 2 insertions(+), 52 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/ambari/blob/87d47f92/ambari-web/app/templates/main/side-menu-item.hbs ---------------------------------------------------------------------- diff --git a/ambari-web/app/templates/main/side-menu-item.hbs b/ambari-web/app/templates/main/side-menu-item.hbs index 44de409..38ae13d 100644 --- a/ambari-web/app/templates/main/side-menu-item.hbs +++ b/ambari-web/app/templates/main/side-menu-item.hbs @@ -35,7 +35,7 @@ <ul class="admin-submenu sub-menu nav nav-pills nav-stacked"> {{#each category in view.dropdownCategories}} {{#view view.AdminDropdownItemView itemBinding="category.name"}} - <a href="#" {{action "goToCategory" category.url target="view"}}>{{category.label}}</a> + <a {{bindAttr href="category.href"}} {{action "goToCategory" category.url target="view"}}>{{category.label}}</a> {{/view}} {{/each}} </ul> http://git-wip-us.apache.org/repos/asf/ambari/blob/87d47f92/ambari-web/test/views/main/menu_test.js ---------------------------------------------------------------------- diff --git a/ambari-web/test/views/main/menu_test.js b/ambari-web/test/views/main/menu_test.js index 658984c..f7dff30 100644 --- a/ambari-web/test/views/main/menu_test.js +++ b/ambari-web/test/views/main/menu_test.js @@ -24,7 +24,7 @@ describe('App.MainMenuView', function () { var view; beforeEach(function () { - view = App.MainSideMenuView.create() + view = App.MainSideMenuView.create(); }); describe("#views", function () { @@ -54,56 +54,6 @@ describe('App.MainMenuView', function () { }); }); - // todo: fix test - - //describe("#active", function () { - // - // beforeEach(function () { - // this.mock = sinon.stub(App.router, 'get'); - // }); - // - // afterEach(function () { - // this.mock.restore(); - // App.router.set('location.lastSetURL', '/login'); - // }); - // - // it("cluster not loaded", function () { - // this.mock.withArgs('clusterController.isLoaded').returns(false); - // itemViewClass.propertyDidChange('active'); - // expect(itemViewClass.get('active')).to.be.empty; - // }); - // - // it("cluster loaded, firstroute should be active", function () { - // this.mock.withArgs('clusterController.isLoaded').returns(true); - // App.router.set('location.lastSetURL', '/main/firstroute'); - // itemViewClass.propertyDidChange('active'); - // expect(itemViewClass.get('active')).to.be.equal('active'); - // }); - // - // it("cluster loaded, dashboard should be active", function () { - // itemViewClass.set('content.routing', ['dashboard']); - // this.mock.withArgs('clusterController.isLoaded').returns(true); - // App.router.set('location.lastSetURL', '/main'); - // itemViewClass.propertyDidChange('active'); - // expect(itemViewClass.get('active')).to.be.equal('active'); - // }); - // - // it("cluster loaded, should be undefined", function () { - // itemViewClass.set('content.routing', ['dashboard']); - // this.mock.withArgs('clusterController.isLoaded').returns(true); - // App.router.set('location.lastSetURL', ''); - // itemViewClass.propertyDidChange('active'); - // expect(itemViewClass.get('active')).to.be.undefined; - // }); - // - // it("cluster loaded, secondroute should not be active", function () { - // this.mock.withArgs('clusterController.isLoaded').returns(true); - // App.router.set('location.lastSetURL', '/main/secondroute'); - // itemViewClass.propertyDidChange('active'); - // expect(itemViewClass.get('active')).to.be.empty; - // }); - //}); - describe("#isViewsItem", function () { it("should be false", function() {
