mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[no-issue] improve test part 1 PS (#3006)
* remove testbed service process services * add appconfig in test log * test import fix
This commit is contained in:
@@ -15,13 +15,12 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { async } from '@angular/core/testing';
|
||||
import { AlfrescoApi } from 'alfresco-js-api';
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { mockError, fakeProcessFilters } from '../../mock';
|
||||
import { FilterProcessRepresentationModel } from '../models/filter-process.model';
|
||||
import { ProcessFilterService } from './process-filter.service';
|
||||
import { AlfrescoApiService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -32,14 +31,8 @@ describe('Process filter', () => {
|
||||
let alfrescoApi: AlfrescoApi;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
|
||||
providers: [
|
||||
ProcessFilterService
|
||||
]
|
||||
});
|
||||
service = TestBed.get(ProcessFilterService);
|
||||
apiService = TestBed.get(AlfrescoApiService);
|
||||
apiService = new AlfrescoApiService(new AppConfigService(null), new StorageService() );
|
||||
service = new ProcessFilterService(apiService);
|
||||
alfrescoApi = apiService.getInstance();
|
||||
});
|
||||
|
||||
|
@@ -15,15 +15,14 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { async } from '@angular/core/testing';
|
||||
import { AlfrescoApi } from 'alfresco-js-api';
|
||||
import { AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { exampleProcess, fakeProcessInstances } from '../../mock';
|
||||
import { mockError, fakeProcessDef, fakeTasksList } from '../../mock';
|
||||
import { ProcessFilterParamRepresentationModel } from '../models/filter-process.model';
|
||||
import { ProcessInstanceVariable } from '../models/process-instance-variable.model';
|
||||
import { ProcessService } from './process.service';
|
||||
import { AlfrescoApiService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let moment: any;
|
||||
|
||||
@@ -34,13 +33,8 @@ describe('ProcessService', () => {
|
||||
let alfrescoApi: AlfrescoApi;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
ProcessService
|
||||
]
|
||||
});
|
||||
service = TestBed.get(ProcessService);
|
||||
apiService = TestBed.get(AlfrescoApiService);
|
||||
apiService = new AlfrescoApiService(new AppConfigService(null), new StorageService() );
|
||||
service = new ProcessService(apiService);
|
||||
alfrescoApi = apiService.getInstance();
|
||||
});
|
||||
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { async } from '@angular/core/testing';
|
||||
import {
|
||||
fakeAppFilter,
|
||||
fakeAppPromise,
|
||||
@@ -23,22 +23,16 @@ import {
|
||||
} from '../../mock';
|
||||
import { FilterRepresentationModel } from '../models/filter.model';
|
||||
import { TaskFilterService } from './task-filter.service';
|
||||
import { AlfrescoApiService, LogService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
describe('Activiti Task filter Service', () => {
|
||||
|
||||
let service: TaskFilterService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
TaskFilterService
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
service = TestBed.get(TaskFilterService);
|
||||
jasmine.Ajax.install();
|
||||
});
|
||||
service = new TaskFilterService(new AlfrescoApiService(new AppConfigService(null), new StorageService()), new LogService(new AppConfigService(null)));
|
||||
jasmine.Ajax.install();
|
||||
}));
|
||||
|
||||
afterEach(() => {
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, TestBed } from '@angular/core/testing';
|
||||
import { async } from '@angular/core/testing';
|
||||
import { UserProcessModel } from '@alfresco/adf-core';
|
||||
import { Observable } from 'rxjs/Observable';
|
||||
import {
|
||||
@@ -37,6 +37,7 @@ import {
|
||||
import { FilterRepresentationModel, TaskQueryRequestRepresentationModel } from '../models/filter.model';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import { TaskListService } from './tasklist.service';
|
||||
import { AlfrescoApiService, LogService, AppConfigService, StorageService } from '@alfresco/adf-core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -45,14 +46,8 @@ describe('Activiti TaskList Service', () => {
|
||||
let service: TaskListService;
|
||||
|
||||
beforeEach(async(() => {
|
||||
TestBed.configureTestingModule({
|
||||
providers: [
|
||||
TaskListService
|
||||
]
|
||||
}).compileComponents().then(() => {
|
||||
service = TestBed.get(TaskListService);
|
||||
jasmine.Ajax.install();
|
||||
});
|
||||
service = new TaskListService(new AlfrescoApiService(new AppConfigService(null), new StorageService() ), new LogService(new AppConfigService(null)));
|
||||
jasmine.Ajax.install();
|
||||
}));
|
||||
|
||||
afterEach(() => {
|
||||
|
Reference in New Issue
Block a user