diff --git a/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.spec.ts b/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.spec.ts index 11515944a4..1cc83ba711 100644 --- a/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.spec.ts +++ b/projects/aca-content/folder-rules/src/manage-rules/manage-rules.smart-component.spec.ts @@ -48,6 +48,7 @@ import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatProgressBarHarness } from '@angular/material/progress-bar/testing'; import { MatSlideToggleHarness } from '@angular/material/slide-toggle/testing'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('ManageRulesSmartComponent', () => { let fixture: ComponentFixture; @@ -71,6 +72,7 @@ describe('ManageRulesSmartComponent', () => { toggleAppNavBar$: new Subject() } }, + { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }, { provide: Store, useValue: { dispatch: () => {} } }, { provide: ActivatedRoute, useValue: { params: of({ nodeId: owningFolderIdMock }) } } ] diff --git a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action-list.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action-list.ui-component.spec.ts index a7e53a8e9d..972ca1bf53 100644 --- a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action-list.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action-list.ui-component.spec.ts @@ -28,6 +28,7 @@ import { RuleActionListUiComponent } from './rule-action-list.ui-component'; import { By } from '@angular/platform-browser'; import { DebugElement } from '@angular/core'; import { RuleActionUiComponent } from './rule-action.ui-component'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('RuleActionListUiComponent', () => { let fixture: ComponentFixture; @@ -38,7 +39,8 @@ describe('RuleActionListUiComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [CoreTestingModule] + imports: [CoreTestingModule], + providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); fixture = TestBed.createComponent(RuleActionListUiComponent); diff --git a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts index f3249e92ad..add41943b6 100644 --- a/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/actions/rule-action.ui-component.spec.ts @@ -34,7 +34,7 @@ import { import { By } from '@angular/platform-browser'; import { dummyCategoriesConstraints, dummyConstraints, dummyTagsConstraints } from '../../mock/action-parameter-constraints.mock'; import { securityMarksResponseMock, updateNotificationMock } from '../../mock/security-marks.mock'; -import { CategoryService, NodeAction, TagService } from '@alfresco/adf-content-services'; +import { AlfrescoApiService, AlfrescoApiServiceMock, CategoryService, NodeAction, TagService } from '@alfresco/adf-content-services'; import { MatDialog, MatDialogRef } from '@angular/material/dialog'; import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; @@ -63,7 +63,8 @@ describe('RuleActionUiComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [CoreTestingModule, RuleActionUiComponent] + imports: [CoreTestingModule, RuleActionUiComponent], + providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); fixture = TestBed.createComponent(RuleActionUiComponent); diff --git a/projects/aca-content/folder-rules/src/rule-details/conditions/rule-composite-condition.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/conditions/rule-composite-condition.ui-component.spec.ts index b946f97951..faecaf0773 100644 --- a/projects/aca-content/folder-rules/src/rule-details/conditions/rule-composite-condition.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/conditions/rule-composite-condition.ui-component.spec.ts @@ -33,13 +33,15 @@ import { compositeConditionWithThreeConditionMock } from '../../mock/conditions.mock'; import { RuleSimpleConditionUiComponent } from './rule-simple-condition.ui-component'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('RuleCompositeConditionUiComponent', () => { let fixture: ComponentFixture; beforeEach(() => { TestBed.configureTestingModule({ - imports: [CoreTestingModule, RuleCompositeConditionUiComponent, RuleSimpleConditionUiComponent] + imports: [CoreTestingModule, RuleCompositeConditionUiComponent, RuleSimpleConditionUiComponent], + providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); fixture = TestBed.createComponent(RuleCompositeConditionUiComponent); diff --git a/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.spec.ts index bccce97e4d..5d44d39383 100644 --- a/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/conditions/rule-simple-condition.ui-component.spec.ts @@ -28,7 +28,7 @@ import { CoreTestingModule } from '@alfresco/adf-core'; import { By } from '@angular/platform-browser'; import { DebugElement } from '@angular/core'; import { tagMock, mimeTypeMock, simpleConditionUnknownFieldMock, categoriesListMock } from '../../mock/conditions.mock'; -import { CategoryService, TagService } from '@alfresco/adf-content-services'; +import { AlfrescoApiService, AlfrescoApiServiceMock, CategoryService, TagService } from '@alfresco/adf-content-services'; import { of } from 'rxjs'; import { RuleSimpleCondition } from '../../model/rule-simple-condition.model'; import { delay } from 'rxjs/operators'; @@ -83,7 +83,8 @@ describe('RuleSimpleConditionUiComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [CoreTestingModule, RuleSimpleConditionUiComponent] + imports: [CoreTestingModule, RuleSimpleConditionUiComponent], + providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); fixture = TestBed.createComponent(RuleSimpleConditionUiComponent); diff --git a/projects/aca-content/folder-rules/src/rule-details/edit-rule-dialog.smart-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/edit-rule-dialog.smart-component.spec.ts index dce6f7e78a..5c721f0139 100644 --- a/projects/aca-content/folder-rules/src/rule-details/edit-rule-dialog.smart-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/edit-rule-dialog.smart-component.spec.ts @@ -29,6 +29,7 @@ import { RuleDetailsUiComponent } from './rule-details.ui-component'; import { MAT_DIALOG_DATA, MatDialogRef } from '@angular/material/dialog'; import { CoreTestingModule } from '@alfresco/adf-core'; import { of, timer } from 'rxjs'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('EditRuleDialogSmartComponent', () => { let fixture: ComponentFixture; @@ -43,7 +44,8 @@ describe('EditRuleDialogSmartComponent', () => { imports: [CoreTestingModule, EditRuleDialogUiComponent], providers: [ { provide: MatDialogRef, useValue: dialogRef }, - { provide: MAT_DIALOG_DATA, useValue: dialogOptions } + { provide: MAT_DIALOG_DATA, useValue: dialogOptions }, + { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock } ] }); diff --git a/projects/aca-content/folder-rules/src/rule-details/options/rule-options.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/options/rule-options.ui-component.spec.ts index ba7f24c1f4..157089ca5b 100644 --- a/projects/aca-content/folder-rules/src/rule-details/options/rule-options.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/options/rule-options.ui-component.spec.ts @@ -33,6 +33,7 @@ import { MAT_FORM_FIELD_DEFAULT_OPTIONS } from '@angular/material/form-field'; import { HarnessLoader } from '@angular/cdk/testing'; import { TestbedHarnessEnvironment } from '@angular/cdk/testing/testbed'; import { MatSelectHarness } from '@angular/material/select/testing'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('RuleOptionsUiComponent', () => { let fixture: ComponentFixture; @@ -62,7 +63,16 @@ describe('RuleOptionsUiComponent', () => { TestBed.configureTestingModule({ schemas: [CUSTOM_ELEMENTS_SCHEMA], imports: [FormsModule, ReactiveFormsModule, CoreTestingModule, RuleOptionsUiComponent], - providers: [{ provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, useValue: { floatLabel: 'auto' } }] + providers: [ + { + provide: MAT_FORM_FIELD_DEFAULT_OPTIONS, + useValue: { floatLabel: 'auto' } + }, + { + provide: AlfrescoApiService, + useClass: AlfrescoApiServiceMock + } + ] }); fixture = TestBed.createComponent(RuleOptionsUiComponent); diff --git a/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.spec.ts index e5b3caf2c8..9cd982013e 100644 --- a/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/rule-details.ui-component.spec.ts @@ -30,7 +30,7 @@ import { By } from '@angular/platform-browser'; import { RuleTriggersUiComponent } from './triggers/rule-triggers.ui-component'; import { RuleOptionsUiComponent } from './options/rule-options.ui-component'; import { RuleActionListUiComponent } from './actions/rule-action-list.ui-component'; -import { CategoryService } from '@alfresco/adf-content-services'; +import { AlfrescoApiService, AlfrescoApiServiceMock, CategoryService } from '@alfresco/adf-content-services'; describe('RuleDetailsUiComponent', () => { let fixture: ComponentFixture; @@ -55,7 +55,8 @@ describe('RuleDetailsUiComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [CoreTestingModule, RuleDetailsUiComponent] + imports: [CoreTestingModule, RuleDetailsUiComponent], + providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); fixture = TestBed.createComponent(RuleDetailsUiComponent); diff --git a/projects/aca-content/folder-rules/src/rule-details/triggers/rule-triggers.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-details/triggers/rule-triggers.ui-component.spec.ts index 0a4fc1e63e..ad73816a51 100644 --- a/projects/aca-content/folder-rules/src/rule-details/triggers/rule-triggers.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-details/triggers/rule-triggers.ui-component.spec.ts @@ -27,6 +27,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing'; import { CoreTestingModule } from '@alfresco/adf-core'; import { DebugElement } from '@angular/core'; import { By } from '@angular/platform-browser'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('RuleTriggerUiComponent', () => { let fixture: ComponentFixture; @@ -41,7 +42,8 @@ describe('RuleTriggerUiComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [CoreTestingModule, RuleTriggersUiComponent] + imports: [CoreTestingModule, RuleTriggersUiComponent], + providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); fixture = TestBed.createComponent(RuleTriggersUiComponent); diff --git a/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.spec.ts b/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.spec.ts index db1eca223b..d08296510f 100644 --- a/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.spec.ts +++ b/projects/aca-content/folder-rules/src/rule-list/rule-list/rule-list.ui-component.spec.ts @@ -30,6 +30,7 @@ import { DebugElement } from '@angular/core'; import { By } from '@angular/platform-browser'; import { owningFolderIdMock } from '../../mock/node.mock'; import { of } from 'rxjs'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('RuleListUiComponent', () => { let fixture: ComponentFixture; @@ -38,7 +39,8 @@ describe('RuleListUiComponent', () => { beforeEach(() => { TestBed.configureTestingModule({ - imports: [CoreTestingModule, RuleListUiComponent] + imports: [CoreTestingModule, RuleListUiComponent], + providers: [{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); fixture = TestBed.createComponent(RuleListUiComponent); diff --git a/projects/aca-content/folder-rules/src/services/actions.service.spec.ts b/projects/aca-content/folder-rules/src/services/actions.service.spec.ts index 80c28b479d..ed49ed2022 100644 --- a/projects/aca-content/folder-rules/src/services/actions.service.spec.ts +++ b/projects/aca-content/folder-rules/src/services/actions.service.spec.ts @@ -30,6 +30,7 @@ import { actionDefListMock, actionsTransformedListMock } from '../mock/actions.m import { take } from 'rxjs/operators'; import { dummyConstraints, rawConstraints } from '../mock/action-parameter-constraints.mock'; import { of } from 'rxjs'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('ActionsService', () => { let actionsService: ActionsService; @@ -37,7 +38,7 @@ describe('ActionsService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [CoreTestingModule], - providers: [ActionsService] + providers: [ActionsService, { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); actionsService = TestBed.inject(ActionsService); diff --git a/projects/aca-content/folder-rules/src/services/folder-rule-sets.service.spec.ts b/projects/aca-content/folder-rules/src/services/folder-rule-sets.service.spec.ts index 67411f36fd..a1d70bcb44 100644 --- a/projects/aca-content/folder-rules/src/services/folder-rule-sets.service.spec.ts +++ b/projects/aca-content/folder-rules/src/services/folder-rule-sets.service.spec.ts @@ -32,6 +32,7 @@ import { of } from 'rxjs'; import { getDefaultRuleSetResponseMock, getRuleSetsResponseMock, inheritedRuleSetMock, ownedRuleSetMock } from '../mock/rule-sets.mock'; import { take } from 'rxjs/operators'; import { inheritedRulesMock, linkedRulesMock, ownedRulesMock, ruleMock } from '../mock/rules.mock'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('FolderRuleSetsService', () => { let folderRuleSetsService: FolderRuleSetsService; @@ -45,7 +46,7 @@ describe('FolderRuleSetsService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [CoreTestingModule], - providers: [FolderRuleSetsService, FolderRulesService, ContentApiService] + providers: [FolderRuleSetsService, FolderRulesService, ContentApiService, { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); folderRuleSetsService = TestBed.inject(FolderRuleSetsService); diff --git a/projects/aca-content/folder-rules/src/services/folder-rules.service.spec.ts b/projects/aca-content/folder-rules/src/services/folder-rules.service.spec.ts index 1a41e15c24..e9dd64a2f9 100644 --- a/projects/aca-content/folder-rules/src/services/folder-rules.service.spec.ts +++ b/projects/aca-content/folder-rules/src/services/folder-rules.service.spec.ts @@ -38,6 +38,7 @@ import { import { ruleSetMock } from '../mock/rule-sets.mock'; import { owningFolderIdMock } from '../mock/node.mock'; import { take } from 'rxjs/operators'; +import { AlfrescoApiService, AlfrescoApiServiceMock } from '@alfresco/adf-content-services'; describe('FolderRulesService', () => { let folderRulesService: FolderRulesService; @@ -56,7 +57,7 @@ describe('FolderRulesService', () => { beforeEach(() => { TestBed.configureTestingModule({ imports: [CoreTestingModule], - providers: [FolderRulesService] + providers: [FolderRulesService, { provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock }] }); folderRulesService = TestBed.inject(FolderRulesService);