[ACS-7688] Reduce the usage of LogService and TranslateModule (tests) (#9567)

This commit is contained in:
Denys Vuika
2024-04-19 12:14:33 -04:00
committed by GitHub
parent caa2166151
commit 54c3e12ad8
275 changed files with 4090 additions and 5551 deletions

View File

@@ -22,7 +22,6 @@ import { ReportQuery } from '../../diagram/models/report/report-query.model';
import * as analyticMock from '../../mock';
import { AnalyticsGeneratorComponent } from '../components/analytics-generator.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
@@ -32,7 +31,7 @@ describe('AnalyticsGeneratorComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), InsightsTestingModule]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(AnalyticsGeneratorComponent);
component = fixture.componentInstance;

View File

@@ -18,12 +18,10 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AnalyticsReportHeatMapComponent } from '../components/analytics-report-heat-map.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('AnalyticsReportHeatMapComponent', () => {
let component: AnalyticsReportHeatMapComponent;
let fixture: ComponentFixture<AnalyticsReportHeatMapComponent>;
let element: HTMLElement;
@@ -38,10 +36,7 @@ describe('AnalyticsReportHeatMapComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(AnalyticsReportHeatMapComponent);
component = fixture.componentInstance;
@@ -58,7 +53,6 @@ describe('AnalyticsReportHeatMapComponent', () => {
});
describe('Rendering tests: Heat Map', () => {
beforeEach(() => {
jasmine.Ajax.install();
});
@@ -110,5 +104,5 @@ describe('AnalyticsReportHeatMapComponent', () => {
expect(component.currentMetric).toEqual(avgTimeValues);
expect(component.currentMetricColors).toEqual(avgTimePercentages);
});
});
});
});

View File

