mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
Ivy compatible test modules (#5718)
* ivy compatible core unit tests * ivy compatible content tests * ivy compatible process tests * ivy compatible process cloud tests * ivy compatible insights tests * fix content test * fix content test
This commit is contained in:
@@ -23,6 +23,7 @@ import * as analyticMock from '../../mock';
|
||||
import { AnalyticsGeneratorComponent } from '../components/analytics-generator.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -32,7 +33,10 @@ describe('AnalyticsGeneratorComponent', () => {
|
||||
let fixture: ComponentFixture<AnalyticsGeneratorComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -19,6 +19,7 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AnalyticsReportHeatMapComponent } from '../components/analytics-report-heat-map.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -37,7 +38,10 @@ describe('AnalyticsReportHeatMapComponent', () => {
|
||||
const avgTimeValues: any = { 'sid-fake-id': 4, 'fake-start-event': 5 };
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -20,6 +20,7 @@ import { AnalyticsReportListComponent } from '../components/analytics-report-lis
|
||||
import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -40,7 +41,10 @@ describe('AnalyticsReportListComponent', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -24,6 +24,7 @@ import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { AnalyticsService } from '../services/analytics.service';
|
||||
import { of } from 'rxjs';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -36,7 +37,10 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
let service: AnalyticsService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -20,13 +20,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AnalyticsComponent } from '../components/analytics.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
describe('AnalyticsComponent', () => {
|
||||
|
||||
let fixture: ComponentFixture<AnalyticsComponent>;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -20,6 +20,7 @@ import { fakeReportList } from '../../mock';
|
||||
import { AnalyticsService } from './analytics.service';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -28,7 +29,10 @@ describe('AnalyticsService', () => {
|
||||
let service: AnalyticsService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as diagramsActivitiesMock from '../../mock/diagram/diagram-activities.m
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams activities', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as boundaryEventMock from '../../mock/diagram/diagram-boundary.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams boundary', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as intermediateCatchingMock from '../../mock/diagram/diagram-intermedia
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams Catching', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as diagramsEventsMock from '../../mock/diagram/diagram-events.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams events', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as flowsMock from '../../mock/diagram/diagram-flows.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams flows', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as diagramsGatewaysMock from '../../mock/diagram/diagram-gateways.mock'
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams gateways', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as structuralMock from '../../mock/diagram/diagram-structural.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams structural', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as swimLanesMock from '../../mock/diagram/diagram-swimlanes.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams swim', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -21,6 +21,7 @@ import * as throwEventMock from '../../mock/diagram/diagram-throw.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -31,7 +32,10 @@ describe('Diagrams throw', () => {
|
||||
let element: HTMLElement;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
|
@@ -19,6 +19,7 @@ import { TestBed } from '@angular/core/testing';
|
||||
import { AppConfigService, setupTestBed } from '@alfresco/adf-core';
|
||||
import { DiagramsService } from './diagrams.service';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
import { TranslateModule } from '@ngx-translate/core';
|
||||
|
||||
declare let jasmine: any;
|
||||
|
||||
@@ -27,7 +28,10 @@ describe('DiagramsService', () => {
|
||||
let service: DiagramsService;
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
imports: [
|
||||
TranslateModule.forRoot(),
|
||||
InsightsTestingModule
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
|
@@ -32,9 +32,9 @@ import {
|
||||
@NgModule({
|
||||
imports: [
|
||||
NoopAnimationsModule,
|
||||
TranslateModule.forRoot(),
|
||||
CoreModule.forRoot(),
|
||||
InsightsModule.forRoot()
|
||||
TranslateModule,
|
||||
CoreModule,
|
||||
InsightsModule
|
||||
],
|
||||
providers: [
|
||||
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
|
||||
|
Reference in New Issue
Block a user