diff --git a/lib/core/src/lib/card-view/components/card-view-keyvaluepairsitem/card-view-keyvaluepairsitem.component.spec.ts b/lib/core/src/lib/card-view/components/card-view-keyvaluepairsitem/card-view-keyvaluepairsitem.component.spec.ts index 433bff1d6f..048b643130 100644 --- a/lib/core/src/lib/card-view/components/card-view-keyvaluepairsitem/card-view-keyvaluepairsitem.component.spec.ts +++ b/lib/core/src/lib/card-view/components/card-view-keyvaluepairsitem/card-view-keyvaluepairsitem.component.spec.ts @@ -122,57 +122,5 @@ describe('CardViewKeyValuePairsItemComponent', () => { expect(cardViewUpdateService.update).toHaveBeenCalled(); expect(component.property.value.length).toBe(0); }); - - it('should update property on input blur', waitForAsync(() => { - spyOn(cardViewUpdateService, 'update'); - component.ngOnChanges(); - fixture.detectChanges(); - - const addButton = fixture.debugElement.query(By.css('.adf-card-view__key-value-pairs__add-btn')); - addButton.triggerEventHandler('click', null); - fixture.detectChanges(); - - const nameInput = fixture.debugElement.query(By.css(`[data-automation-id="card-${component.property.key}-name-input-0"]`)); - const valueInput = fixture.debugElement.query(By.css(`[data-automation-id="card-${component.property.key}-value-input-0"]`)); - - nameInput.nativeElement.value = mockData[0].name; - nameInput.nativeElement.dispatchEvent(new Event('input')); - valueInput.nativeElement.value = mockData[0].value; - valueInput.nativeElement.dispatchEvent(new Event('input')); - - fixture.whenStable().then(() => { - fixture.detectChanges(); - - valueInput.triggerEventHandler('blur', null); - fixture.detectChanges(); - - expect(cardViewUpdateService.update).toHaveBeenCalled(); - expect(JSON.stringify(component.property.value)).toBe(JSON.stringify(mockData)); - }); - })); - - it('should not update property if at least one input is empty on blur', waitForAsync(() => { - spyOn(cardViewUpdateService, 'update'); - component.ngOnChanges(); - fixture.detectChanges(); - - const addButton = fixture.debugElement.query(By.css('.adf-card-view__key-value-pairs__add-btn')); - addButton.triggerEventHandler('click', null); - fixture.detectChanges(); - - const valueInput = fixture.debugElement.query(By.css(`[data-automation-id="card-${component.property.key}-value-input-0"]`)); - - valueInput.nativeElement.value = mockData[0].value; - valueInput.nativeElement.dispatchEvent(new Event('input')); - - fixture.whenStable().then(() => { - fixture.detectChanges(); - - valueInput.triggerEventHandler('blur', null); - fixture.detectChanges(); - - expect(cardViewUpdateService.update).not.toHaveBeenCalled(); - }); - })); }); }); diff --git a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts index d6c721b232..cc83e27023 100644 --- a/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts +++ b/lib/process-services-cloud/src/lib/form/components/form-cloud.component.spec.ts @@ -1231,7 +1231,7 @@ describe('retrieve metadata on submit', () => { NoopAnimationsModule, TranslateModule.forRoot(), CoreModule.forRoot(), - FormCloudModule, + FormCloudModule ], providers: [ provideTranslations('app', 'resources'), diff --git a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts index 89439b3470..fff72aa4f2 100644 --- a/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts +++ b/lib/process-services-cloud/src/lib/task/task-filters/services/task-filter-cloud.service.spec.ts @@ -37,6 +37,7 @@ import { TaskCloudEngineEvent } from './../../../models/engine-event-cloud.model import { ProcessServiceCloudTestingModule } from '../../../testing/process-service-cloud.testing.module'; import { IdentityUserService } from '../../../people/services/identity-user.service'; import { ApolloModule } from 'apollo-angular'; +import { AuthModule } from '@alfresco/adf-core'; describe('TaskFilterCloudService', () => { let service: TaskFilterCloudService; @@ -232,7 +233,7 @@ describe('Inject [LocalPreferenceCloudService] into the TaskFilterCloudService', beforeEach(() => { TestBed.configureTestingModule({ - imports: [HttpClientTestingModule, ApolloModule], + imports: [HttpClientTestingModule, AuthModule, ApolloModule], providers: [ { provide: TASK_FILTERS_SERVICE_TOKEN, useClass: LocalPreferenceCloudService } ]