@@ -19,7 +19,6 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import { AnalyticsReportListComponent, LAYOUT_GRID, LAYOUT_LIST } from '../components/analytics-report-list.component';
import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
@@ -40,7 +39,7 @@ describe('AnalyticsReportListComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [TranslateModule.forRoot(), InsightsTestingModule]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(AnalyticsReportListComponent);
component = fixture.componentInstance;

View File

@@ -23,12 +23,10 @@ import { AnalyticsReportParametersComponent, ReportFormValues } from '../compone
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;
describe('AnalyticsReportParametersComponent', () => {
let component: AnalyticsReportParametersComponent;
let fixture: ComponentFixture<AnalyticsReportParametersComponent>;
let element: HTMLElement;
@@ -37,10 +35,7 @@ describe('AnalyticsReportParametersComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(AnalyticsReportParametersComponent);
service = TestBed.inject(AnalyticsService);
@@ -69,7 +64,7 @@ describe('AnalyticsReportParametersComponent', () => {
component.successReportParams.emit(fakeReportParam);
});
it('Should render a dropdown with all the status when the definition parameter type is \'status\' ', async () => {
it(`Should render a dropdown with all the status when the definition parameter type is 'status'`, async () => {
component.successReportParams.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-status');
@@ -84,7 +79,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
@@ -93,7 +88,7 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a number with the default value when the definition parameter type is \'integer\' ', async () => {
it(`Should render a number with the default value when the definition parameter type is 'integer'`, async () => {
component.successReportParams.subscribe(() => {
fixture.detectChanges();
const numberElement: any = element.querySelector('#slowProcessInstanceInteger');
@@ -102,7 +97,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
@@ -130,7 +125,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
@@ -154,7 +149,8 @@ describe('AnalyticsReportParametersComponent', () => {
const values: ReportFormValues = {
dateRange: {
startDate: '2016-09-01', endDate: '2016-10-05'
startDate: '2016-09-01',
endDate: '2016-10-05'
},
statusGroup: {
status: 'All'
@@ -182,7 +178,7 @@ describe('AnalyticsReportParametersComponent', () => {
component.submit(values);
});
it('Should render a checkbox with the value true when the definition parameter type is \'boolean\' ', async () => {
it(`Should render a checkbox with the value true when the definition parameter type is 'boolean'`, async () => {
component.successReportParams.subscribe(() => {
fixture.detectChanges();
const checkElement: any = element.querySelector('#typeFiltering-input');
@@ -191,7 +187,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
@@ -200,7 +196,7 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a date range components when the definition parameter type is \'dateRange\' ', async () => {
it(`Should render a date range components when the definition parameter type is 'dateRange'`, async () => {
component.successReportParams.subscribe(() => {
const dateElement: any = element.querySelector('adf-date-range-widget');
expect(dateElement).toBeDefined();
@@ -209,7 +205,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.toggleParameters();
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
@@ -218,7 +214,7 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a dropdown with all the RangeInterval when the definition parameter type is \'dateRangeInterval\' ', async () => {
it(`Should render a dropdown with all the RangeInterval when the definition parameter type is 'dateRangeInterval'`, async () => {
component.successReportParams.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-dateRangeInterval');
@@ -233,7 +229,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
@@ -242,70 +238,76 @@ describe('AnalyticsReportParametersComponent', () => {
});
});
it('Should render a dropdown with all the process definition when the definition parameter type is \'processDefinition\' and the' +
' reportId change', async () => {
component.successParamOpt.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-processDefinitionId');
expect(dropDown).toBeDefined();
expect(dropDown.length).toEqual(5);
expect(dropDown[0].innerHTML).toEqual('Choose One');
expect(dropDown[1].innerHTML).toEqual('Fake Process Test 1 Name (v 1) ');
expect(dropDown[2].innerHTML).toEqual('Fake Process Test 1 Name (v 2) ');
expect(dropDown[3].innerHTML).toEqual('Fake Process Test 2 Name (v 1) ');
expect(dropDown[4].innerHTML).toEqual('Fake Process Test 3 Name (v 1) ');
});
it(
`Should render a dropdown with all the process definition when the definition parameter type is 'processDefinition' and the` +
' reportId change',
async () => {
component.successParamOpt.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-processDefinitionId');
expect(dropDown).toBeDefined();
expect(dropDown.length).toEqual(5);
expect(dropDown[0].innerHTML).toEqual('Choose One');
expect(dropDown[1].innerHTML).toEqual('Fake Process Test 1 Name (v 1) ');
expect(dropDown[2].innerHTML).toEqual('Fake Process Test 1 Name (v 2) ');
expect(dropDown[3].innerHTML).toEqual('Fake Process Test 2 Name (v 1) ');
expect(dropDown[4].innerHTML).toEqual('Fake Process Test 3 Name (v 1) ');
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/report-params/1').andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDef
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/report-params/1').andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDef
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/process-definitions').andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDefOptionsNoApp
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/process-definitions').andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDefOptionsNoApp
});
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({ reportId: change });
}
);
});
it(
`Should render a dropdown with all the process definition when the definition parameter type is 'processDefinition' and the` +
' appId change',
async () => {
component.successParamOpt.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-processDefinitionId');
expect(dropDown).toBeDefined();
expect(dropDown.length).toEqual(3);
expect(dropDown[0].innerHTML).toEqual('Choose One');
expect(dropDown[1].innerHTML).toEqual('Fake Process Test 1 Name (v 1) ');
expect(dropDown[2].innerHTML).toEqual('Fake Process Test 1 Name (v 2) ');
});
it('Should render a dropdown with all the process definition when the definition parameter type is \'processDefinition\' and the' +
' appId change', async () => {
component.successParamOpt.subscribe(() => {
fixture.detectChanges();
const dropDown: any = element.querySelector('#select-processDefinitionId');
expect(dropDown).toBeDefined();
expect(dropDown.length).toEqual(3);
expect(dropDown[0].innerHTML).toEqual('Choose One');
expect(dropDown[1].innerHTML).toEqual('Fake Process Test 1 Name (v 1) ');
expect(dropDown[2].innerHTML).toEqual('Fake Process Test 1 Name (v 2) ');
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/report-params/1').andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDef
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/app/rest/reporting/report-params/1').andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDef
});
const appId = 1;
const appId = 1;
jasmine.Ajax.stubRequest(
'http://localhost:9876/bpm/activiti-app/api/enterprise/process-definitions?appDefinitionId=' + appId
).andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDefOptionsApp
});
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/api/enterprise/process-definitions?appDefinitionId=' + appId).andReturn({
status: 200,
contentType: 'json',
responseText: analyticParamsMock.reportDefParamProcessDefOptionsApp
});
component.appId = appId;
component.reportId = '1';
const change = new SimpleChange(null, appId, true);
component.ngOnChanges({appId: change});
});
component.appId = appId;
component.reportId = '1';
const change = new SimpleChange(null, appId, true);
component.ngOnChanges({ appId: change });
}
);
it('Should create an empty valid form when there are no parameters definitions', () => {
component.success.subscribe(() => {
@@ -316,7 +318,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
@@ -365,8 +367,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
});
it('Should emit an error with a 404 response when the report parameters response is not found', async () => {
@@ -376,7 +377,7 @@ describe('AnalyticsReportParametersComponent', () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
jasmine.Ajax.requests.mostRecent().respondWith({
status: 404,
@@ -391,11 +392,10 @@ describe('AnalyticsReportParametersComponent', () => {
});
describe('When the form is rendered correctly', () => {
beforeEach(async () => {
const reportId = 1;
const change = new SimpleChange(null, reportId, true);
component.ngOnChanges({reportId: change});
component.ngOnChanges({ reportId: change });
fixture.detectChanges();
jasmine.Ajax.requests.mostRecent().respondWith({
@@ -478,7 +478,6 @@ describe('AnalyticsReportParametersComponent', () => {
expect(exportButton).toBeNull();
});
});
}));
it('Should hide save button if the form is not valid', fakeAsync(() => {

View File

@@ -15,7 +15,7 @@
* limitations under the License.
*/
import { AdfDateFnsAdapter, DownloadService, LogService } from '@alfresco/adf-core';
import { AdfDateFnsAdapter, DownloadService } from '@alfresco/adf-core';
import {
AfterContentChecked,
Component,
@@ -160,7 +160,6 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
constructor(
private analyticsService: AnalyticsService,
private formBuilder: FormBuilder,
private logService: LogService,
private downloadService: DownloadService,
private dialog: MatDialog,
private dateAdapter: AdfDateFnsAdapter
@@ -351,12 +350,9 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
}
deleteReport(reportId: string) {
this.analyticsService.deleteReport(reportId).subscribe(
() => {
this.deleteReportSuccess.emit(reportId);
},
(error) => this.logService.error(error)
);
this.analyticsService.deleteReport(reportId).subscribe(() => {
this.deleteReportSuccess.emit(reportId);
});
}
ngAfterContentChecked() {

View File

@@ -17,7 +17,6 @@
import { ComponentFixture, TestBed } from '@angular/core/testing';
import { DateRangeWidgetComponent } from './date-range.widget';
import { TranslateModule } from '@ngx-translate/core';
import { InsightsTestingModule } from '../../../../testing/insights.testing.module';
import { ReportParameterDetailsModel } from '../../../../diagram/models/report/report-parameter-details.model';
import { format } from 'date-fns';
@@ -28,10 +27,7 @@ describe('DateRangeWidgetComponent', () => {
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DateRangeWidgetComponent);
@@ -71,7 +67,7 @@ describe('DateRangeWidgetComponent', () => {
expect(widget.dateRange.valid).toBeTrue();
let emitted: { startDate: string; endDate: string };
widget.dateRangeChanged.subscribe((value) => emitted = value);
widget.dateRangeChanged.subscribe((value) => (emitted = value));
widget.onGroupValueChanged();

View File

@@ -20,22 +20,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as diagramsActivitiesMock from '../../mock/diagram/diagram-activities.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams activities', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -57,7 +52,7 @@ describe('Diagrams activities', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -66,7 +61,6 @@ describe('Diagrams activities', () => {
};
describe('Diagrams component Activities: ', () => {
it('Should render the User Task', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -203,8 +197,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Alfresco Publish task');
const iconTask: any = element.querySelector('adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' +
' raphael-icon-alfresco-publish');
const iconTask: any = element.querySelector(
'adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' + ' raphael-icon-alfresco-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -230,8 +225,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Google Drive Publish task');
const iconTask: any = element.querySelector('diagram-google-drive-publish-task >' +
' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish');
const iconTask: any = element.querySelector(
'diagram-google-drive-publish-task >' + ' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -257,8 +253,7 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Rest Call task');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' +
' raphael-icon-rest-call');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' + ' raphael-icon-rest-call');
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -284,8 +279,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Box Publish task');
const iconTask: any = element.querySelector('diagram-box-publish-task >' +
' diagram-icon-box-publish-task > raphael-icon-box-publish');
const iconTask: any = element.querySelector(
'diagram-box-publish-task >' + ' diagram-icon-box-publish-task > raphael-icon-box-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -363,7 +359,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake BusinessRule task');
const iconTask: any = element.querySelector('diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule');
const iconTask: any = element.querySelector(
'diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -376,10 +374,9 @@ describe('Diagrams activities', () => {
const resp = { elements: [diagramsActivitiesMock.businessRuleTask] };
ajaxReply(resp);
});
});
});
describe('Diagrams component Activities with process instance id: ', () => {
it('Should render the User Task', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -772,8 +769,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Alfresco Publish task');
const iconTask: any = element.querySelector('adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' +
' raphael-icon-alfresco-publish');
const iconTask: any = element.querySelector(
'adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' + ' raphael-icon-alfresco-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -799,8 +797,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Alfresco Publish task');
const iconTask: any = element.querySelector('adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' +
' raphael-icon-alfresco-publish');
const iconTask: any = element.querySelector(
'adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' + ' raphael-icon-alfresco-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -826,8 +825,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Alfresco Publish task');
const iconTask: any = element.querySelector('adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' +
' raphael-icon-alfresco-publish');
const iconTask: any = element.querySelector(
'adf-diagram-publish-task > diagram-icon-alfresco-publish-task >' + ' raphael-icon-alfresco-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -853,8 +853,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Google Drive Publish task');
const iconTask: any = element.querySelector('diagram-google-drive-publish-task >' +
' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish');
const iconTask: any = element.querySelector(
'diagram-google-drive-publish-task >' + ' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -873,15 +874,18 @@ describe('Diagrams activities', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const task: any = element.querySelector('diagram-google-drive-publish-task > diagram-task > raphael-rect[ng-reflect-stroke="#017501"]');
const task: any = element.querySelector(
'diagram-google-drive-publish-task > diagram-task > raphael-rect[ng-reflect-stroke="#017501"]'
);
expect(task).not.toBeNull();
const taskText: any = element.querySelector('diagram-google-drive-publish-task > diagram-task > raphael-multiline-text');
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Google Drive Publish task');
const iconTask: any = element.querySelector('diagram-google-drive-publish-task >' +
' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish');
const iconTask: any = element.querySelector(
'diagram-google-drive-publish-task >' + ' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -900,15 +904,18 @@ describe('Diagrams activities', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const task: any = element.querySelector('diagram-google-drive-publish-task > diagram-task > raphael-rect[ng-reflect-stroke="#2632aa"]');
const task: any = element.querySelector(
'diagram-google-drive-publish-task > diagram-task > raphael-rect[ng-reflect-stroke="#2632aa"]'
);
expect(task).not.toBeNull();
const taskText: any = element.querySelector('diagram-google-drive-publish-task > diagram-task > raphael-multiline-text');
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Google Drive Publish task');
const iconTask: any = element.querySelector('diagram-google-drive-publish-task >' +
' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish');
const iconTask: any = element.querySelector(
'diagram-google-drive-publish-task >' + ' diagram-icon-google-drive-publish-task > raphael-icon-google-drive-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -934,8 +941,7 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Rest Call task');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' +
' raphael-icon-rest-call');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' + ' raphael-icon-rest-call');
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -961,8 +967,7 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Rest Call task');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' +
' raphael-icon-rest-call');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' + ' raphael-icon-rest-call');
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -988,8 +993,7 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Rest Call task');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' +
' raphael-icon-rest-call');
const iconTask: any = element.querySelector('diagram-rest-call-task > diagram-icon-rest-call-task >' + ' raphael-icon-rest-call');
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -1015,8 +1019,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Box Publish task');
const iconTask: any = element.querySelector('diagram-box-publish-task >' +
' diagram-icon-box-publish-task > raphael-icon-box-publish');
const iconTask: any = element.querySelector(
'diagram-box-publish-task >' + ' diagram-icon-box-publish-task > raphael-icon-box-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -1042,8 +1047,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Box Publish task');
const iconTask: any = element.querySelector('diagram-box-publish-task >' +
' diagram-icon-box-publish-task > raphael-icon-box-publish');
const iconTask: any = element.querySelector(
'diagram-box-publish-task >' + ' diagram-icon-box-publish-task > raphael-icon-box-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -1069,8 +1075,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake Box Publish task');
const iconTask: any = element.querySelector('diagram-box-publish-task >' +
' diagram-icon-box-publish-task > raphael-icon-box-publish');
const iconTask: any = element.querySelector(
'diagram-box-publish-task >' + ' diagram-icon-box-publish-task > raphael-icon-box-publish'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -1252,7 +1259,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake BusinessRule task');
const iconTask: any = element.querySelector('diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule');
const iconTask: any = element.querySelector(
'diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -1278,7 +1287,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake BusinessRule task');
const iconTask: any = element.querySelector('diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule');
const iconTask: any = element.querySelector(
'diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -1304,7 +1315,9 @@ describe('Diagrams activities', () => {
expect(taskText).not.toBeNull();
expect(taskText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Fake BusinessRule task');
const iconTask: any = element.querySelector('diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule');
const iconTask: any = element.querySelector(
'diagram-business-rule-task > diagram-icon-business-rule-task > raphael-icon-business-rule'
);
expect(iconTask).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -1317,5 +1330,5 @@ describe('Diagrams activities', () => {
const resp = { elements: [diagramsActivitiesMock.businessRuleTaskCompleted] };
ajaxReply(resp);
});
});
});
});

View File

@@ -20,22 +20,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as boundaryEventMock from '../../mock/diagram/diagram-boundary.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams boundary', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -53,7 +48,7 @@ describe('Diagrams boundary', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -62,7 +57,6 @@ describe('Diagrams boundary', () => {
};
describe('Diagrams component Boundary events with process instance id: ', () => {
it('Should render the Boundary time event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -78,8 +72,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -112,8 +107,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -146,8 +142,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -176,8 +173,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -210,8 +208,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -244,8 +243,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -274,8 +274,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -308,8 +309,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -342,8 +344,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -372,8 +375,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -406,8 +410,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -440,8 +445,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -470,8 +476,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -504,8 +511,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -538,8 +546,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -555,7 +564,6 @@ describe('Diagrams boundary', () => {
});
describe('Diagrams component Boundary events: ', () => {
it('Should render the Boundary time event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -571,8 +579,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -601,8 +610,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -631,8 +641,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -661,8 +672,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -691,8 +703,9 @@ describe('Diagrams boundary', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-boundary-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');

View File

@@ -20,22 +20,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as intermediateCatchingMock from '../../mock/diagram/diagram-intermediate.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams Catching', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -56,7 +51,7 @@ describe('Diagrams Catching', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -65,7 +60,6 @@ describe('Diagrams Catching', () => {
};
describe('Diagrams component Intermediate Catching events: ', () => {
it('Should render the Intermediate catching time event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -81,8 +75,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -111,8 +106,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -141,8 +137,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -171,8 +168,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -188,7 +186,6 @@ describe('Diagrams Catching', () => {
});
describe('Diagrams component Intermediate Catching events with process instance id: ', () => {
it('Should render the Intermediate catching time event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -204,8 +201,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -225,7 +223,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -238,8 +238,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -259,7 +260,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -272,8 +275,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -302,8 +306,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -323,7 +328,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -336,8 +343,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -357,7 +365,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -370,8 +380,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -400,8 +411,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -421,7 +433,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -434,8 +448,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -455,7 +470,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -468,8 +485,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -498,8 +516,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -519,7 +538,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#017501"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -532,8 +553,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -553,7 +575,9 @@ describe('Diagrams Catching', () => {
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const coloredShape: any = element.querySelector('diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
const coloredShape: any = element.querySelector(
'diagram-intermediate-catching-event>raphael-circle[ng-reflect-stroke="#2632aa"]'
);
expect(coloredShape).not.toBeNull();
const shape: any = element.querySelector('diagram-intermediate-catching-event');
@@ -566,8 +590,9 @@ describe('Diagrams Catching', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-intermediate-catching-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');

View File

@@ -20,22 +20,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as diagramsEventsMock from '../../mock/diagram/diagram-events.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams events', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -54,7 +49,7 @@ describe('Diagrams events', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -63,7 +58,6 @@ describe('Diagrams events', () => {
};
describe('Diagrams component Events: ', () => {
it('Should render the Start Event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -90,8 +84,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -113,8 +109,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -135,8 +133,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -157,8 +157,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -197,8 +199,9 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-end-event > diagram-event >' + ' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -213,7 +216,6 @@ describe('Diagrams events', () => {
});
describe('Diagrams component Events with process instance id: ', () => {
it('Should render the Start Event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -276,8 +278,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -299,8 +303,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -322,8 +328,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-timer > raphael-icon-timer'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -345,8 +353,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -367,8 +377,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -389,8 +401,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-signal > raphael-icon-signal'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -411,8 +425,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -433,8 +449,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -455,8 +473,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-message > raphael-icon-message'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -477,8 +497,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -499,8 +521,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -521,8 +545,10 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-start-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -597,8 +623,9 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-end-event > diagram-event >' + ' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -619,8 +646,9 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-end-event > diagram-event >' + ' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);
@@ -641,8 +669,9 @@ describe('Diagrams events', () => {
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
expect(event).not.toBeNull();
const iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error');
const iconEvent: any = element.querySelector(
'diagram-end-event > diagram-event >' + ' diagram-container-icon-event > div > div > diagram-icon-error > raphael-icon-error'
);
expect(iconEvent).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
expect(tooltip.textContent).toContain(res.elements[0].id);

View File

@@ -20,22 +20,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as flowsMock from '../../mock/diagram/diagram-flows.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams flows', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -54,7 +49,7 @@ describe('Diagrams flows', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -63,7 +58,6 @@ describe('Diagrams flows', () => {
};
describe('Diagrams component Flows with process instance id: ', () => {
it('Should render the flow', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -85,7 +79,6 @@ describe('Diagrams flows', () => {
});
describe('Diagrams component Flows: ', () => {
it('Should render the flow', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();

View File

@@ -20,22 +20,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as diagramsGatewaysMock from '../../mock/diagram/diagram-gateways.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams gateways', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -54,7 +49,7 @@ describe('Diagrams gateways', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -63,7 +58,6 @@ describe('Diagrams gateways', () => {
};
describe('Diagrams component Gateways: ', () => {
it('Should render the Exclusive Gateway', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -164,7 +158,6 @@ describe('Diagrams gateways', () => {
});
describe('Diagrams component Gateways with process instance id: ', () => {
it('Should render the Exclusive Gateway', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -192,7 +185,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-exclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]');
const shape: any = element.querySelector(
'diagram-exclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
@@ -214,7 +209,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-exclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]');
const shape: any = element.querySelector(
'diagram-exclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
@@ -258,7 +255,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-inclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]');
const shape: any = element.querySelector(
'diagram-inclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
@@ -280,7 +279,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-inclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]');
const shape: any = element.querySelector(
'diagram-inclusive-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
@@ -324,7 +325,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-parallel-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]');
const shape: any = element.querySelector(
'diagram-parallel-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
@@ -346,7 +349,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-parallel-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]');
const shape: any = element.querySelector(
'diagram-parallel-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
@@ -400,7 +405,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-event-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]');
const shape: any = element.querySelector(
'diagram-event-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#017501"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-event-gateway');
@@ -432,7 +439,9 @@ describe('Diagrams gateways', () => {
fixture.detectChanges();
fixture.whenStable().then(() => {
expect(res).not.toBeNull();
const shape: any = element.querySelector('diagram-event-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]');
const shape: any = element.querySelector(
'diagram-event-gateway > diagram-gateway > raphael-rhombus[ng-reflect-stroke="#2632aa"]'
);
expect(shape).not.toBeNull();
const shape1: any = element.querySelector('diagram-event-gateway');

View File

@@ -19,22 +19,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as structuralMock from '../../mock/diagram/diagram-structural.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams structural', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -53,7 +48,7 @@ describe('Diagrams structural', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -62,7 +57,6 @@ describe('Diagrams structural', () => {
};
describe('Diagrams component Structural: ', () => {
it('Should render the Subprocess', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -103,7 +97,6 @@ describe('Diagrams structural', () => {
});
describe('Diagrams component Structural with process instance id: ', () => {
it('Should render the Subprocess', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();

View File

@@ -19,22 +19,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as swimLanesMock from '../../mock/diagram/diagram-swimlanes.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams swim', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
fixture = TestBed.createComponent(DiagramComponent);
component = fixture.componentInstance;
@@ -53,7 +48,7 @@ describe('Diagrams swim', () => {
jasmine.Ajax.uninstall();
});
const ajaxReply = (resp: any) => {
const ajaxReply = (resp: any) => {
jasmine.Ajax.requests.mostRecent().respondWith({
status: 200,
contentType: 'json',
@@ -62,7 +57,6 @@ describe('Diagrams swim', () => {
};
describe('Diagrams component Swim lane: ', () => {
it('Should render the Pool', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -106,7 +100,6 @@ describe('Diagrams swim', () => {
});
describe('Diagrams component Swim lane with process instance id: ', () => {
it('Should render the Pool', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();

View File

@@ -19,22 +19,17 @@ import { ComponentFixture, TestBed } from '@angular/core/testing';
import * as throwEventMock from '../../mock/diagram/diagram-throw.mock';
import { DiagramComponent } from './diagram.component';
import { InsightsTestingModule } from '../../testing/insights.testing.module';
import { TranslateModule } from '@ngx-translate/core';
declare let jasmine: any;
describe('Diagrams throw', () => {
let component: any;
let fixture: ComponentFixture<DiagramComponent>;
let element: HTMLElement;
beforeEach(() => {
TestBed.configureTestingModule({
imports: [
TranslateModule.forRoot(),
InsightsTestingModule
]
imports: [InsightsTestingModule]
});
jasmine.Ajax.install();
@@ -62,7 +57,6 @@ describe('Diagrams throw', () => {
};
describe('Diagrams component Throw events with process instance id: ', () => {
it('Should render the Throw time event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -78,8 +72,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
done();
});
@@ -108,8 +103,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
done();
});
@@ -138,8 +134,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
done();
});
@@ -164,8 +161,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -198,8 +196,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -232,8 +231,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -262,8 +262,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -296,8 +297,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -330,8 +332,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -360,8 +363,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -394,8 +398,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -428,8 +433,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -458,8 +464,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -492,8 +499,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -526,8 +534,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -543,7 +552,6 @@ describe('Diagrams throw', () => {
});
describe('Diagrams component Throw events: ', () => {
it('Should render the Throw time event', (done) => {
component.success.subscribe((res) => {
fixture.detectChanges();
@@ -559,8 +567,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-timer');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-timer'
);
expect(iconShape).not.toBeNull();
done();
});
@@ -585,8 +594,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-error');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-error'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -615,8 +625,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-signal');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-signal'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -645,8 +656,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');
@@ -675,8 +687,9 @@ describe('Diagrams throw', () => {
const innerCircle = shape.children[1];
expect(innerCircle.localName).toEqual('raphael-circle');
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
' div > div > diagram-icon-message');
const iconShape: any = element.querySelector(
'diagram-throw-event > diagram-container-icon-event >' + ' div > div > diagram-icon-message'
);
expect(iconShape).not.toBeNull();
const tooltip: any = element.querySelector('diagram-tooltip > div');

View File

@@ -26,27 +26,17 @@ import {
AppConfigServiceMock,
TranslationService,
TranslationMock,
CoreModule, AuthModule
CoreModule,
AuthModule
} from '@alfresco/adf-core';
@NgModule({
imports: [
AuthModule.forRoot({ useHash: true }),
NoopAnimationsModule,
TranslateModule,
CoreModule.forRoot(),
InsightsModule
],
imports: [AuthModule.forRoot({ useHash: true }), NoopAnimationsModule, TranslateModule.forRoot(), CoreModule.forRoot(), InsightsModule],
providers: [
{ provide: AlfrescoApiService, useClass: AlfrescoApiServiceMock },
{ provide: AppConfigService, useClass: AppConfigServiceMock },
{ provide: TranslationService, useClass: TranslationMock }
],
exports: [
NoopAnimationsModule,
TranslateModule,
CoreModule,
InsightsModule
]
exports: [NoopAnimationsModule, TranslateModule, CoreModule, InsightsModule]
})
export class InsightsTestingModule {}