mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Ivy compatible test modules (#5718)
* ivy compatible core unit tests * ivy compatible content tests * ivy compatible process tests * ivy compatible process cloud tests * ivy compatible insights tests * fix content test * fix content test
This commit is contained in:
@@ -23,6 +23,7 @@ import { AppDetailsCloudComponent } from './app-details-cloud.component';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { AppListCloudModule } from '../app-list-cloud.module';
|
||||
import { ApplicationInstanceModel } from '../models/application-instance.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AppDetailsCloudComponent', () => {
|
||||
|
||||
@@ -30,7 +31,11 @@ describe('AppDetailsCloudComponent', () => {
|
||||
let fixture: ComponentFixture<AppDetailsCloudComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, AppListCloudModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
AppListCloudModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -24,6 +24,7 @@ import { fakeApplicationInstance } from '../mock/app-model.mock';
|
||||
import { AppListCloudComponent } from './app-list-cloud.component';
|
||||
import { AppsProcessCloudService } from '../services/apps-process-cloud.service';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AppListCloudComponent', () => {
|
||||
|
||||
@@ -53,7 +54,10 @@ describe('AppListCloudComponent', () => {
|
||||
}
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [CustomEmptyAppListCloudTemplateComponent]
|
||||
});
|
||||
|
||||
|
@@ -17,12 +17,13 @@
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { throwError } from 'rxjs';
|
||||
import { setupTestBed, CoreModule, AppConfigService, AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-core';
|
||||
import { setupTestBed, CoreModule, AppConfigService, AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { HttpErrorResponse } from '@angular/common/http';
|
||||
import { AppsProcessCloudService } from './apps-process-cloud.service';
|
||||
import { fakeApplicationInstance } from '../mock/app-model.mock';
|
||||
import { ApplicationInstanceModel } from '../models/application-instance.model';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AppsProcessCloudService', () => {
|
||||
|
||||
@@ -37,9 +38,11 @@ describe('AppsProcessCloudService', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule.forRoot(), ProcessServiceCloudTestingModule],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock } ]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -1042,7 +1042,10 @@ describe('FormCloudWithCustomOutComesComponent', () => {
|
||||
let debugElement: DebugElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [FormCloudWithCustomOutComesComponent]
|
||||
});
|
||||
|
||||
|
@@ -24,6 +24,7 @@ import { FormDefinitionSelectorCloudComponent } from './form-definition-selector
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of } from 'rxjs';
|
||||
import { FormDefinitionSelectorCloudService } from '../services/form-definition-selector-cloud.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('FormDefinitionCloudComponent', () => {
|
||||
|
||||
@@ -33,7 +34,11 @@ describe('FormDefinitionCloudComponent', () => {
|
||||
let getFormsSpy: jasmine.Spy;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, StartTaskCloudTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
StartTaskCloudTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@@ -36,6 +36,7 @@ import { By } from '@angular/platform-browser';
|
||||
import { of } from 'rxjs';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { FormCloudModule } from '../../../form-cloud.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AttachFileCloudWidgetComponent', () => {
|
||||
let widget: AttachFileCloudWidgetComponent;
|
||||
@@ -109,6 +110,7 @@ describe('AttachFileCloudWidgetComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
FormCloudModule,
|
||||
ContentModule.forRoot()
|
||||
|
@@ -20,6 +20,7 @@ import { DateCloudWidgetComponent } from './date-cloud.widget';
|
||||
import { setupTestBed, FormFieldModel, FormModel } from '@alfresco/adf-core';
|
||||
import moment from 'moment-es6';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DateWidgetComponent', () => {
|
||||
|
||||
@@ -29,6 +30,7 @@ describe('DateWidgetComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
@@ -29,6 +29,7 @@ import {
|
||||
} from '@alfresco/adf-core';
|
||||
import { FormCloudService } from '../../../services/form-cloud.service';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('DropdownCloudWidgetComponent', () => {
|
||||
|
||||
@@ -52,6 +53,7 @@ describe('DropdownCloudWidgetComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
@@ -20,6 +20,7 @@ import { FormCloudService } from './form-cloud.service';
|
||||
import { AlfrescoApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { of } from 'rxjs';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -40,6 +41,7 @@ describe('Form Cloud service', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
@@ -19,6 +19,7 @@ import { TestBed } from '@angular/core/testing';
|
||||
import { AlfrescoApiService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { FormDefinitionSelectorCloudService } from './form-definition-selector-cloud.service';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -61,6 +62,7 @@ describe('Form Definition Selector Cloud Service', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
@@ -30,6 +30,7 @@ import {
|
||||
CoreModule
|
||||
} from '@alfresco/adf-core';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('GroupCloudComponent', () => {
|
||||
let component: GroupCloudComponent;
|
||||
@@ -51,6 +52,7 @@ describe('GroupCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
GroupCloudModule
|
||||
|
@@ -30,6 +30,7 @@ import { mockUsers } from '../mock/user-cloud.mock';
|
||||
import { PeopleCloudModule } from '../people-cloud.module';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('PeopleCloudComponent', () => {
|
||||
let component: PeopleCloudComponent;
|
||||
@@ -56,6 +57,7 @@ describe('PeopleCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
PeopleCloudModule
|
||||
|
@@ -21,6 +21,7 @@ import { IdentityUserService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { CancelProcessDirective } from './cancel-process.directive';
|
||||
import { processDetailsMockRunning, processDetailsMockCompleted } from '../mock/process-details.mock';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CancelProcessDirective', () => {
|
||||
|
||||
@@ -40,6 +41,7 @@ describe('CancelProcessDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -34,6 +34,7 @@ import moment from 'moment-es6';
|
||||
import { AbstractControl } from '@angular/forms';
|
||||
import { PROCESS_FILTERS_SERVICE_TOKEN } from '../../../services/cloud-token.service';
|
||||
import { LocalPreferenceCloudService } from '../../../services/local-preference-cloud.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('EditProcessFilterCloudComponent', () => {
|
||||
let component: EditProcessFilterCloudComponent;
|
||||
@@ -57,7 +58,11 @@ describe('EditProcessFilterCloudComponent', () => {
|
||||
});
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, ProcessFiltersCloudModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
ProcessFiltersCloudModule
|
||||
],
|
||||
providers: [
|
||||
MatDialog,
|
||||
{ provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }
|
||||
|
@@ -21,6 +21,7 @@ import { ProcessFilterDialogCloudComponent } from './process-filter-dialog-cloud
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { ProcessFiltersCloudModule } from '../process-filters-cloud.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ProcessFilterDialogCloudComponent', () => {
|
||||
let component: ProcessFilterDialogCloudComponent;
|
||||
@@ -36,7 +37,11 @@ describe('ProcessFilterDialogCloudComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, ProcessFiltersCloudModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
ProcessFiltersCloudModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MatDialogRef, useValue: mockDialogRef },
|
||||
{ provide: MAT_DIALOG_DATA, useValue: mockDialogData }
|
||||
|
@@ -28,6 +28,7 @@ import { ProcessFiltersCloudModule } from '../process-filters-cloud.module';
|
||||
import { FilterParamsModel } from '../../../task/task-filters/models/filter-cloud.model';
|
||||
import { PROCESS_FILTERS_SERVICE_TOKEN } from '../../../services/cloud-token.service';
|
||||
import { LocalPreferenceCloudService } from '../../../services/local-preference-cloud.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ProcessFiltersCloudComponent', () => {
|
||||
|
||||
@@ -77,7 +78,11 @@ describe('ProcessFiltersCloudComponent', () => {
|
||||
let fixture: ComponentFixture<ProcessFiltersCloudComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, ProcessFiltersCloudModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
ProcessFiltersCloudModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: PROCESS_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }
|
||||
]
|
||||
|
@@ -29,6 +29,7 @@ import {
|
||||
import { PROCESS_FILTERS_SERVICE_TOKEN } from '../../../services/cloud-token.service';
|
||||
import { LocalPreferenceCloudService } from '../../../services/local-preference-cloud.service';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ProcessFilterCloudService', () => {
|
||||
let service: ProcessFilterCloudService;
|
||||
@@ -42,6 +43,7 @@ describe('ProcessFilterCloudService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
providers: [
|
||||
|
@@ -23,6 +23,7 @@ import { ProcessServiceCloudTestingModule } from '../../../testing/process-servi
|
||||
import { ProcessHeaderCloudComponent } from './process-header-cloud.component';
|
||||
import { ProcessHeaderCloudModule } from '../process-header-cloud.module';
|
||||
import { ProcessCloudService } from '../../services/process-cloud.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const processInstanceDetailsCloudMock = {
|
||||
appName: 'app-form-mau',
|
||||
@@ -44,6 +45,7 @@ describe('ProcessHeaderCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
ProcessHeaderCloudModule
|
||||
]
|
||||
|
@@ -28,6 +28,7 @@ import { ProcessListCloudComponent } from './process-list-cloud.component';
|
||||
import { fakeCustomSchema, fakeProcessCloudList, processListSchemaMock } from '../mock/process-list-service.mock';
|
||||
import { of } from 'rxjs';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@@ -69,6 +70,7 @@ describe('ProcessListCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
@@ -255,7 +257,10 @@ describe('ProcessListCloudComponent', () => {
|
||||
let componentCustom: CustomTaskListComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [CustomTaskListComponent]
|
||||
});
|
||||
|
||||
@@ -283,7 +288,10 @@ describe('ProcessListCloudComponent', () => {
|
||||
let fixtureEmpty: ComponentFixture<EmptyTemplateComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [EmptyTemplateComponent]
|
||||
});
|
||||
|
||||
|
@@ -43,6 +43,7 @@ import {
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ProcessPayloadCloud } from '../models/process-payload-cloud.model';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('StartProcessCloudComponent', () => {
|
||||
|
||||
@@ -76,6 +77,7 @@ describe('StartProcessCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
FormsModule,
|
||||
MatCommonModule,
|
||||
|
@@ -21,6 +21,7 @@ import { UserPreferenceCloudService } from './user-preference-cloud.service';
|
||||
import { setupTestBed, AlfrescoApiServiceMock, AlfrescoApiService } from '@alfresco/adf-core';
|
||||
import { mockPreferences, getMockPreference, createMockPreference, updateMockPreference } from '../mock/user-preference.mock';
|
||||
import { ProcessServiceCloudTestingModule } from '../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('PreferenceService', () => {
|
||||
let service: UserPreferenceCloudService;
|
||||
@@ -50,7 +51,8 @@ describe('PreferenceService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
ProcessServiceCloudTestingModule
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
|
@@ -22,6 +22,7 @@ import { of } from 'rxjs';
|
||||
import { ClaimTaskDirective } from './claim-task.directive';
|
||||
import { taskClaimCloudMock } from '../task-header/mocks/fake-claim-task.mock';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('ClaimTaskDirective', () => {
|
||||
|
||||
@@ -43,6 +44,7 @@ describe('ClaimTaskDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [
|
||||
@@ -122,6 +124,7 @@ describe('Claim Task Directive validation errors', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -22,6 +22,7 @@ import { of } from 'rxjs';
|
||||
import { taskCompleteCloudMock } from '../task-header/mocks/fake-complete-task.mock';
|
||||
import { TaskCloudService } from '../services/task-cloud.service';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('CompleteTaskDirective', () => {
|
||||
|
||||
@@ -47,6 +48,7 @@ describe('CompleteTaskDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [
|
||||
@@ -142,6 +144,7 @@ describe('Complete Task Directive validation errors', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -22,6 +22,7 @@ import { of } from 'rxjs';
|
||||
import { UnClaimTaskDirective } from './unclaim-task.directive';
|
||||
import { taskClaimCloudMock } from '../task-header/mocks/fake-claim-task.mock';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('UnClaimTaskDirective', () => {
|
||||
|
||||
@@ -43,6 +44,7 @@ describe('UnClaimTaskDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [
|
||||
@@ -122,6 +124,7 @@ describe('UnClaim Task Directive validation errors', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
],
|
||||
declarations: [
|
||||
|
@@ -23,6 +23,7 @@ import { assignedTaskDetailsCloudMock, createdTaskDetailsCloudMock, emptyOwnerTa
|
||||
import { fakeTaskDetailsCloud } from '../task-header/mocks/fake-task-details-response.mock';
|
||||
import { cloudMockUser } from '../start-task/mock/user-cloud.mock';
|
||||
import { ProcessServiceCloudTestingModule } from '../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('Task Cloud Service', () => {
|
||||
|
||||
@@ -82,6 +83,7 @@ describe('Task Cloud Service', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
@@ -26,6 +26,7 @@ import { StartTaskCloudTestingModule } from '../testing/start-task-cloud.testing
|
||||
import { FormDefinitionSelectorCloudService } from '../../../form/services/form-definition-selector-cloud.service';
|
||||
import { TaskCloudService } from '../../services/task-cloud.service';
|
||||
import { StartTaskCloudRequestModel } from '../models/start-task-cloud-request.model';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('StartTaskCloudComponent', () => {
|
||||
|
||||
@@ -47,7 +48,11 @@ describe('StartTaskCloudComponent', () => {
|
||||
const mockUser: IdentityUserModel = {username: 'currentUser', firstName: 'Test', lastName: 'User', email: 'currentUser@test.com'};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, StartTaskCloudTestingModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
StartTaskCloudTestingModule
|
||||
],
|
||||
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
|
||||
});
|
||||
|
||||
|
@@ -34,6 +34,7 @@ import { TaskFilterDialogCloudComponent } from './task-filter-dialog-cloud.compo
|
||||
import { fakeFilter } from '../mock/task-filters-cloud.mock';
|
||||
import { AbstractControl } from '@angular/forms';
|
||||
import moment from 'moment-es6';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('EditTaskFilterCloudComponent', () => {
|
||||
let component: EditTaskFilterCloudComponent;
|
||||
@@ -45,7 +46,11 @@ describe('EditTaskFilterCloudComponent', () => {
|
||||
let getRunningApplicationsSpy: jasmine.Spy;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
TaskFiltersCloudModule
|
||||
],
|
||||
providers: [
|
||||
MatDialog,
|
||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }
|
||||
|
@@ -21,6 +21,7 @@ import { TaskFilterDialogCloudComponent } from './task-filter-dialog-cloud.compo
|
||||
import { TaskFiltersCloudModule } from '../task-filters-cloud.module';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('TaskFilterDialogCloudComponent', () => {
|
||||
let component: TaskFilterDialogCloudComponent;
|
||||
@@ -36,7 +37,11 @@ describe('TaskFilterDialogCloudComponent', () => {
|
||||
};
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
TaskFiltersCloudModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: MatDialogRef, useValue: mockDialogRef },
|
||||
{ provide: MAT_DIALOG_DATA, useValue: mockDialogData }
|
||||
|
@@ -28,6 +28,7 @@ import { By } from '@angular/platform-browser';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { TaskFiltersCloudModule } from '../task-filters-cloud.module';
|
||||
import { fakeGlobalFilter } from '../mock/task-filters-cloud.mock';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('TaskFiltersCloudComponent', () => {
|
||||
|
||||
@@ -53,7 +54,11 @@ describe('TaskFiltersCloudComponent', () => {
|
||||
let fixture: ComponentFixture<TaskFiltersCloudComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule, TaskFiltersCloudModule],
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
TaskFiltersCloudModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService }
|
||||
]
|
||||
|
@@ -24,6 +24,7 @@ import { ProcessServiceCloudTestingModule } from '../../../testing/process-servi
|
||||
import { TaskFormCloudComponent } from './task-form-cloud.component';
|
||||
import { TaskDetailsCloudModel } from '../../start-task/models/task-details-cloud.model';
|
||||
import { TaskCloudService } from '../../services/task-cloud.service';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
const taskDetails: TaskDetailsCloudModel = {
|
||||
appName: 'simple-app',
|
||||
@@ -52,7 +53,10 @@ describe('TaskFormCloudComponent', () => {
|
||||
let fixture: ComponentFixture<TaskFormCloudComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { TaskHeaderCloudComponent } from './task-header-cloud.component';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { setupTestBed, AppConfigService } from '@alfresco/adf-core';
|
||||
@@ -32,6 +31,7 @@ import {
|
||||
taskDetailsWithParentTaskIdMock
|
||||
} from '../mocks/task-details-cloud.mock';
|
||||
import moment from 'moment-es6';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('TaskHeaderCloudComponent', () => {
|
||||
let component: TaskHeaderCloudComponent;
|
||||
@@ -48,9 +48,9 @@ describe('TaskHeaderCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
TaskHeaderCloudModule,
|
||||
RouterTestingModule
|
||||
TaskHeaderCloudModule
|
||||
]
|
||||
});
|
||||
|
||||
|
@@ -26,6 +26,7 @@ import { of } from 'rxjs';
|
||||
import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module';
|
||||
import { Person } from '@alfresco/js-api';
|
||||
import { TaskListModule } from '@alfresco/adf-process-services';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
@@ -82,6 +83,7 @@ describe('TaskListCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
TaskListModule
|
||||
],
|
||||
@@ -298,6 +300,7 @@ describe('TaskListCloudComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule,
|
||||
TaskListModule
|
||||
],
|
||||
@@ -396,7 +399,10 @@ describe('TaskListCloudComponent', () => {
|
||||
let taskSpy: jasmine.Spy;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessServiceCloudTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
ProcessServiceCloudTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach( () => {
|
||||
|
@@ -36,8 +36,8 @@ import { RouterTestingModule } from '@angular/router/testing';
|
||||
HttpClientModule,
|
||||
NoopAnimationsModule,
|
||||
RouterTestingModule,
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
ProcessServicesCloudModule
|
||||
],
|
||||
providers: [
|
||||
|
Reference in New Issue
Block a user