mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-10-01 14:41:32 +00:00
AAE-36484 improved standalone support for Core
This commit is contained in:
@@ -22,7 +22,6 @@ import { AppsProcessService } from '../services/apps-process.service';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { defaultApp, deployedApps, nonDeployedApps } from '../testing/mock/apps-list.mock';
|
||||
import { AppsListComponent, APP_LIST_LAYOUT_GRID, APP_LIST_LAYOUT_LIST } from './apps-list.component';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing';
|
||||
@@ -52,7 +51,7 @@ describe('AppsListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, CustomEmptyAppListTemplateComponent]
|
||||
imports: [CustomEmptyAppListTemplateComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(AppsListComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -23,7 +23,6 @@ import { AppsProcessService } from '../../services/apps-process.service';
|
||||
import { deployedApps } from '../../testing/mock/apps-list.mock';
|
||||
import { of } from 'rxjs';
|
||||
import { SelectAppsDialogComponent } from './select-apps-dialog.component';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-dialog-test',
|
||||
@@ -58,7 +57,7 @@ describe('Select app dialog', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, DialogSelectAppTestComponent],
|
||||
imports: [DialogSelectAppTestComponent],
|
||||
providers: [
|
||||
{
|
||||
provide: OverlayContainer,
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { CreateProcessAttachmentComponent } from './create-process-attachment.component';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
declare let jasmine: any;
|
||||
@@ -48,7 +47,7 @@ describe('CreateProcessAttachmentComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, CreateProcessAttachmentComponent],
|
||||
imports: [CreateProcessAttachmentComponent],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
fixture = TestBed.createComponent(CreateProcessAttachmentComponent);
|
||||
|
@@ -19,7 +19,6 @@ import { SimpleChange } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import { AttachmentComponent } from './create-task-attachment.component';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { ProcessContentService } from '../../form/services/process-content.service';
|
||||
|
||||
describe('AttachmentComponent', () => {
|
||||
@@ -30,7 +29,7 @@ describe('AttachmentComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, AttachmentComponent]
|
||||
imports: [AttachmentComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(AttachmentComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -20,7 +20,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { ProcessAttachmentListComponent } from './process-attachment-list.component';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { mockEmittedProcessAttachments, mockProcessAttachments } from '../../testing/mock/process/process-attachments.mock';
|
||||
import { ProcessContentService } from '../../form/services/process-content.service';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
@@ -37,7 +36,7 @@ describe('ProcessAttachmentListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, ProcessAttachmentListComponent]
|
||||
imports: [ProcessAttachmentListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(ProcessAttachmentListComponent);
|
||||
component = fixture.componentInstance;
|
||||
@@ -257,7 +256,7 @@ describe('Custom CustomEmptyTemplateComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, CustomEmptyTemplateComponent]
|
||||
imports: [CustomEmptyTemplateComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(CustomEmptyTemplateComponent);
|
||||
fixture.detectChanges();
|
||||
|
@@ -20,7 +20,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { TaskAttachmentListComponent } from './task-attachment-list.component';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { mockEmittedTaskAttachments, mockTaskAttachments } from '../../testing/mock/task/task-attachments.mock';
|
||||
import { ProcessContentService } from '../../form/services/process-content.service';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
@@ -40,7 +39,7 @@ describe('TaskAttachmentList', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, TaskAttachmentListComponent]
|
||||
imports: [TaskAttachmentListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(TaskAttachmentListComponent);
|
||||
component = fixture.componentInstance;
|
||||
@@ -296,7 +295,6 @@ describe('Custom CustomEmptyTemplateComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule],
|
||||
declarations: [CustomEmptyTemplateComponent],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
});
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormListComponent } from './form-list.component';
|
||||
import { ModelService } from '../services/model.service';
|
||||
|
||||
@@ -29,7 +28,7 @@ describe('TaskAttachmentList', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule, FormListComponent]
|
||||
imports: [FormListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(FormListComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -29,18 +29,18 @@ import {
|
||||
FormService,
|
||||
WidgetVisibilityService,
|
||||
ContainerModel,
|
||||
fakeForm
|
||||
fakeForm,
|
||||
NoopAuthModule
|
||||
} from '@alfresco/adf-core';
|
||||
import { NodeMetadata, NodesApiService } from '@alfresco/adf-content-services';
|
||||
import { FormComponent } from './form.component';
|
||||
import { ProcessFormRenderingService } from './process-form-rendering.service';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
import { TaskFormService } from './services/task-form.service';
|
||||
import { TaskService } from './services/task.service';
|
||||
import { EditorService } from './services/editor.service';
|
||||
import { ModelService } from './services/model.service';
|
||||
import { FormCustomOutcomesComponent } from '@alfresco/adf-process-services';
|
||||
import { MatButtonModule } from '@angular/material/button';
|
||||
import { FormCustomOutcomesComponent } from './form-custom-outcomes.component';
|
||||
|
||||
describe('FormComponent', () => {
|
||||
let fixture: ComponentFixture<FormComponent>;
|
||||
@@ -83,7 +83,7 @@ describe('FormComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, CustomUploadModule]
|
||||
imports: [NoopAuthModule, CustomUploadModule]
|
||||
});
|
||||
visibilityService = TestBed.inject(WidgetVisibilityService);
|
||||
spyOn(visibilityService, 'refreshVisibility').and.stub();
|
||||
@@ -1012,7 +1012,7 @@ describe('FormWithCustomOutComesComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, FormWithCustomOutComesComponent]
|
||||
imports: [FormWithCustomOutComesComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(FormWithCustomOutComesComponent);
|
||||
customComponent = fixture.componentInstance;
|
||||
|
@@ -15,28 +15,26 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, SimpleChange } from '@angular/core';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { of } from 'rxjs';
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
|
||||
import {
|
||||
formDefinitionDropdownField,
|
||||
formDefinitionTwoTextFields,
|
||||
formDefinitionRequiredField,
|
||||
formDefVisibilityFieldDependsOnNextOne,
|
||||
formDefVisibilitiFieldDependsOnPreviousOne,
|
||||
formReadonlyTwoTextFields
|
||||
formReadonlyTwoTextFields,
|
||||
FormRenderingService
|
||||
} from '@alfresco/adf-core';
|
||||
import { FormComponent } from './form.component';
|
||||
import { ProcessTestingModule } from '../testing/process.testing.module';
|
||||
import { TaskService } from './services/task.service';
|
||||
import { TaskFormService } from './services/task-form.service';
|
||||
import { TaskRepresentation } from '@alfresco/js-api';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
||||
import { ProcessFormRenderingService } from './process-form-rendering.service';
|
||||
|
||||
describe('FormComponent UI and visibility', () => {
|
||||
let component: FormComponent;
|
||||
@@ -44,17 +42,21 @@ describe('FormComponent UI and visibility', () => {
|
||||
let taskFormService: TaskFormService;
|
||||
let fixture: ComponentFixture<FormComponent>;
|
||||
let loader: HarnessLoader;
|
||||
let getTaskFormSpy: jasmine.Spy;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
imports: [FormComponent],
|
||||
providers: [FormRenderingService, { provide: FormRenderingService, useClass: ProcessFormRenderingService }]
|
||||
});
|
||||
fixture = TestBed.createComponent(FormComponent);
|
||||
component = fixture.componentInstance;
|
||||
loader = TestbedHarnessEnvironment.loader(fixture);
|
||||
taskService = TestBed.inject(TaskService);
|
||||
taskFormService = TestBed.inject(TaskFormService);
|
||||
|
||||
taskService = TestBed.inject(TaskService);
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as any));
|
||||
getTaskFormSpy = spyOn(taskFormService, 'getTaskForm');
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
@@ -63,8 +65,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
|
||||
describe('Validation icon', () => {
|
||||
it('should display valid icon for valid form', () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefinitionTwoTextFields));
|
||||
getTaskFormSpy.and.returnValue(of(formDefinitionTwoTextFields));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -75,8 +76,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
});
|
||||
|
||||
it('should display invalid icon for valid form', () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefinitionRequiredField));
|
||||
getTaskFormSpy.and.returnValue(of(formDefinitionRequiredField));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -87,8 +87,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
});
|
||||
|
||||
it('should NOT display validation icon when [showValidationIcon] is false', () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefinitionTwoTextFields));
|
||||
getTaskFormSpy.and.returnValue(of(formDefinitionTwoTextFields));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -101,8 +100,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
|
||||
describe('form definition', () => {
|
||||
it('should display two text fields form definition', () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefinitionTwoTextFields));
|
||||
getTaskFormSpy.and.returnValue(of(formDefinitionTwoTextFields));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -118,8 +116,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
});
|
||||
|
||||
it('should display dropdown field', async () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefinitionDropdownField));
|
||||
getTaskFormSpy.and.returnValue(of(formDefinitionDropdownField));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -144,8 +141,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
|
||||
describe('Visibility conditions', () => {
|
||||
it('should hide the field based on the next one', () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefVisibilityFieldDependsOnNextOne));
|
||||
getTaskFormSpy.and.returnValue(of(formDefVisibilityFieldDependsOnNextOne));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -161,8 +157,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
});
|
||||
|
||||
it('should hide the field based on the previous one', () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefVisibilitiFieldDependsOnPreviousOne));
|
||||
getTaskFormSpy.and.returnValue(of(formDefVisibilitiFieldDependsOnPreviousOne));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -178,8 +173,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
});
|
||||
|
||||
it('should show the hidden field when the visibility condition change to true', () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formDefVisibilityFieldDependsOnNextOne));
|
||||
getTaskFormSpy.and.returnValue(of(formDefVisibilityFieldDependsOnNextOne));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
@@ -203,8 +197,7 @@ describe('FormComponent UI and visibility', () => {
|
||||
|
||||
describe('Readonly Form', () => {
|
||||
it('should display two text fields readonly', async () => {
|
||||
spyOn(taskService, 'getTask').and.returnValue(of({} as TaskRepresentation));
|
||||
spyOn(taskFormService, 'getTaskForm').and.returnValue(of(formReadonlyTwoTextFields));
|
||||
getTaskFormSpy.and.returnValue(of(formReadonlyTwoTextFields));
|
||||
|
||||
const change = new SimpleChange(null, 1, true);
|
||||
component.ngOnChanges({ taskId: change });
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { Observable } from 'rxjs';
|
||||
import { FormModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormModel } from '@alfresco/adf-core';
|
||||
import { EcmModelService } from './ecm-model.service';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
@@ -28,7 +28,7 @@ describe('EcmModelService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule],
|
||||
imports: [],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
service = TestBed.inject(EcmModelService);
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ProcessContentService } from './process-content.service';
|
||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
declare let jasmine: any;
|
||||
@@ -66,7 +65,7 @@ describe('ProcessContentService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule],
|
||||
imports: [],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
service = TestBed.inject(ProcessContentService);
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { CUSTOM_ELEMENTS_SCHEMA, SimpleChange } from '@angular/core';
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import {
|
||||
@@ -33,15 +33,15 @@ import {
|
||||
preselectedMultipleNodes
|
||||
} from './start-form.component.mock';
|
||||
import { StartFormComponent } from './start-form.component';
|
||||
import { WidgetVisibilityService, FormModel, FormOutcomeModel } from '@alfresco/adf-core';
|
||||
import { WidgetVisibilityService, FormModel, FormOutcomeModel, FormRenderingService } from '@alfresco/adf-core';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { ProcessService } from '../../process-list/services/process.service';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
||||
import { MatCardHarness } from '@angular/material/card/testing';
|
||||
import { MatButtonHarness } from '@angular/material/button/testing';
|
||||
import { ProcessFormRenderingService } from '../process-form-rendering.service';
|
||||
|
||||
describe('StartFormComponent', () => {
|
||||
let component: StartFormComponent;
|
||||
@@ -57,8 +57,8 @@ describe('StartFormComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule],
|
||||
schemas: [CUSTOM_ELEMENTS_SCHEMA]
|
||||
imports: [StartFormComponent],
|
||||
providers: [FormRenderingService, { provide: FormRenderingService, useClass: ProcessFormRenderingService }]
|
||||
});
|
||||
fixture = TestBed.createComponent(StartFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -19,9 +19,8 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog';
|
||||
import { ContentNodeSelectorPanelComponent, DocumentListService, SitesService, NodesApiService } from '@alfresco/adf-content-services';
|
||||
import { EventEmitter, NO_ERRORS_SCHEMA } from '@angular/core';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { AttachFileWidgetDialogComponent } from './attach-file-widget-dialog.component';
|
||||
import { AuthenticationService } from '@alfresco/adf-core';
|
||||
import { AuthenticationService, NoopAuthModule } from '@alfresco/adf-core';
|
||||
import { AttachFileWidgetDialogComponentData } from './attach-file-widget-dialog-component.interface';
|
||||
import { of, Subject, throwError } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
@@ -50,7 +49,7 @@ describe('AttachFileWidgetDialogComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, AttachFileWidgetDialogComponent],
|
||||
imports: [NoopAuthModule, AttachFileWidgetDialogComponent],
|
||||
providers: [
|
||||
{ provide: MAT_DIALOG_DATA, useValue: data },
|
||||
{ provide: MatDialogRef, useValue: { close: () => of() } }
|
||||
|
@@ -19,7 +19,6 @@ import { TestBed } from '@angular/core/testing';
|
||||
import { MatDialog } from '@angular/material/dialog';
|
||||
import { AttachFileWidgetDialogService } from './attach-file-widget-dialog.service';
|
||||
import { Subject, of } from 'rxjs';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { AlfrescoEndpointRepresentation } from '@alfresco/js-api';
|
||||
|
||||
describe('AttachFileWidgetDialogService', () => {
|
||||
@@ -29,9 +28,6 @@ describe('AttachFileWidgetDialogService', () => {
|
||||
let mockRepository: AlfrescoEndpointRepresentation;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
});
|
||||
service = TestBed.inject(AttachFileWidgetDialogService);
|
||||
materialDialog = TestBed.inject(MatDialog);
|
||||
spyOnDialogOpen = spyOn(materialDialog, 'open').and.returnValue({
|
||||
|
@@ -27,17 +27,16 @@ import {
|
||||
DownloadService,
|
||||
AppConfigService,
|
||||
AppConfigValues,
|
||||
UnitTestingUtils
|
||||
UnitTestingUtils,
|
||||
NoopAuthModule
|
||||
} from '@alfresco/adf-core';
|
||||
import { ContentNodeDialogService } from '@alfresco/adf-content-services';
|
||||
import { of } from 'rxjs';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { AttachFileWidgetDialogService } from './attach-file-widget-dialog.service';
|
||||
import { ActivitiContentService } from '../../services/activiti-alfresco.service';
|
||||
import { ProcessContentService } from '../../services/process-content.service';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { ActivatedRoute, Router } from '@angular/router';
|
||||
import { ActivatedRoute, provideRouter, Router } from '@angular/router';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatMenuHarness } from '@angular/material/menu/testing';
|
||||
@@ -164,8 +163,9 @@ describe('AttachFileWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, AttachFileWidgetComponent, RouterTestingModule],
|
||||
imports: [NoopAuthModule, AttachFileWidgetComponent],
|
||||
providers: [
|
||||
provideRouter([]),
|
||||
{
|
||||
provide: ActivatedRoute,
|
||||
useValue: {
|
||||
|
@@ -18,11 +18,10 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AttachFolderWidgetComponent } from './attach-folder-widget.component';
|
||||
import { FormFieldModel, FormModel } from '@alfresco/adf-core';
|
||||
import { FormFieldModel, FormModel, NoopAuthModule } from '@alfresco/adf-core';
|
||||
import { ContentNodeDialogService, NodesApiService } from '@alfresco/adf-content-services';
|
||||
import { of } from 'rxjs';
|
||||
import { Node } from '@alfresco/js-api';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
|
||||
const fakeNode = {
|
||||
id: 'fake',
|
||||
@@ -49,7 +48,7 @@ describe('AttachFolderWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, AttachFolderWidgetComponent]
|
||||
imports: [NoopAuthModule, AttachFolderWidgetComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(AttachFolderWidgetComponent);
|
||||
widget = fixture.componentInstance;
|
||||
|
@@ -18,7 +18,7 @@
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ContentLinkModel, CoreTestingModule, DownloadService } from '@alfresco/adf-core';
|
||||
import { ContentLinkModel, DownloadService } from '@alfresco/adf-core';
|
||||
import { of } from 'rxjs';
|
||||
import { ContentWidgetComponent } from './content.widget';
|
||||
import { ProcessContentService } from '../../services/process-content.service';
|
||||
@@ -60,7 +60,7 @@ describe('ContentWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule, ContentWidgetComponent],
|
||||
imports: [ContentWidgetComponent],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
downloadService = TestBed.inject(DownloadService);
|
||||
|
@@ -17,15 +17,7 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import {
|
||||
WidgetVisibilityService,
|
||||
FormFieldOption,
|
||||
FormFieldModel,
|
||||
FormModel,
|
||||
FormFieldTypes,
|
||||
CoreTestingModule,
|
||||
ErrorMessageModel
|
||||
} from '@alfresco/adf-core';
|
||||
import { WidgetVisibilityService, FormFieldOption, FormFieldModel, FormModel, FormFieldTypes, ErrorMessageModel } from '@alfresco/adf-core';
|
||||
import { DropdownWidgetComponent } from './dropdown.widget';
|
||||
import { TaskFormService } from '../../services/task-form.service';
|
||||
import { ProcessDefinitionService } from '../../services/process-definition.service';
|
||||
@@ -50,7 +42,7 @@ describe('DropdownWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule, DropdownWidgetComponent]
|
||||
imports: [DropdownWidgetComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(DropdownWidgetComponent);
|
||||
widget = fixture.componentInstance;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FormFieldModel, FormFieldTypes, FormModel, FormService, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormFieldModel, FormFieldTypes, FormModel, FormService } from '@alfresco/adf-core';
|
||||
import { DynamicTableColumn } from './editors/models/dynamic-table-column.model';
|
||||
import { DynamicTableRow } from './editors/models/dynamic-table-row.model';
|
||||
import { DynamicTableWidgetComponent } from './dynamic-table.widget';
|
||||
@@ -72,7 +72,7 @@ describe('DynamicTableWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [DynamicTableWidgetComponent]
|
||||
});
|
||||
const field = new FormFieldModel(new FormModel());
|
||||
formService = TestBed.inject(FormService);
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FormFieldModel, FormModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormFieldModel, FormModel } from '@alfresco/adf-core';
|
||||
import { DynamicTableColumn } from '../models/dynamic-table-column.model';
|
||||
import { DynamicTableRow } from '../models/dynamic-table-row.model';
|
||||
import { DynamicTableModel } from '../models/dynamic-table.widget.model';
|
||||
@@ -32,7 +32,7 @@ describe('DateEditorComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [DateEditorComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(DateEditorComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { FormFieldModel, FormModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormFieldModel, FormModel } from '@alfresco/adf-core';
|
||||
import { DynamicTableColumn } from '../models/dynamic-table-column.model';
|
||||
import { DynamicTableRow } from '../models/dynamic-table-row.model';
|
||||
import { DynamicTableModel } from '../models/dynamic-table.widget.model';
|
||||
@@ -31,7 +31,7 @@ describe('DateTimeEditorComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [DateTimeEditorComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(DateTimeEditorComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -15,13 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import {
|
||||
ADF_DATETIME_FORMATS,
|
||||
ADF_DATE_FORMATS,
|
||||
AdfDateFnsAdapter,
|
||||
AdfDateTimeFnsAdapter /*MOMENT_DATE_FORMATS, MomentDateAdapter*/,
|
||||
DateFnsUtils
|
||||
} from '@alfresco/adf-core';
|
||||
import { ADF_DATETIME_FORMATS, ADF_DATE_FORMATS, AdfDateFnsAdapter, AdfDateTimeFnsAdapter, DateFnsUtils } from '@alfresco/adf-core';
|
||||
import { Component, Input, OnInit } from '@angular/core';
|
||||
import { DateAdapter, MAT_DATE_FORMATS } from '@angular/material/core';
|
||||
import { DynamicTableColumn } from '../models/dynamic-table-column.model';
|
||||
|
@@ -28,7 +28,6 @@ import { ProcessDefinitionService } from '../../../../services/process-definitio
|
||||
import { MatSelectHarness } from '@angular/material/select/testing';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { ProcessTestingModule } from '../../../../../testing/process.testing.module';
|
||||
|
||||
describe('DropdownEditorComponent', () => {
|
||||
let fixture: ComponentFixture<DropdownEditorComponent>;
|
||||
@@ -44,7 +43,7 @@ describe('DropdownEditorComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, DropdownEditorComponent]
|
||||
imports: [DropdownEditorComponent]
|
||||
});
|
||||
formService = TestBed.inject(FormService);
|
||||
taskFormService = TestBed.inject(TaskFormService);
|
||||
|
@@ -15,21 +15,17 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { FormFieldModel, FormModel, FormService, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormFieldModel, FormModel, FormService } from '@alfresco/adf-core';
|
||||
import { DynamicTableColumn } from '../models/dynamic-table-column.model';
|
||||
import { DynamicTableRow } from '../models/dynamic-table-row.model';
|
||||
import { DynamicTableModel } from '../models/dynamic-table.widget.model';
|
||||
import { RowEditorComponent } from './row.editor';
|
||||
import { DynamicRowValidationSummary } from '../models/dynamic-row-validation-summary.model';
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
|
||||
describe('RowEditorComponent', () => {
|
||||
let component: RowEditorComponent;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule]
|
||||
});
|
||||
component = new RowEditorComponent();
|
||||
const field = new FormFieldModel(new FormModel());
|
||||
component.table = new DynamicTableModel(field, new FormService());
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { of, timer } from 'rxjs';
|
||||
import { FormFieldModel, FormModel, GroupModel, CoreTestingModule, FormFieldTypes, UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { FormFieldModel, FormModel, GroupModel, FormFieldTypes, UnitTestingUtils } from '@alfresco/adf-core';
|
||||
import { FunctionalGroupWidgetComponent } from './functional-group.widget';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PeopleProcessService } from '../../../services/people-process.service';
|
||||
@@ -41,7 +41,7 @@ describe('FunctionalGroupWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [FunctionalGroupWidgetComponent]
|
||||
});
|
||||
peopleProcessService = TestBed.inject(PeopleProcessService);
|
||||
getWorkflowGroupsSpy = spyOn(peopleProcessService, 'getWorkflowGroups').and.returnValue(of([]));
|
||||
|
@@ -17,7 +17,7 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { FormFieldTypes, FormFieldModel, FormModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormFieldTypes, FormFieldModel, FormModel } from '@alfresco/adf-core';
|
||||
import { Observable, of } from 'rxjs';
|
||||
import { PeopleWidgetComponent } from './people.widget';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
@@ -40,7 +40,7 @@ describe('PeopleWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule]
|
||||
imports: [PeopleWidgetComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(PeopleWidgetComponent);
|
||||
peopleProcessService = TestBed.inject(PeopleProcessService);
|
||||
|
@@ -17,9 +17,8 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { Observable, of } from 'rxjs';
|
||||
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { FormService, FormFieldOption, FormFieldTypes, FormFieldModel, FormModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormService, FormFieldOption, FormFieldTypes, FormFieldModel, FormModel } from '@alfresco/adf-core';
|
||||
import { TypeaheadWidgetComponent } from './typeahead.widget';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { TaskFormService } from '../../services/task-form.service';
|
||||
@@ -34,7 +33,7 @@ describe('TypeaheadWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule, TypeaheadWidgetComponent]
|
||||
imports: [TypeaheadWidgetComponent]
|
||||
});
|
||||
translationService = TestBed.inject(TranslateService);
|
||||
taskFormService = TestBed.inject(TaskFormService);
|
||||
|
@@ -19,7 +19,7 @@ import { DebugElement } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { of } from 'rxjs';
|
||||
import { FormService, FormFieldTypes, FormModel, FormFieldModel, CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { FormService, FormFieldTypes, FormModel, FormFieldModel } from '@alfresco/adf-core';
|
||||
import { UploadWidgetComponent } from './upload.widget';
|
||||
import { RelatedContentRepresentation } from '@alfresco/js-api';
|
||||
import { ProcessContentService } from '../../services/process-content.service';
|
||||
@@ -74,7 +74,7 @@ describe('UploadWidgetComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule, UploadWidgetComponent]
|
||||
imports: [UploadWidgetComponent]
|
||||
});
|
||||
});
|
||||
|
||||
|
@@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { DataRowActionEvent, DataRowEvent, ObjectDataRow } from '@alfresco/adf-core';
|
||||
import { UserEventModel } from '../../../task-list/models/user-event.model';
|
||||
import { PeopleListComponent } from './people-list.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { LightUserRepresentation } from '@alfresco/js-api';
|
||||
|
||||
const fakeUser: LightUserRepresentation = {
|
||||
@@ -35,7 +34,7 @@ describe('PeopleListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, PeopleListComponent]
|
||||
imports: [PeopleListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(PeopleListComponent);
|
||||
peopleListComponent = fixture.componentInstance;
|
||||
|
@@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { DebugElement } from '@angular/core';
|
||||
import { PeopleSearchFieldComponent } from './people-search-field.component';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
|
||||
describe('PeopleSearchFieldComponent', () => {
|
||||
let component: PeopleSearchFieldComponent;
|
||||
@@ -28,9 +27,6 @@ describe('PeopleSearchFieldComponent', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
});
|
||||
fixture = TestBed.createComponent(PeopleSearchFieldComponent);
|
||||
component = fixture.componentInstance;
|
||||
debug = fixture.debugElement;
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import { PeopleSearchComponent } from './people-search.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { LightUserRepresentation } from '@alfresco/js-api';
|
||||
|
||||
const fakeUser: LightUserRepresentation = {
|
||||
@@ -44,7 +43,7 @@ describe('PeopleSearchComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, PeopleSearchComponent]
|
||||
imports: [PeopleSearchComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(PeopleSearchComponent);
|
||||
peopleSearchComponent = fixture.componentInstance;
|
||||
|
@@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PeopleSelectorComponent } from './people-selector.component';
|
||||
import { of } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { PeopleProcessService } from '../../../services/people-process.service';
|
||||
|
||||
describe('PeopleSelectorComponent', () => {
|
||||
@@ -27,9 +26,6 @@ describe('PeopleSelectorComponent', () => {
|
||||
let fixture: ComponentFixture<PeopleSelectorComponent>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
});
|
||||
fixture = TestBed.createComponent(PeopleSelectorComponent);
|
||||
component = fixture.componentInstance;
|
||||
fixture.detectChanges();
|
||||
|
@@ -17,10 +17,9 @@
|
||||
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PeopleComponent } from './people.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { LightUserRepresentation } from '@alfresco/js-api';
|
||||
import { PeopleProcessService } from '@alfresco/adf-process-services';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { PeopleProcessService } from '../../../services/people-process.service';
|
||||
|
||||
const fakeUser: LightUserRepresentation = {
|
||||
id: 0,
|
||||
@@ -45,7 +44,7 @@ describe('PeopleComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, PeopleComponent]
|
||||
imports: [PeopleComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(PeopleComponent);
|
||||
peopleProcessService = fixture.debugElement.injector.get(PeopleProcessService);
|
||||
|
@@ -20,9 +20,8 @@ import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { ProcessService } from '../../services/process.service';
|
||||
import { DownloadService } from '@alfresco/adf-core';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { ProcessInstanceAuditInfoRepresentation } from '@alfresco/js-api';
|
||||
import { ProcessAuditDirective } from '@alfresco/adf-process-services';
|
||||
import { ProcessAuditDirective } from './process-audit.directive';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-basic-button',
|
||||
@@ -82,7 +81,7 @@ describe('ProcessAuditDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, BasicButtonComponent]
|
||||
imports: [BasicButtonComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(BasicButtonComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -22,9 +22,9 @@ import { ProcessFilterService } from '../../services/process-filter.service';
|
||||
import { ProcessFiltersComponent } from './process-filters.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { ProcessInstanceFilterRepresentation, UserProcessInstanceFilterRepresentation } from '@alfresco/js-api';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
const fakeProcessFilters: UserProcessInstanceFilterRepresentation[] = [
|
||||
{
|
||||
@@ -58,7 +58,8 @@ describe('ProcessFiltersComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
imports: [],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
|
||||
processFilterService = TestBed.inject(ProcessFilterService);
|
||||
|
@@ -24,10 +24,10 @@ import { exampleProcess, exampleProcessNoName, mockRunningProcess, processEnded
|
||||
import { mockProcessInstanceComments } from '../../../testing/mock/process/process-comments.mock';
|
||||
import { ProcessService } from '../../services/process.service';
|
||||
import { ProcessInstanceDetailsComponent } from './process-instance-details.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatCardHarness } from '@angular/material/card/testing';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
describe('ProcessInstanceDetailsComponent', () => {
|
||||
let service: ProcessService;
|
||||
@@ -38,7 +38,8 @@ describe('ProcessInstanceDetailsComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, ProcessInstanceDetailsComponent],
|
||||
imports: [ProcessInstanceDetailsComponent],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
fixture = TestBed.createComponent(ProcessInstanceDetailsComponent);
|
||||
|
@@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { exampleProcess } from '../../../testing/mock';
|
||||
import { ProcessInstanceHeaderComponent } from './process-instance-header.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
|
||||
describe('ProcessInstanceHeaderComponent', () => {
|
||||
let component: ProcessInstanceHeaderComponent;
|
||||
@@ -27,9 +26,6 @@ describe('ProcessInstanceHeaderComponent', () => {
|
||||
let appConfigService: AppConfigService;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
});
|
||||
fixture = TestBed.createComponent(ProcessInstanceHeaderComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
||||
|
@@ -22,7 +22,6 @@ import { of } from 'rxjs';
|
||||
import { taskDetailsMock } from '../../../testing/mock';
|
||||
import { ProcessService } from '../../services/process.service';
|
||||
import { ProcessInstanceTasksComponent } from './process-instance-tasks.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatListItemHarness } from '@angular/material/list/testing';
|
||||
@@ -37,9 +36,6 @@ describe('ProcessInstanceTasksComponent', () => {
|
||||
const exampleProcessInstance: ProcessInstanceRepresentation = { id: '123' };
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
});
|
||||
fixture = TestBed.createComponent(ProcessInstanceTasksComponent);
|
||||
processService = TestBed.inject(ProcessService);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -36,7 +36,6 @@ import {
|
||||
} from '@alfresco/adf-core';
|
||||
import { fakeProcessInstance, fakeProcessInstancesWithNoName, fakeProcessInstancesEmpty, fakeProcessColumnSchema } from '../../../testing/mock';
|
||||
import { ProcessService } from '../../services/process.service';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { MatProgressSpinnerHarness } from '@angular/material/progress-spinner/testing';
|
||||
@@ -59,9 +58,6 @@ describe('ProcessInstanceListComponent', () => {
|
||||
};
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
});
|
||||
fixture = TestBed.createComponent(ProcessInstanceListComponent);
|
||||
component = fixture.componentInstance;
|
||||
loader = TestbedHarnessEnvironment.loader(fixture);
|
||||
@@ -490,7 +486,7 @@ describe('CustomProcessListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, CustomProcessListComponent]
|
||||
imports: [CustomProcessListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(CustomProcessListComponent);
|
||||
fixture.detectChanges();
|
||||
@@ -526,7 +522,7 @@ describe('Process List: Custom EmptyTemplateComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, EmptyTemplateComponent]
|
||||
imports: [EmptyTemplateComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(EmptyTemplateComponent);
|
||||
processService = TestBed.inject(ProcessService);
|
||||
@@ -623,7 +619,7 @@ describe('ProcessListContextMenuComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, ProcessListContextMenuComponent]
|
||||
imports: [ProcessListContextMenuComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(ProcessListContextMenuComponent);
|
||||
customComponent = fixture.componentInstance;
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { ProcessFilterService } from './process-filter.service';
|
||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { ProcessInstanceFilterRepresentation, UserProcessInstanceFilterRepresentation } from '@alfresco/js-api';
|
||||
import { of } from 'rxjs';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
@@ -50,7 +49,6 @@ describe('Process filter', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
service = TestBed.inject(ProcessFilterService);
|
||||
|
@@ -18,8 +18,7 @@
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { exampleProcess } from '../../testing/mock';
|
||||
import { ProcessService } from './process.service';
|
||||
import { CoreModule, DateFnsUtils } from '@alfresco/adf-core';
|
||||
import { ProcessTestingModule } from '../../testing/process.testing.module';
|
||||
import { DateFnsUtils } from '@alfresco/adf-core';
|
||||
import { ProcessInstanceQueryRepresentation, ProcessDefinitionRepresentation, RestVariable, TaskRepresentation } from '@alfresco/js-api';
|
||||
|
||||
const fakeTasksList = {
|
||||
@@ -55,7 +54,7 @@ describe('ProcessService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreModule.forRoot(), ProcessTestingModule]
|
||||
imports: []
|
||||
});
|
||||
service = TestBed.inject(ProcessService);
|
||||
});
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { PeopleProcessService } from './people-process.service';
|
||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { LightUserRepresentation } from '@alfresco/js-api';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
@@ -46,7 +45,6 @@ describe('PeopleProcessService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
service = TestBed.inject(PeopleProcessService);
|
||||
|
@@ -17,10 +17,10 @@
|
||||
|
||||
import { AttachFormComponent } from './attach-form.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { of } from 'rxjs';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
describe('AttachFormComponent', () => {
|
||||
let component: AttachFormComponent;
|
||||
@@ -30,7 +30,8 @@ describe('AttachFormComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, AttachFormComponent]
|
||||
imports: [AttachFormComponent],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
fixture = TestBed.createComponent(AttachFormComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -18,7 +18,6 @@
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ChecklistComponent } from './checklist.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { of } from 'rxjs';
|
||||
import { TaskRepresentation } from '@alfresco/js-api';
|
||||
@@ -32,7 +31,7 @@ describe('ChecklistComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule]
|
||||
imports: [ChecklistComponent]
|
||||
});
|
||||
service = TestBed.inject(TaskListService);
|
||||
spyOn(service, 'getTaskChecklist').and.returnValue(
|
||||
|
@@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { of, throwError } from 'rxjs';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { StartTaskComponent } from './start-task.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { taskDetailsMock } from '../../../testing/mock/task/task-details.mock';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
@@ -50,7 +49,7 @@ describe('StartTaskComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, StartTaskComponent]
|
||||
imports: [StartTaskComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(StartTaskComponent);
|
||||
component = fixture.componentInstance;
|
||||
@@ -66,7 +65,6 @@ describe('StartTaskComponent', () => {
|
||||
|
||||
afterEach(() => {
|
||||
fixture.destroy();
|
||||
TestBed.resetTestingModule();
|
||||
});
|
||||
|
||||
it('should fetch fake form on init', () => {
|
||||
|
@@ -23,7 +23,6 @@ import { FormModel, FormOutcomeEvent, FormOutcomeModel, CommentModel, User, ADF_
|
||||
import { noDataMock, taskDetailsMock, taskFormMock, tasksMock, taskDetailsWithOutAssigneeMock } from '../../../testing/mock';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { TaskDetailsComponent } from './task-details.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { TaskService } from '../../../form/services/task.service';
|
||||
import { TaskFormService } from '../../../form/services/task-form.service';
|
||||
import { PeopleProcessService } from '../../../services/people-process.service';
|
||||
@@ -31,6 +30,7 @@ import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed';
|
||||
import { HarnessLoader } from '@angular/cdk/testing';
|
||||
import { MatDialogHarness } from '@angular/material/dialog/testing';
|
||||
import { LightUserRepresentation, TaskRepresentation } from '@alfresco/js-api';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
const fakeUser: LightUserRepresentation = {
|
||||
id: 0,
|
||||
@@ -60,7 +60,8 @@ describe('TaskDetailsComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, TaskDetailsComponent]
|
||||
imports: [TaskDetailsComponent],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
peopleProcessService = TestBed.inject(PeopleProcessService);
|
||||
spyOn(peopleProcessService, 'getCurrentUserInfo').and.returnValue(of({ email: 'fake-email' } as any));
|
||||
|
@@ -23,10 +23,8 @@ import { of, throwError } from 'rxjs';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { TaskFilterService } from '../../services/task-filter.service';
|
||||
import { TaskFiltersComponent } from './task-filters.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { NavigationStart, Router } from '@angular/router';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { NavigationStart, provideRouter, Router } from '@angular/router';
|
||||
import { UserTaskFilterRepresentation } from '@alfresco/js-api';
|
||||
|
||||
const fakeTaskFilters = [
|
||||
@@ -60,7 +58,8 @@ describe('TaskFiltersComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, RouterTestingModule, TaskFiltersComponent]
|
||||
imports: [TaskFiltersComponent],
|
||||
providers: [provideRouter([])]
|
||||
});
|
||||
const appConfig: AppConfigService = TestBed.inject(AppConfigService);
|
||||
appConfig.config.bpmHost = 'http://localhost:9876/bpm';
|
||||
|
@@ -19,8 +19,7 @@ import { Component, Output, EventEmitter } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { ClaimTaskDirective } from '@alfresco/adf-process-services';
|
||||
import { ClaimTaskDirective } from './claim-task.directive';
|
||||
|
||||
describe('ClaimTaskDirective', () => {
|
||||
@Component({
|
||||
@@ -45,7 +44,7 @@ describe('ClaimTaskDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, TestComponent]
|
||||
imports: [TestComponent]
|
||||
});
|
||||
taskListService = TestBed.inject(TaskListService);
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
@@ -95,7 +94,7 @@ describe('Claim Task Directive validation errors', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, ClaimTestMissingTaskIdDirectiveComponent, ClaimTestMissingInputDirectiveComponent]
|
||||
imports: [ClaimTestMissingTaskIdDirectiveComponent, ClaimTestMissingInputDirectiveComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(ClaimTestMissingInputDirectiveComponent);
|
||||
});
|
||||
|
@@ -41,7 +41,6 @@ import {
|
||||
taskDetailsWithOutFormMock,
|
||||
taskFormMock
|
||||
} from '../../../testing/mock/task/task-details.mock';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { TaskFormService } from '../../../form/services/task-form.service';
|
||||
import { TaskService } from '../../../form/services/task.service';
|
||||
@@ -62,7 +61,6 @@ describe('TaskFormComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule],
|
||||
schemas: [NO_ERRORS_SCHEMA]
|
||||
});
|
||||
fixture = TestBed.createComponent(TaskFormComponent);
|
||||
|
@@ -19,8 +19,8 @@ import { Component, Output, EventEmitter } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { of } from 'rxjs';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { UnclaimTaskDirective } from '@alfresco/adf-process-services';
|
||||
import { UnclaimTaskDirective } from './unclaim-task.directive';
|
||||
import { NoopAuthModule, NoopTranslateModule } from '@alfresco/adf-core';
|
||||
|
||||
describe('UnclaimTaskDirective', () => {
|
||||
@Component({
|
||||
@@ -45,7 +45,7 @@ describe('UnclaimTaskDirective', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, TestComponent]
|
||||
imports: [NoopTranslateModule, NoopAuthModule, TestComponent]
|
||||
});
|
||||
taskListService = TestBed.inject(TaskListService);
|
||||
fixture = TestBed.createComponent(TestComponent);
|
||||
@@ -91,24 +91,19 @@ describe('Claim Task Directive validation errors', () => {
|
||||
})
|
||||
class ClaimTestMissingTaskIdDirectiveComponent {}
|
||||
|
||||
let fixture: ComponentFixture<any>;
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, ClaimTestMissingTaskIdDirectiveComponent, ClaimTestMissingInputDirectiveComponent]
|
||||
imports: [NoopTranslateModule, NoopAuthModule, ClaimTestMissingTaskIdDirectiveComponent, ClaimTestMissingInputDirectiveComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(ClaimTestMissingInputDirectiveComponent);
|
||||
});
|
||||
|
||||
it('should throw error when missing input', () => {
|
||||
fixture = TestBed.createComponent(ClaimTestMissingInputDirectiveComponent);
|
||||
|
||||
const fixture = TestBed.createComponent(ClaimTestMissingInputDirectiveComponent);
|
||||
expect(() => fixture.detectChanges()).toThrowError();
|
||||
});
|
||||
|
||||
it('should throw error when taskId is not set', () => {
|
||||
fixture = TestBed.createComponent(ClaimTestMissingTaskIdDirectiveComponent);
|
||||
|
||||
const fixture = TestBed.createComponent(ClaimTestMissingTaskIdDirectiveComponent);
|
||||
expect(() => fixture.detectChanges()).toThrowError('Attribute taskId is required');
|
||||
});
|
||||
});
|
||||
|
@@ -29,7 +29,6 @@ import {
|
||||
} from '../../../testing/mock';
|
||||
import { TaskListService } from '../../services/tasklist.service';
|
||||
import { TaskHeaderComponent } from './task-header.component';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
import { PeopleProcessService } from '../../../services/people-process.service';
|
||||
import { TaskRepresentation } from '@alfresco/js-api';
|
||||
import { SimpleChanges } from '@angular/core';
|
||||
@@ -58,7 +57,7 @@ describe('TaskHeaderComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, TaskHeaderComponent]
|
||||
imports: [TaskHeaderComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(TaskHeaderComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -33,7 +33,6 @@ import {
|
||||
} 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, fakeEmptyTask, paginatedTask, fakeColumnSchema, fakeCustomSchema } from '../../../testing/mock';
|
||||
import { TranslateService } from '@ngx-translate/core';
|
||||
import { of, Subject } from 'rxjs';
|
||||
@@ -672,7 +671,7 @@ describe('CustomTaskListComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, CustomTaskListComponent, CustomTaskListComponent]
|
||||
imports: [CustomTaskListComponent, CustomTaskListComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(CustomTaskListComponent);
|
||||
fixture.detectChanges();
|
||||
@@ -713,7 +712,7 @@ describe('Task List: Custom EmptyTemplateComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, EmptyTemplateComponent]
|
||||
imports: [EmptyTemplateComponent]
|
||||
});
|
||||
translateService = TestBed.inject(TranslateService);
|
||||
taskListService = TestBed.inject(TaskListService);
|
||||
@@ -802,7 +801,7 @@ describe('TaskListContextMenuComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, TaskListContextMenuComponent]
|
||||
imports: [TaskListContextMenuComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(TaskListContextMenuComponent);
|
||||
customComponent = fixture.componentInstance;
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { TaskStandaloneComponent } from './task-standalone.component';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ProcessTestingModule } from '../../../testing/process.testing.module';
|
||||
|
||||
describe('TaskStandaloneComponent', () => {
|
||||
let component: TaskStandaloneComponent;
|
||||
@@ -26,7 +25,7 @@ describe('TaskStandaloneComponent', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [ProcessTestingModule, TaskStandaloneComponent]
|
||||
imports: [TaskStandaloneComponent]
|
||||
});
|
||||
fixture = TestBed.createComponent(TaskStandaloneComponent);
|
||||
component = fixture.componentInstance;
|
||||
|
@@ -17,7 +17,6 @@
|
||||
|
||||
import { TestBed } from '@angular/core/testing';
|
||||
import { TaskFilterService } from './task-filter.service';
|
||||
import { CoreTestingModule } from '@alfresco/adf-core';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
describe('TaskListService', () => {
|
||||
@@ -31,7 +30,6 @@ describe('TaskListService', () => {
|
||||
|
||||
beforeEach(() => {
|
||||
TestBed.configureTestingModule({
|
||||
imports: [CoreTestingModule],
|
||||
providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }]
|
||||
});
|
||||
service = TestBed.inject(TaskFilterService);
|
||||
|
@@ -1,33 +0,0 @@
|
||||
/*!
|
||||
* @license
|
||||
* Copyright © 2005-2025 Hyland Software, Inc. and its affiliates. All rights reserved.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { NgModule } from '@angular/core';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { ProcessModule } from '../process.module';
|
||||
import { CoreModule, FormRenderingService, NoopTranslateModule, NoopAuthModule } from '@alfresco/adf-core';
|
||||
import { ProcessFormRenderingService } from '../form/process-form-rendering.service';
|
||||
import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services';
|
||||
|
||||
@NgModule({
|
||||
imports: [CoreModule.forRoot(), ProcessModule.forRoot(), NoopAuthModule, NoopAnimationsModule, NoopTranslateModule],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
{ provide: FormRenderingService, useClass: ProcessFormRenderingService }
|
||||
],
|
||||
exports: [CoreModule, ProcessModule]
|
||||
})
|
||||
export class ProcessTestingModule {}
|
Reference in New Issue
Block a user