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:
@@ -21,8 +21,8 @@ import { ContentService } from '../../services/content.service';
|
||||
|
||||
import { ImgViewerComponent } from './img-viewer.component';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreModule } from '../../core.module';
|
||||
import { AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
describe('Test Img viewer component ', () => {
|
||||
|
||||
@@ -38,7 +38,7 @@ describe('Test Img viewer component ', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock }
|
||||
|
@@ -19,8 +19,7 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { MatDialogRef, MAT_DIALOG_DATA } from '@angular/material';
|
||||
import { PdfPasswordDialogComponent } from './pdf-viewer-password-dialog';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreModule } from '../../core.module';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
declare const pdfjsLib: any;
|
||||
|
||||
@@ -31,8 +30,7 @@ describe('PdfPasswordDialogComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CoreModule.forRoot()
|
||||
CoreTestingModule
|
||||
],
|
||||
providers: [
|
||||
{
|
||||
|
@@ -19,7 +19,7 @@ import { DomSanitizer } from '@angular/platform-browser';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { PdfThumbComponent } from './pdf-viewer-thumb.component';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreModule } from '../../core.module';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
describe('PdfThumbComponent', () => {
|
||||
|
||||
@@ -43,7 +43,7 @@ describe('PdfThumbComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: DomSanitizer, useValue: domSanitizer }
|
||||
|
@@ -17,10 +17,9 @@
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { By } from '@angular/platform-browser';
|
||||
import { NoopAnimationsModule } from '@angular/platform-browser/animations';
|
||||
import { PdfThumbListComponent } from './pdf-viewer-thumbnails.component';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreModule } from '../../core.module';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
declare const pdfjsViewer: any;
|
||||
|
||||
@@ -63,8 +62,7 @@ describe('PdfThumbListComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
CoreModule.forRoot()
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
|
@@ -24,11 +24,9 @@ import { RIGHT_ARROW, LEFT_ARROW } from '@angular/cdk/keycodes';
|
||||
import { MatDialog } from '@angular/material';
|
||||
import { of } from 'rxjs';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreModule } from '../../core.module';
|
||||
import { TranslationService } from '../../services/translation.service';
|
||||
import { TranslationMock } from '../../mock/translation.service.mock';
|
||||
import { take } from 'rxjs/operators';
|
||||
import { AppConfigService, AppConfigServiceMock } from '@alfresco/adf-core';
|
||||
import { AppConfigService } from '@alfresco/adf-core';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
declare const pdfjsLib: any;
|
||||
|
||||
@@ -128,7 +126,7 @@ describe('Test PdfViewer component', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
TestDialogComponent,
|
||||
@@ -137,8 +135,6 @@ describe('Test PdfViewer component', () => {
|
||||
BlobTestComponent
|
||||
],
|
||||
providers: [
|
||||
{ provide: TranslationService, useClass: TranslationMock },
|
||||
{ provide: AppConfigService, useClass: AppConfigServiceMock },
|
||||
{
|
||||
provide: MatDialog, useValue: {
|
||||
open: () => {
|
||||
|
@@ -19,7 +19,7 @@ import { SimpleChange } from '@angular/core';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { TxtViewerComponent } from './txt-viewer.component';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreModule } from '../../core.module';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
describe('Text View component', () => {
|
||||
|
||||
@@ -29,7 +29,7 @@ describe('Text View component', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot()
|
||||
CoreTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
|
@@ -21,8 +21,6 @@ import { Component } from '@angular/core';
|
||||
import { ComponentFixture, TestBed, fakeAsync, tick, async } from '@angular/core/testing';
|
||||
import { AlfrescoApiService, RenditionsService } from '../../services';
|
||||
|
||||
import { CoreModule } from '../../core.module';
|
||||
|
||||
import { throwError } from 'rxjs';
|
||||
import { EventMock } from '../../mock/event.mock';
|
||||
import { RenderingQueueServices } from '../services/rendering-queue.services';
|
||||
@@ -30,7 +28,7 @@ import { ViewerComponent } from './viewer.component';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { AlfrescoApiServiceMock } from '../../mock/alfresco-api.service.mock';
|
||||
import { NodeEntry } from '@alfresco/js-api';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
@Component({
|
||||
selector: 'adf-viewer-container-toolbar',
|
||||
@@ -130,8 +128,7 @@ describe('ViewerComponent', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
RouterTestingModule
|
||||
CoreTestingModule
|
||||
],
|
||||
declarations: [
|
||||
ViewerWithCustomToolbarComponent,
|
||||
|
@@ -22,8 +22,7 @@ import { async, TestBed } from '@angular/core/testing';
|
||||
import { ViewerComponent } from '../components/viewer.component';
|
||||
import { ViewerExtensionDirective } from './viewer-extension.directive';
|
||||
import { setupTestBed } from '../../testing/setup-test-bed';
|
||||
import { CoreModule } from '../../core.module';
|
||||
import { RouterTestingModule } from '@angular/router/testing';
|
||||
import { CoreTestingModule } from '../../testing/core.testing.module';
|
||||
|
||||
describe('ExtensionViewerDirective', () => {
|
||||
let extensionViewerDirective: ViewerExtensionDirective;
|
||||
@@ -36,8 +35,7 @@ describe('ExtensionViewerDirective', () => {
|
||||
|
||||
setupTestBed({
|
||||
imports: [
|
||||
CoreModule.forRoot(),
|
||||
RouterTestingModule
|
||||
CoreTestingModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: Location, useClass: SpyLocation },
|
||||
|
@@ -48,7 +48,7 @@ import { A11yModule } from '@angular/cdk/a11y';
|
||||
imports: [
|
||||
CommonModule,
|
||||
MaterialModule,
|
||||
TranslateModule.forChild(),
|
||||
TranslateModule,
|
||||
FormsModule,
|
||||
ReactiveFormsModule,
|
||||
ToolbarModule,
|
||||
|
Reference in New Issue
Block a user