hack karma tests by having ng1 injectables

pull/6229/head
Jens Ulferts 7 years ago
parent c394b9f8de
commit 4f93494b28
No known key found for this signature in database
GPG Key ID: 3CAA4B1182CF5308
  1. 12
      frontend/app/ng1-overwritten-injections.ts
  2. 1
      frontend/app/openproject-tests.js

@ -0,0 +1,12 @@
import {opServicesModule, opWorkPackagesModule} from 'core-app/angular-modules';
import {WorkPackageCacheService} from 'core-components/work-packages/work-package-cache.service';
import {SchemaCacheService} from 'core-components/schemas/schema-cache.service';
import {WorkPackageTableRefreshService} from 'core-components/wp-table/wp-table-refresh-request.service';
class Ng1WorkPackageCacheService extends WorkPackageCacheService {}
class Ng1SchemaCacheService extends SchemaCacheService {}
class Ng1WorkPackageTableRefreshService extends WorkPackageTableRefreshService {}
opWorkPackagesModule.service('wpCacheService', Ng1WorkPackageCacheService);
opWorkPackagesModule.service('schemaCacheService', Ng1SchemaCacheService);
opServicesModule.service('wpTableRefresh', Ng1WorkPackageTableRefreshService);

@ -27,6 +27,7 @@
//++
require('./init-app');
require('./ng1-overwritten-injections.ts');
require('angular-mocks/ngMock');
require('jquery-mockjax')(jQuery, window);

Loading…
Cancel
Save