mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Pre-Angular 9 upgrade fixes (#5712)
* remove deprecated angular/http * upgrade adf libs * fix production builds * ivy-compatible translate module usage * improved module usage * upgrade content services module * fix process services tests * upgrade process cloud tests * lint fixes * update core max size * fix insights test module * remove insights lazy loading workaround * fix insights module exports * * Fixed skipped form-cloud unit test and removed duplicated tests * cleanup the use of services Co-authored-by: sivakumar414ram <siva.kumar@muraai.com>
This commit is contained in:
@@ -43,7 +43,7 @@
|
||||
|
||||
<ng-template #empty>
|
||||
<div class="adf-app-list-empty" *ngIf="isEmpty()">
|
||||
<ng-content select="adf-custom-empty-content" *ngIf="hasEmptyCustomContentTemplate; else defaultEmptyTemplate" class="adf-custom-empty-template"></ng-content>
|
||||
<ng-content select="adf-custom-empty-content-template" *ngIf="hasEmptyCustomContentTemplate; else defaultEmptyTemplate" class="adf-custom-empty-template"></ng-content>
|
||||
|
||||
<ng-template #defaultEmptyTemplate>
|
||||
<adf-empty-content
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { DebugElement, Component, CUSTOM_ELEMENTS_SCHEMA } from '@angular/core';
|
||||
import { DebugElement, Component } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AppsProcessService, setupTestBed } from '@alfresco/adf-core';
|
||||
@@ -33,8 +33,21 @@ describe('AppsListComponent', () => {
|
||||
let service: AppsProcessService;
|
||||
let getAppsSpy: jasmine.Spy;
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<adf-apps>
|
||||
<adf-custom-empty-content-template>
|
||||
<p id="custom-id">No Apps</p>
|
||||
</adf-custom-empty-content-template>
|
||||
</adf-apps>
|
||||
`
|
||||
})
|
||||
class CustomEmptyAppListTemplateComponent {
|
||||
}
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessTestingModule]
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [CustomEmptyAppListTemplateComponent]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -235,43 +248,28 @@ describe('AppsListComponent', () => {
|
||||
expect(appEls[1].query(By.css('.adf-app-listgrid-item-card-actions-icon'))).not.toBeNull();
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
@Component({
|
||||
template: `
|
||||
<adf-apps>
|
||||
<adf-custom-empty-content>
|
||||
<p id="custom-id">No Apps</p>
|
||||
</adf-custom-empty-content>
|
||||
</adf-apps>
|
||||
`
|
||||
})
|
||||
class CustomEmptyAppListTemplateComponent {
|
||||
}
|
||||
describe('Custom CustomEmptyAppListTemplateComponent', () => {
|
||||
let customFixture: ComponentFixture<CustomEmptyAppListTemplateComponent>;
|
||||
|
||||
describe('Custom CustomEmptyAppListTemplateComponent', () => {
|
||||
let fixture: ComponentFixture<CustomEmptyAppListTemplateComponent>;
|
||||
beforeEach(() => {
|
||||
getAppsSpy.and.returnValue(of([]));
|
||||
customFixture = TestBed.createComponent(CustomEmptyAppListTemplateComponent);
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [CustomEmptyAppListTemplateComponent],
|
||||
schemas: [ CUSTOM_ELEMENTS_SCHEMA ]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
fixture = TestBed.createComponent(CustomEmptyAppListTemplateComponent);
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
fixture.destroy();
|
||||
});
|
||||
|
||||
it('should render the custom no-apps template', async(() => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
const title: any = fixture.debugElement.queryAll(By.css('#custom-id'));
|
||||
expect(title.length).toBe(1);
|
||||
expect(title[0].nativeElement.innerText).toBe('No Apps');
|
||||
customFixture.detectChanges();
|
||||
});
|
||||
}));
|
||||
|
||||
afterEach(() => {
|
||||
customFixture.destroy();
|
||||
});
|
||||
|
||||
it('should render the custom no-apps template', async(() => {
|
||||
customFixture.detectChanges();
|
||||
customFixture.whenStable().then(() => {
|
||||
const title: any = customFixture.debugElement.queryAll(By.css('#custom-id'));
|
||||
expect(title.length).toBe(1);
|
||||
expect(title[0].nativeElement.innerText).toBe('No Apps');
|
||||
});
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
@@ -20,7 +20,7 @@ import { AfterContentInit, Component, EventEmitter, Input, OnInit, Output, Conte
|
||||
import { Observable, Observer, of, Subject } from 'rxjs';
|
||||
import { AppDefinitionRepresentationModel } from '../task-list';
|
||||
import { IconModel } from './icon.model';
|
||||
import { share, takeUntil } from 'rxjs/operators';
|
||||
import { share, takeUntil, finalize } from 'rxjs/operators';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-apps',
|
||||
@@ -103,25 +103,25 @@ export class AppsListComponent implements OnInit, AfterContentInit, OnDestroy {
|
||||
|
||||
private load() {
|
||||
this.loading = true;
|
||||
this.appsProcessService.getDeployedApplications()
|
||||
.subscribe(
|
||||
(res: AppDefinitionRepresentationModel[]) => {
|
||||
this.filterApps(res).forEach((app: AppDefinitionRepresentationModel) => {
|
||||
if (this.isDefaultApp(app)) {
|
||||
app.theme = AppsListComponent.DEFAULT_TASKS_APP_THEME;
|
||||
app.icon = AppsListComponent.DEFAULT_TASKS_APP_ICON;
|
||||
this.appsObserver.next(app);
|
||||
} else if (app.deploymentId) {
|
||||
this.appsObserver.next(app);
|
||||
}
|
||||
this.loading = false;
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
this.error.emit(err);
|
||||
this.loading = false;
|
||||
}
|
||||
);
|
||||
this.appsProcessService
|
||||
.getDeployedApplications()
|
||||
.pipe(finalize(() => this.loading = false))
|
||||
.subscribe(
|
||||
(res: AppDefinitionRepresentationModel[]) => {
|
||||
this.filterApps(res).forEach((app) => {
|
||||
if (this.isDefaultApp(app)) {
|
||||
app.theme = AppsListComponent.DEFAULT_TASKS_APP_THEME;
|
||||
app.icon = AppsListComponent.DEFAULT_TASKS_APP_ICON;
|
||||
this.appsObserver.next(app);
|
||||
} else if (app.deploymentId) {
|
||||
this.appsObserver.next(app);
|
||||
}
|
||||
});
|
||||
},
|
||||
(err) => {
|
||||
this.error.emit(err);
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
isDefaultApp(app) {
|
||||
|
@@ -19,8 +19,8 @@ import { TestBed } from '@angular/core/testing';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { AttachFileWidgetDialogService } from './attach-file-widget-dialog.service';
|
||||
import { Subject, of } from 'rxjs';
|
||||
import { setupTestBed, CoreModule } from '@alfresco/adf-core';
|
||||
import { ProcessModule } from '../process.module';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
|
||||
describe('AttachFileWidgetDialogService', () => {
|
||||
|
||||
@@ -30,8 +30,7 @@ describe('AttachFileWidgetDialogService', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
ProcessModule.forRoot()
|
||||
ProcessTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
|
@@ -20,12 +20,10 @@ import { TestBed, ComponentFixture } from '@angular/core/testing';
|
||||
import { Observable, of, throwError } from 'rxjs';
|
||||
import { FormFieldModel, FormFieldTypes, FormModel, FormOutcomeEvent, FormOutcomeModel,
|
||||
FormService, WidgetVisibilityService, NodeService, ContainerModel, fakeForm,
|
||||
setupTestBed, CoreModule } from '@alfresco/adf-core';
|
||||
setupTestBed } from '@alfresco/adf-core';
|
||||
import { FormComponent } from './form.component';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { FormModule } from './form.module';
|
||||
import { ContentWidgetModule } from '../content-widget/content-widget.module';
|
||||
import { ProcessFormRenderingService } from './process-form-rendering.service';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
|
||||
describe('FormComponent', () => {
|
||||
|
||||
@@ -54,10 +52,7 @@ describe('FormComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CoreModule.forRoot(),
|
||||
FormModule,
|
||||
ContentWidgetModule,
|
||||
ProcessTestingModule,
|
||||
CustomUploadModule
|
||||
]
|
||||
});
|
||||
|
@@ -22,11 +22,11 @@ import { ComponentFixture, fakeAsync, TestBed, tick } from '@angular/core/testin
|
||||
import { By } from '@angular/platform-browser';
|
||||
|
||||
import { formDefinitionDropdownField, formDefinitionTwoTextFields,
|
||||
formDefinitionRequiredField, FormService, setupTestBed, CoreModule,
|
||||
formDefinitionRequiredField, FormService, setupTestBed,
|
||||
formDefVisibilitiFieldDependsOnNextOne, formDefVisibilitiFieldDependsOnPreviousOne,
|
||||
formReadonlyTwoTextFields } from '@alfresco/adf-core';
|
||||
import { FormComponent } from './form.component';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
|
||||
/** Duration of the select opening animation. */
|
||||
const SELECT_OPEN_ANIMATION = 200;
|
||||
@@ -48,11 +48,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
FormComponent
|
||||
ProcessTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
@@ -24,9 +24,9 @@ import {
|
||||
startFormAmountWidgetMock, startFormNumberWidgetMock, startFormRadioButtonWidgetMock
|
||||
} from './start-form.component.mock';
|
||||
import { StartFormComponent } from './start-form.component';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { FormService, WidgetVisibilityService, setupTestBed, CoreModule, FormModel, FormOutcomeModel } from '@alfresco/adf-core';
|
||||
import { FormService, WidgetVisibilityService, setupTestBed, FormModel, FormOutcomeModel } from '@alfresco/adf-core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
|
||||
describe('StartFormComponent', () => {
|
||||
|
||||
@@ -42,11 +42,7 @@ describe('StartFormComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CoreModule.forRoot()
|
||||
],
|
||||
declarations: [
|
||||
StartFormComponent
|
||||
ProcessTestingModule
|
||||
],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
@@ -19,8 +19,8 @@ import { Component } from '@angular/core';
|
||||
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { ProcessService } from './../services/process.service';
|
||||
import { ProcessAuditDirective } from './process-audit.directive';
|
||||
import { setupTestBed, CoreModule, DownloadService } from '@alfresco/adf-core';
|
||||
import { setupTestBed, DownloadService } from '@alfresco/adf-core';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-basic-button',
|
||||
@@ -71,11 +71,10 @@ describe('ProcessAuditDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
ProcessTestingModule
|
||||
],
|
||||
declarations: [
|
||||
BasicButtonComponent,
|
||||
ProcessAuditDirective
|
||||
BasicButtonComponent
|
||||
]
|
||||
});
|
||||
|
||||
|
@@ -16,15 +16,15 @@
|
||||
*/
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, SimpleChange } from '@angular/core';
|
||||
import { AppsProcessService, CoreModule, setupTestBed } from '@alfresco/adf-core';
|
||||
import { AppsProcessService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { from } from 'rxjs';
|
||||
import { FilterProcessRepresentationModel } from '../models/filter-process.model';
|
||||
import { ProcessFilterService } from '../services/process-filter.service';
|
||||
import { ProcessFiltersComponent } from './process-filters.component';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { fakeProcessFilters } from '../../mock';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
|
||||
describe('ProcessFiltersComponent', () => {
|
||||
|
||||
@@ -37,10 +37,8 @@ describe('ProcessFiltersComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CoreModule.forRoot()
|
||||
ProcessTestingModule
|
||||
],
|
||||
declarations: [ProcessFiltersComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@@ -21,13 +21,12 @@ import { of, throwError, Subject } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ProcessInstanceListComponent } from './process-list.component';
|
||||
import {
|
||||
AppConfigService, setupTestBed, CoreModule, DataTableModule, DataRow, DataColumn,
|
||||
AppConfigService, setupTestBed, DataRow, DataColumn,
|
||||
DataRowEvent, ObjectDataRow, ObjectDataTableAdapter, DataCellEvent
|
||||
} from '@alfresco/adf-core';
|
||||
import { fakeProcessInstance, fakeProcessInstancesWithNoName, fakeProcessInstancesEmpty, fakeProcessCustomSchema } from '../../mock';
|
||||
import { ProcessService } from '../services/process.service';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { ProcessListModule } from '../process-list.module';
|
||||
|
||||
describe('ProcessInstanceListComponent', () => {
|
||||
|
||||
@@ -465,9 +464,8 @@ describe('CustomProcessListComponent', () => {
|
||||
let component: CustomProcessListComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule.forRoot()],
|
||||
declarations: [ProcessInstanceListComponent, CustomProcessListComponent],
|
||||
providers: [ProcessService]
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [CustomProcessListComponent]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -501,7 +499,7 @@ describe('Process List: Custom EmptyTemplateComponent', () => {
|
||||
let processService: ProcessService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessTestingModule, ProcessListModule, DataTableModule],
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [EmptyTemplateComponent]
|
||||
});
|
||||
|
||||
@@ -600,9 +598,8 @@ describe('ProcessListContextMenuComponent', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule.forRoot()],
|
||||
declarations: [ProcessInstanceListComponent, ProcessListContextMenuComponent],
|
||||
providers: [ProcessService]
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [ProcessListContextMenuComponent]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -24,8 +24,8 @@ import {
|
||||
} from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
import { setupTestBed, CoreModule } from '@alfresco/adf-core';
|
||||
import { TaskAuditDirective } from './task-audit.directive';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -75,8 +75,8 @@ describe('TaskAuditDirective', () => {
|
||||
}
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule.forRoot()],
|
||||
declarations: [BasicButtonComponent, TaskAuditDirective]
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [BasicButtonComponent]
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@@ -28,9 +28,7 @@ import {
|
||||
BpmUserService,
|
||||
CommentProcessService, LogService, AuthenticationService,
|
||||
UserProcessModel,
|
||||
PeopleProcessService,
|
||||
TranslationMock,
|
||||
TranslationService
|
||||
PeopleProcessService
|
||||
} from '@alfresco/adf-core';
|
||||
import { TaskDetailsModel } from '../models/task-details.model';
|
||||
import {
|
||||
@@ -42,9 +40,7 @@ import {
|
||||
} from '../../mock';
|
||||
import { TaskListService } from './../services/tasklist.service';
|
||||
import { TaskDetailsComponent } from './task-details.component';
|
||||
import { TaskListModule } from '../task-list.module';
|
||||
import { TranslateStore } from '@ngx-translate/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
|
||||
const fakeUser: UserProcessModel = new UserProcessModel({
|
||||
id: 'fake-id',
|
||||
@@ -69,12 +65,8 @@ describe('TaskDetailsComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TaskListModule
|
||||
ProcessTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
TranslateStore],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@@ -20,17 +20,13 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { TaskFormComponent } from './task-form.component';
|
||||
import {
|
||||
setupTestBed,
|
||||
TranslationService,
|
||||
TranslationMock,
|
||||
FormService,
|
||||
AuthenticationService,
|
||||
FormModel,
|
||||
FormOutcomeEvent,
|
||||
FormOutcomeModel
|
||||
} from '@alfresco/adf-core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { TranslateStore } from '@ngx-translate/core';
|
||||
import { NO_ERRORS_SCHEMA, SimpleChange } from '@angular/core';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import {
|
||||
@@ -44,7 +40,7 @@ import {
|
||||
initiatorCanCompleteTaskDetailsMock
|
||||
} from '../../../mock/task/task-details.mock';
|
||||
import { TaskDetailsModel } from '../../models/task-details.model';
|
||||
import { TaskListModule } from '../../task-list.module';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
|
||||
describe('TaskFormComponent', () => {
|
||||
let component: TaskFormComponent;
|
||||
@@ -59,12 +55,8 @@ describe('TaskFormComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TaskListModule
|
||||
ProcessTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
TranslateStore],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
|
||||
|
@@ -18,14 +18,13 @@
|
||||
import { Component, SimpleChange, ViewChild, OnInit, Output, EventEmitter } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AppConfigService, setupTestBed, CoreModule, DataTableModule, DataRowEvent, ObjectDataRow, DataCellEvent } from '@alfresco/adf-core';
|
||||
import { AppConfigService, setupTestBed, DataRowEvent, ObjectDataRow, DataCellEvent } from '@alfresco/adf-core';
|
||||
import { TaskListService } from '../services/tasklist.service';
|
||||
import { TaskListComponent } from './task-list.component';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { fakeGlobalTask, fakeCustomSchema, fakeEmptyTask, paginatedTask } from '../../mock';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { of, Subject } from 'rxjs';
|
||||
import { TaskListModule } from '../task-list.module';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -737,9 +736,8 @@ describe('CustomTaskListComponent', () => {
|
||||
let component: CustomTaskListComponent;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule.forRoot()],
|
||||
declarations: [TaskListComponent, CustomTaskListComponent],
|
||||
providers: [TaskListService]
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [CustomTaskListComponent]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
@@ -779,7 +777,7 @@ describe('Task List: Custom EmptyTemplateComponent', () => {
|
||||
let taskListService: TaskListService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [ProcessTestingModule, TaskListModule, DataTableModule],
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [EmptyTemplateComponent]
|
||||
});
|
||||
|
||||
@@ -878,9 +876,12 @@ describe('TaskListContextMenuComponent', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [CoreModule.forRoot()],
|
||||
declarations: [TaskListComponent, TaskListContextMenuComponent],
|
||||
providers: [TaskListService]
|
||||
imports: [
|
||||
ProcessTestingModule
|
||||
],
|
||||
declarations: [
|
||||
TaskListContextMenuComponent
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -27,17 +27,25 @@ import {
|
||||
TranslationMock,
|
||||
CoreModule
|
||||
} from '@alfresco/adf-core';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
@NgModule({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
ProcessModule
|
||||
ProcessModule.forRoot()
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||
{ provide: TranslationService, useClass: TranslationMock }
|
||||
],
|
||||
exports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
ProcessModule
|
||||
]
|
||||
})
|
||||
export class ProcessTestingModule {}
|
||||
|
Reference in New Issue
Block a user