From 75bbad146a5e0c3820c90fe94cf3850e308fc7dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Oliver=20G=C3=BCnther?= Date: Thu, 12 May 2016 16:30:05 +0200 Subject: [PATCH] Fix npm tests --- .../wp-context-menu/wp-context-menu.service.test.ts | 1 + .../routing/wp-details/wp-details.controller.test.js | 3 ++- .../wp-list-view-button/wp-list-view-button.directive.test.ts | 2 +- .../components/wp-details/wp-details-toolbar.directive.html | 2 +- .../directives/work-package-details-toolbar-test.js | 3 ++- 5 files changed, 7 insertions(+), 4 deletions(-) diff --git a/frontend/app/components/context-menus/wp-context-menu/wp-context-menu.service.test.ts b/frontend/app/components/context-menus/wp-context-menu/wp-context-menu.service.test.ts index 897ab7f48a..0f1cc48d27 100644 --- a/frontend/app/components/context-menus/wp-context-menu/wp-context-menu.service.test.ts +++ b/frontend/app/components/context-menus/wp-context-menu/wp-context-menu.service.test.ts @@ -37,6 +37,7 @@ describe('workPackageContextMenu', () => { var ngContextMenu; beforeEach(angular.mock.module('ng-context-menu', + 'openproject', 'openproject.api', 'openproject.workPackages', 'openproject.models', diff --git a/frontend/app/components/routing/wp-details/wp-details.controller.test.js b/frontend/app/components/routing/wp-details/wp-details.controller.test.js index aafaaad6c1..4831cc974d 100644 --- a/frontend/app/components/routing/wp-details/wp-details.controller.test.js +++ b/frontend/app/components/routing/wp-details/wp-details.controller.test.js @@ -122,8 +122,9 @@ describe('WorkPackageDetailsController', function() { $provide.constant('$stateParams', stateParams); })); - beforeEach(inject(function($rootScope, $controller, $timeout) { + beforeEach(inject(function($rootScope, $controller, $timeout, $httpBackend) { var workPackageId = 99; + $httpBackend.expectGET('/api/v3/work_packages/99').respond(workPackage); buildController = function() { var testState = { diff --git a/frontend/app/components/wp-buttons/wp-list-view-button/wp-list-view-button.directive.test.ts b/frontend/app/components/wp-buttons/wp-list-view-button/wp-list-view-button.directive.test.ts index 69e59881d2..442e040bc8 100644 --- a/frontend/app/components/wp-buttons/wp-list-view-button/wp-list-view-button.directive.test.ts +++ b/frontend/app/components/wp-buttons/wp-list-view-button/wp-list-view-button.directive.test.ts @@ -35,7 +35,7 @@ describe('wpListViewButton directive', () => { var controller:WorkPackageListViewButtonController; beforeEach(angular.mock.module( - 'openproject.wpButtons', 'openproject.templates', 'openproject.config' + 'openproject', 'openproject.wpButtons', 'openproject.templates', 'openproject.config' )); beforeEach(angular.mock.inject(($compile, $rootScope, _$state_) => { diff --git a/frontend/app/components/wp-details/wp-details-toolbar.directive.html b/frontend/app/components/wp-details/wp-details-toolbar.directive.html index 79c5b7f132..b2360e782c 100644 --- a/frontend/app/components/wp-details/wp-details-toolbar.directive.html +++ b/frontend/app/components/wp-details/wp-details-toolbar.directive.html @@ -1,4 +1,4 @@ -
+