unit test performance (#3194)

* DataTable (-4 sec)

* PaginationComponent (-1 sec)

* DocumentList

* custom testbed setup, test upgrades

* test fixes

* more test fixes

* remove fdescribe

* test fixes

* test fixes

* more test fixes

* test fixes

* upgrade tests

* update tests

* upgrade tests

* upgrade tests

* upgrade tests

* upgrade tests

* update tests

* translate loader fixes

* auth and cookie fixes

* upgrade tests

* upgrade tests

* test fixes

* almost there

* diable broken tests

* process tests (part 1)

* fix lint issues

* another test upgrade

* almost there

* cleanup

* insights testing upgrade

* improve tests

* tests cleanup

* tests cleanup

* cleanup tests

* test cleanup

* favorite nodes tests

* rebase fix syntax

* fix core test

* give up test focus

* flush tabs

* fix search test

* Update document-list.component.spec.ts

* fix document list lock

* increase tick time

* remove duplicate test
This commit is contained in:
Denys Vuika
2018-04-23 09:55:22 +01:00
committed by Eugenio Romano
parent 9fbfcfa96e
commit 382ea3c1b3
204 changed files with 3093 additions and 4389 deletions

View File

@@ -15,15 +15,14 @@
* limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ChartsModule } from 'ng2-charts';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DiagramsModule } from '../../diagram/diagram.module';
import { Chart } from '../../diagram/models/chart/chart.model';
import { ReportQuery } from '../../diagram/models/report/reportQuery.model';
import * as analyticMock from '../../mock';
import { AnalyticsGeneratorComponent } from '../components/analytics-generator.component';
import { AnalyticsProcessModule } from '../analytics-process.module';
import { setupTestBed } from '@alfresco/adf-core';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
declare let jasmine: any;
@@ -32,15 +31,9 @@ describe('AnalyticsGeneratorComponent', () => {
let component: any;
let fixture: ComponentFixture<AnalyticsGeneratorComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
ChartsModule,
DiagramsModule,
AnalyticsProcessModule
]
}).compileComponents();
}));
setupTestBed({
imports: [InsightsTestingModule]
});
beforeEach(() => {
fixture = TestBed.createComponent(AnalyticsGeneratorComponent);

View File

@@ -16,9 +16,9 @@
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DiagramsModule } from '../../diagram/diagram.module';
import { AnalyticsReportHeatMapComponent } from '../components/analytics-report-heat-map.component';
import { AnalyticsProcessModule } from '../analytics-process.module';
import { setupTestBed } from '@alfresco/adf-core';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
declare let jasmine: any;
@@ -36,15 +36,9 @@ describe('AnalyticsReportHeatMapComponent', () => {
let totalTimeValues: any = { 'sid-fake-id': 1, 'fake-start-event': 4 };
let avgTimeValues: any = { 'sid-fake-id': 4, 'fake-start-event': 5 };
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
DiagramsModule,
AnalyticsProcessModule
]
}).compileComponents();
}));
setupTestBed({
imports: [InsightsTestingModule]
});
beforeEach(() => {
fixture = TestBed.createComponent(AnalyticsReportHeatMapComponent);

View File

@@ -15,11 +15,11 @@
* limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DiagramsModule } from '../../diagram/diagram.module';
import { AnalyticsProcessModule } from '../analytics-process.module';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AnalyticsReportListComponent } from '../components/analytics-report-list.component';
import { ReportParametersModel } from '../../diagram/models/report/reportParameters.model';
import { setupTestBed } from '@alfresco/adf-core';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
declare let jasmine: any;
@@ -39,14 +39,9 @@ describe('AnalyticsReportListComponent', () => {
let fixture: ComponentFixture<AnalyticsReportListComponent>;
let element: HTMLElement;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
DiagramsModule,
AnalyticsProcessModule
]
}).compileComponents();
}));
setupTestBed({
imports: [InsightsTestingModule]
});
beforeEach(() => {
fixture = TestBed.createComponent(AnalyticsReportListComponent);

View File

@@ -20,7 +20,8 @@ import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { ReportParametersModel } from '../../diagram/models/report/reportParameters.model';
import * as analyticParamsMock from '../../mock';
import { AnalyticsReportParametersComponent } from '../components/analytics-report-parameters.component';
import { AnalyticsProcessModule } from '../analytics-process.module';
import { setupTestBed } from '@alfresco/adf-core';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
declare let jasmine: any;
@@ -30,13 +31,9 @@ describe('AnalyticsReportParametersComponent', () => {
let fixture: ComponentFixture<AnalyticsReportParametersComponent>;
let element: HTMLElement;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
AnalyticsProcessModule
]
}).compileComponents();
}));
setupTestBed({
imports: [InsightsTestingModule]
});
beforeEach(() => {
fixture = TestBed.createComponent(AnalyticsReportParametersComponent);

View File

@@ -15,40 +15,26 @@
* limitations under the License.
*/
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
import { DiagramsModule } from '../../diagram/diagram.module';
import { ChartsModule } from 'ng2-charts';
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AnalyticsComponent } from '../components/analytics.component';
declare let jasmine: any;
import { setupTestBed } from '@alfresco/adf-core';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
describe('AnalyticsComponent', () => {
let fixture: ComponentFixture<AnalyticsComponent>;
beforeEach(async(() => {
TestBed.configureTestingModule({
imports: [
ChartsModule,
DiagramsModule
]
}).compileComponents();
}));
setupTestBed({
imports: [InsightsTestingModule]
});
beforeEach(() => {
fixture = TestBed.createComponent(AnalyticsComponent);
fixture.detectChanges();
});
describe('Rendering tests', () => {
beforeEach(() => {
jasmine.Ajax.install();
});
afterEach(() => {
jasmine.Ajax.uninstall();
});
it('should create component', () => {
expect(fixture.componentInstance).toBeDefined();
});
});