Fix npm tests

pull/4338/head
Oliver Günther 9 years ago
parent 67e4551387
commit 75bbad146a
  1. 1
      frontend/app/components/context-menus/wp-context-menu/wp-context-menu.service.test.ts
  2. 3
      frontend/app/components/routing/wp-details/wp-details.controller.test.js
  3. 2
      frontend/app/components/wp-buttons/wp-list-view-button/wp-list-view-button.directive.test.ts
  4. 2
      frontend/app/components/wp-details/wp-details-toolbar.directive.html
  5. 3
      frontend/tests/unit/tests/work_packages/directives/work-package-details-toolbar-test.js

@ -37,6 +37,7 @@ describe('workPackageContextMenu', () => {
var ngContextMenu;
beforeEach(angular.mock.module('ng-context-menu',
'openproject',
'openproject.api',
'openproject.workPackages',
'openproject.models',

@ -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 = {

@ -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_) => {

@ -1,4 +1,4 @@
<div class="work-packages--details-toolbar" ng-hide="wpEditModeState.active || !wpEditModeState.form.isEditable">
<div class="work-packages--details-toolbar" ng-hide="wpEditModeState.active && !wpEditModeState.form.isEditable">
<button class="button -highlight" accesskey="3" ng-click="wpEditModeState.start()" ng-disabled="!wpEditModeState.form.isEditable">
<i class="button--icon icon-edit"></i>
<span class="button--text" ng-bind="::I18n.t('js.button_edit')"></span>

@ -30,11 +30,12 @@
describe('workPackageDetailsToolbar', function() {
var I18n, HookService, compile, scope, element, stateParams;
var html = "<work-package-details-toolbar work-package='workPackage'></work-package-details-toolbar>";
var html = "<wp-details-toolbar work-package='workPackage'></wp-details-toolbar>";
stateParams = {};
beforeEach(module('ui.router',
'openproject',
'openproject.workPackages.controllers',
'openproject.uiComponents',
'openproject.workPackages',

Loading…
Cancel
Save