From 432d01629ff7c3ce522b2b48f5863fa2c3468e3e Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Mon, 30 Nov 2015 15:12:35 +0100 Subject: [PATCH 1/2] Fix watchers panel --- .../wp-panels/watchers-panel/watchers-panel.directive.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.js b/frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.js index a89c19459d..337c657285 100644 --- a/frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.js +++ b/frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.js @@ -33,7 +33,7 @@ angular function watchersPanel() { return { restrict: 'E', - templateUrl: '/components/wp-panels/directives/watchers-panel.directive.html', + templateUrl: '/components/wp-panels/watchers-panel/watchers-panel.directive.html', scope: { workPackage: '=' }, From db5654569c51b71533468de34866acc3a7fbbc61 Mon Sep 17 00:00:00 2001 From: Alex Dik Date: Mon, 30 Nov 2015 15:47:28 +0100 Subject: [PATCH 2/2] Add watchers panel directive test --- .../watchers-panel.directive.test.js | 49 +++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.test.js diff --git a/frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.test.js b/frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.test.js new file mode 100644 index 0000000000..4b3dfc00f5 --- /dev/null +++ b/frontend/app/components/wp-panels/watchers-panel/watchers-panel.directive.test.js @@ -0,0 +1,49 @@ +// -- copyright +// OpenProject is a project management system. +// Copyright (C) 2012-2015 the OpenProject Foundation (OPF) +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License version 3. +// +// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows: +// Copyright (C) 2006-2013 Jean-Philippe Lang +// Copyright (C) 2010-2013 the ChiliProject Team +// +// This program is free software; you can redistribute it and/or +// modify it under the terms of the GNU General Public License +// as published by the Free Software Foundation; either version 2 +// of the License, or (at your option) any later version. +// +// This program is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with this program; if not, write to the Free Software +// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. +// +// See doc/COPYRIGHT.rdoc for more details. +// ++ + +describe('Watchers panel directive', function () { + var $compile, $rootScope, element; + + beforeEach(angular.mock.module('openproject.workPackages.controllers', function ($controllerProvider) { + $controllerProvider.register('WatchersPanelController', function () {}); + })); + + beforeEach(angular.mock.module('openproject.templates')); + + beforeEach(inject(function (_$compile_, _$rootScope_) { + $compile = _$compile_; + $rootScope = _$rootScope_; + + element = $compile('')($rootScope); + $rootScope.$digest(); + })); + + it('should should be rendered correctly', function () { + expect(element.html()).to.contain('detail-panel-watchers'); + }); +});