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:
Denys Vuika
2020-05-20 16:51:51 +01:00
committed by GitHub
parent 4cb3a876d9
commit 654be10dd2
185 changed files with 622 additions and 1156 deletions

View File

@@ -18,12 +18,10 @@
import { Component } from '@angular/core';
import { ComponentFixture, TestBed, async } from '@angular/core/testing';
import { By } from '@angular/platform-browser';
import { setupTestBed, CoreModule, TranslationService } from '@alfresco/adf-core';
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
import { TemplateModule } from '../template.module';
import { TranslationMock } from '../../mock/translation.service.mock';
import { setupTestBed } from '@alfresco/adf-core';
import { TranslateService } from '@ngx-translate/core';
import { of } from 'rxjs';
import { CoreTestingModule } from '../../testing/core.testing.module';
@Component({
selector: 'adf-test-component',
@@ -47,15 +45,10 @@ describe('EmptyContentComponent', () => {
setupTestBed({
imports: [
NoopAnimationsModule,
CoreModule.forRoot(),
TemplateModule
CoreTestingModule
],
declarations: [
TestComponent
],
providers: [
{ provide: TranslationService, useClass: TranslationMock }
]
});

View File

@@ -19,7 +19,6 @@ import { TestBed, async } from '@angular/core/testing';
import { CoreTestingModule } from '../../testing/core.testing.module';
import { ErrorContentComponent } from './error-content.component';
import { TranslationService } from '../../services/translation.service';
import { TranslationMock } from '../../mock/translation.service.mock';
import { setupTestBed } from '../../testing/setup-test-bed';
import { ActivatedRoute } from '@angular/router';
import { of } from 'rxjs';
@@ -50,7 +49,6 @@ describe('ErrorContentComponent', () => {
CoreTestingModule
],
providers: [
{ provide: TranslationService, useClass: TranslationMock },
{ provide: ActivatedRoute, useValue: { params: of() } }
]
});
@@ -114,7 +112,6 @@ describe('ErrorContentComponent', () => {
CoreTestingModule
],
providers: [
{ provide: TranslationService, useClass: TranslationMock },
{ provide: ActivatedRoute, useValue: { params: of({ id: '404' }) } }
]
});

View File

@@ -26,7 +26,7 @@ import { EmptyContentComponent } from './empty-content/empty-content.component';
imports: [
CommonModule,
MaterialModule,
TranslateModule.forChild()
TranslateModule
],
declarations: [
ErrorContentComponent,