mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
enable prefer-const rule for tslint, fix issues (#4409)
* enable prefer-const rule for tslint, fix issues * Update content-node-selector.component.spec.ts * Update content-node-selector.component.spec.ts * fix const * fix lint issues * update tests * update tests * update tests * fix code * fix page class
This commit is contained in:
committed by
Eugenio Romano
parent
26c5982a1a
commit
a7a48e8b2b
@@ -104,7 +104,7 @@ export class AnalyticsGeneratorComponent implements OnChanges {
|
||||
* so one way around it, is to clone the data, change it and then
|
||||
* assign it;
|
||||
*/
|
||||
let clone = JSON.parse(JSON.stringify(report));
|
||||
const clone = JSON.parse(JSON.stringify(report));
|
||||
report.datasets = clone.datasets;
|
||||
}
|
||||
|
||||
|
@@ -28,13 +28,13 @@ describe('AnalyticsReportHeatMapComponent', () => {
|
||||
let fixture: ComponentFixture<AnalyticsReportHeatMapComponent>;
|
||||
let element: HTMLElement;
|
||||
|
||||
let totalCountPercent: any = { 'sid-fake-id': 0, 'fake-start-event': 100 };
|
||||
let totalTimePercent: any = { 'sid-fake-id': 10, 'fake-start-event': 30 };
|
||||
let avgTimePercentages: any = { 'sid-fake-id': 5, 'fake-start-event': 50 };
|
||||
const totalCountPercent: any = { 'sid-fake-id': 0, 'fake-start-event': 100 };
|
||||
const totalTimePercent: any = { 'sid-fake-id': 10, 'fake-start-event': 30 };
|
||||
const avgTimePercentages: any = { 'sid-fake-id': 5, 'fake-start-event': 50 };
|
||||
|
||||
let totalCountValues: any = { 'sid-fake-id': 2, 'fake-start-event': 3 };
|
||||
let totalTimeValues: any = { 'sid-fake-id': 1, 'fake-start-event': 4 };
|
||||
let avgTimeValues: any = { 'sid-fake-id': 4, 'fake-start-event': 5 };
|
||||
const totalCountValues: any = { 'sid-fake-id': 2, 'fake-start-event': 3 };
|
||||
const totalTimeValues: any = { 'sid-fake-id': 1, 'fake-start-event': 4 };
|
||||
const avgTimeValues: any = { 'sid-fake-id': 4, 'fake-start-event': 5 };
|
||||
|
||||
setupTestBed({
|
||||
imports: [InsightsTestingModule]
|
||||
@@ -70,7 +70,7 @@ describe('AnalyticsReportHeatMapComponent', () => {
|
||||
|
||||
component.success.subscribe(() => {
|
||||
fixture.whenStable().then(() => {
|
||||
let dropDown: any = element.querySelector('#select-metrics');
|
||||
const dropDown: any = element.querySelector('#select-metrics');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(3);
|
||||
expect(dropDown[0].innerHTML).toEqual('Number of times a step is executed');
|
||||
@@ -91,21 +91,21 @@ describe('AnalyticsReportHeatMapComponent', () => {
|
||||
}));
|
||||
|
||||
it('should change the currentMetric width totalCount', async(() => {
|
||||
let field = { value: 'totalCount' };
|
||||
const field = { value: 'totalCount' };
|
||||
component.onMetricChanges(field);
|
||||
expect(component.currentMetric).toEqual(totalCountValues);
|
||||
expect(component.currentMetricColors).toEqual(totalCountPercent);
|
||||
}));
|
||||
|
||||
it('should change the currentMetric width totalTime', async(() => {
|
||||
let field = { value: 'totalTime' };
|
||||
const field = { value: 'totalTime' };
|
||||
component.onMetricChanges(field);
|
||||
expect(component.currentMetric).toEqual(totalTimeValues);
|
||||
expect(component.currentMetricColors).toEqual(totalTimePercent);
|
||||
}));
|
||||
|
||||
it('should change the currentMetric width avgTime', async(() => {
|
||||
let field = { value: 'avgTime' };
|
||||
const field = { value: 'avgTime' };
|
||||
component.onMetricChanges(field);
|
||||
expect(component.currentMetric).toEqual(avgTimeValues);
|
||||
expect(component.currentMetricColors).toEqual(avgTimePercentages);
|
||||
|
@@ -25,7 +25,7 @@ declare let jasmine: any;
|
||||
|
||||
describe('AnalyticsReportListComponent', () => {
|
||||
|
||||
let reportList = [
|
||||
const reportList = [
|
||||
{ 'id': 2002, 'name': 'Fake Test Process definition heat map' },
|
||||
{ 'id': 2003, 'name': 'Fake Test Process definition overview' },
|
||||
{ 'id': 2004, 'name': 'Fake Test Process instances overview' },
|
||||
@@ -33,7 +33,7 @@ describe('AnalyticsReportListComponent', () => {
|
||||
{ 'id': 2006, 'name': 'Fake Test Task service level agreement' }
|
||||
];
|
||||
|
||||
let reportSelected = { 'id': 2003, 'name': 'Fake Test Process definition overview' };
|
||||
const reportSelected = { 'id': 2003, 'name': 'Fake Test Process definition overview' };
|
||||
|
||||
let component: AnalyticsReportListComponent;
|
||||
let fixture: ComponentFixture<AnalyticsReportListComponent>;
|
||||
@@ -155,13 +155,13 @@ describe('AnalyticsReportListComponent', () => {
|
||||
|
||||
it('Should return false if the current report is different', () => {
|
||||
component.selectReport(reportSelected);
|
||||
let anotherReport = { 'id': 111, 'name': 'Another Fake Test Process definition overview' };
|
||||
const anotherReport = { 'id': 111, 'name': 'Another Fake Test Process definition overview' };
|
||||
expect(component.isSelected(anotherReport)).toBe(false);
|
||||
});
|
||||
|
||||
it('Should reload the report list', (done) => {
|
||||
component.initObserver();
|
||||
let report = new ReportParametersModel({ 'id': 2002, 'name': 'Fake Test Process definition heat map' });
|
||||
const report = new ReportParametersModel({ 'id': 2002, 'name': 'Fake Test Process definition heat map' });
|
||||
component.reports = [report];
|
||||
expect(component.reports.length).toEqual(1);
|
||||
component.reload();
|
||||
|
@@ -153,7 +153,7 @@ export class AnalyticsReportListComponent implements OnInit {
|
||||
}
|
||||
|
||||
public selectReportByReportId(reportId) {
|
||||
let reportFound = this.reports.find((report) => report.id === reportId);
|
||||
const reportFound = this.reports.find((report) => report.id === reportId);
|
||||
if (reportFound) {
|
||||
this.currentReport = reportFound;
|
||||
this.reportClick.emit(reportFound);
|
||||
|
@@ -60,7 +60,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
});
|
||||
|
||||
it('Should initialize the Report form with a Form Group ', (done) => {
|
||||
let fakeReportParam = new ReportParametersModel(analyticParamsMock.reportDefParamTask);
|
||||
const fakeReportParam = new ReportParametersModel(analyticParamsMock.reportDefParamTask);
|
||||
component.successReportParams.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
expect(component.reportForm.get('taskGroup')).toBeDefined();
|
||||
@@ -73,7 +73,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should render a dropdown with all the status when the definition parameter type is \'status\' ', (done) => {
|
||||
component.successReportParams.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
let dropDown: any = element.querySelector('#select-status');
|
||||
const dropDown: any = element.querySelector('#select-status');
|
||||
expect(element.querySelector('h4').textContent.trim()).toEqual('Fake Task overview status');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(4);
|
||||
@@ -84,8 +84,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -98,14 +98,14 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should render a number with the default value when the definition parameter type is \'integer\' ', (done) => {
|
||||
component.successReportParams.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
let numberElement: any = element.querySelector('#slowProcessInstanceInteger');
|
||||
const numberElement: any = element.querySelector('#slowProcessInstanceInteger');
|
||||
expect(numberElement.value).toEqual('10');
|
||||
|
||||
done();
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -118,10 +118,10 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should render a duration component when the definition parameter type is \'duration\' ', (done) => {
|
||||
component.successReportParams.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
let numberElement: any = element.querySelector('#duration');
|
||||
const numberElement: any = element.querySelector('#duration');
|
||||
expect(numberElement.value).toEqual('0');
|
||||
|
||||
let dropDown: any = element.querySelector('#select-duration');
|
||||
const dropDown: any = element.querySelector('#select-duration');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(4);
|
||||
expect(dropDown[0].innerHTML).toEqual('Seconds');
|
||||
@@ -131,8 +131,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -155,7 +155,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
expect(res.typeFiltering).toEqual(true);
|
||||
});
|
||||
|
||||
let values: any = {
|
||||
const values: any = {
|
||||
dateRange: {
|
||||
startDate: '2016-09-01', endDate: '2016-10-05'
|
||||
},
|
||||
@@ -188,13 +188,13 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should render a checkbox with the value true when the definition parameter type is \'boolean\' ', (done) => {
|
||||
component.successReportParams.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
let checkElement: any = element.querySelector('#typeFiltering-input');
|
||||
const checkElement: any = element.querySelector('#typeFiltering-input');
|
||||
expect(checkElement.checked).toBeTruthy();
|
||||
done();
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -206,13 +206,13 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
it('Should render a date range components when the definition parameter type is \'dateRange\' ', (done) => {
|
||||
component.successReportParams.subscribe(() => {
|
||||
let dateElement: any = element.querySelector('adf-date-range-widget');
|
||||
const dateElement: any = element.querySelector('adf-date-range-widget');
|
||||
expect(dateElement).toBeDefined();
|
||||
done();
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.toggleParameters();
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
@@ -226,7 +226,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should render a dropdown with all the RangeInterval when the definition parameter type is \'dateRangeInterval\' ', (done) => {
|
||||
component.successReportParams.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
let dropDown: any = element.querySelector('#select-dateRangeInterval');
|
||||
const dropDown: any = element.querySelector('#select-dateRangeInterval');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(5);
|
||||
expect(dropDown[0].innerHTML).toEqual('By hour');
|
||||
@@ -237,8 +237,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -252,7 +252,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
' reportId change', (done) => {
|
||||
component.successParamOpt.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
let dropDown: any = element.querySelector('#select-processDefinitionId');
|
||||
const dropDown: any = element.querySelector('#select-processDefinitionId');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(5);
|
||||
expect(dropDown[0].innerHTML).toEqual('Choose One');
|
||||
@@ -275,8 +275,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
responseText: analyticParamsMock.reportDefParamProcessDefOptionsNoApp
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
});
|
||||
@@ -285,7 +285,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
' appId change', (done) => {
|
||||
component.successParamOpt.subscribe(() => {
|
||||
fixture.detectChanges();
|
||||
let dropDown: any = element.querySelector('#select-processDefinitionId');
|
||||
const dropDown: any = element.querySelector('#select-processDefinitionId');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(3);
|
||||
expect(dropDown[0].innerHTML).toEqual('Choose One');
|
||||
@@ -300,7 +300,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
responseText: analyticParamsMock.reportDefParamProcessDef
|
||||
});
|
||||
|
||||
let appId = 1;
|
||||
const appId = 1;
|
||||
|
||||
jasmine.Ajax.stubRequest('http://localhost:9876/bpm/activiti-app/api/enterprise/process-definitions?appDefinitionId=' + appId).andReturn({
|
||||
status: 200,
|
||||
@@ -310,7 +310,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
component.appId = appId;
|
||||
component.reportId = '1';
|
||||
let change = new SimpleChange(null, appId, true);
|
||||
const change = new SimpleChange(null, appId, true);
|
||||
component.ngOnChanges({'appId': change});
|
||||
|
||||
});
|
||||
@@ -322,8 +322,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
expect(component.reportForm.controls).toEqual({});
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -372,8 +372,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
responseText: []
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
});
|
||||
@@ -384,8 +384,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
done();
|
||||
});
|
||||
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
@@ -396,13 +396,13 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
});
|
||||
|
||||
it('Should convert a string in number', () => {
|
||||
let numberConvert = component.convertNumber('2');
|
||||
const numberConvert = component.convertNumber('2');
|
||||
expect(numberConvert).toEqual(2);
|
||||
});
|
||||
|
||||
describe('When the form is rendered correctly', () => {
|
||||
|
||||
let values: any = {
|
||||
const values: any = {
|
||||
dateRange: {
|
||||
startDate: '2016-09-01', endDate: '2016-10-05'
|
||||
},
|
||||
@@ -430,8 +430,8 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
};
|
||||
|
||||
beforeEach(async(() => {
|
||||
let reportId = 1;
|
||||
let change = new SimpleChange(null, reportId, true);
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
fixture.detectChanges();
|
||||
|
||||
@@ -450,11 +450,11 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should be able to change the report title', (done) => {
|
||||
spyOn(service, 'updateReport').and.returnValue(of(analyticParamsMock.reportDefParamStatus));
|
||||
|
||||
let title: HTMLElement = element.querySelector('h4');
|
||||
const title: HTMLElement = element.querySelector('h4');
|
||||
title.click();
|
||||
fixture.detectChanges();
|
||||
|
||||
let reportName: HTMLInputElement = <HTMLInputElement> element.querySelector('#reportName');
|
||||
const reportName: HTMLInputElement = <HTMLInputElement> element.querySelector('#reportName');
|
||||
expect(reportName).not.toBeNull();
|
||||
|
||||
reportName.focus();
|
||||
@@ -465,7 +465,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
let titleChanged: HTMLElement = element.querySelector('h4');
|
||||
const titleChanged: HTMLElement = element.querySelector('h4');
|
||||
expect(titleChanged.textContent.trim()).toEqual('FAKE_TEST_NAME');
|
||||
done();
|
||||
});
|
||||
@@ -481,7 +481,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
component.submit(values);
|
||||
fixture.detectChanges();
|
||||
let saveButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#save-button');
|
||||
const saveButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#save-button');
|
||||
expect(saveButton).toBeDefined();
|
||||
expect(saveButton).not.toBeNull();
|
||||
saveButton.click();
|
||||
@@ -490,11 +490,11 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
let reportDialogTitle: HTMLElement = <HTMLElement> window.document.querySelector('#report-dialog-title');
|
||||
let saveTitleSubMessage: HTMLElement = <HTMLElement> window.document.querySelector('#save-title-submessage');
|
||||
let inputSaveName: HTMLInputElement = <HTMLInputElement> window.document.querySelector('#repName');
|
||||
let performActionButton: HTMLButtonElement = <HTMLButtonElement> window.document.querySelector('#action-dialog-button');
|
||||
let todayDate = component.getTodayDate();
|
||||
const reportDialogTitle: HTMLElement = <HTMLElement> window.document.querySelector('#report-dialog-title');
|
||||
const saveTitleSubMessage: HTMLElement = <HTMLElement> window.document.querySelector('#save-title-submessage');
|
||||
const inputSaveName: HTMLInputElement = <HTMLInputElement> window.document.querySelector('#repName');
|
||||
const performActionButton: HTMLButtonElement = <HTMLButtonElement> window.document.querySelector('#action-dialog-button');
|
||||
const todayDate = component.getTodayDate();
|
||||
|
||||
expect(reportDialogTitle).not.toBeNull('Dialog title should not be null');
|
||||
expect(saveTitleSubMessage).not.toBeNull('Dialog save title submessage should not be null');
|
||||
@@ -513,7 +513,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
xit('Should show a dialog to allowing report export', async(() => {
|
||||
component.submit(values);
|
||||
fixture.detectChanges();
|
||||
let exportButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#export-button');
|
||||
const exportButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#export-button');
|
||||
|
||||
expect(exportButton).toBeDefined();
|
||||
expect(exportButton).not.toBeNull();
|
||||
@@ -523,10 +523,10 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
let reportDialogTitle: HTMLElement = <HTMLElement> window.document.querySelector('#report-dialog-title');
|
||||
let inputSaveName: HTMLInputElement = <HTMLInputElement> window.document.querySelector('#repName');
|
||||
let performActionButton: HTMLButtonElement = <HTMLButtonElement> window.document.querySelector('#action-dialog-button');
|
||||
let todayDate = component.getTodayDate();
|
||||
const reportDialogTitle: HTMLElement = <HTMLElement> window.document.querySelector('#report-dialog-title');
|
||||
const inputSaveName: HTMLInputElement = <HTMLInputElement> window.document.querySelector('#repName');
|
||||
const performActionButton: HTMLButtonElement = <HTMLButtonElement> window.document.querySelector('#action-dialog-button');
|
||||
const todayDate = component.getTodayDate();
|
||||
|
||||
expect(reportDialogTitle).not.toBeNull();
|
||||
expect(inputSaveName.value.trim()).toEqual(analyticParamsMock.reportDefParamStatus.name + ' ( ' + todayDate + ' )');
|
||||
@@ -562,7 +562,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
it('Should raise an event for report deleted', async(() => {
|
||||
fixture.detectChanges();
|
||||
spyOn(component, 'deleteReport');
|
||||
let deleteButton = fixture.debugElement.nativeElement.querySelector('#delete-button');
|
||||
const deleteButton = fixture.debugElement.nativeElement.querySelector('#delete-button');
|
||||
expect(deleteButton).toBeDefined();
|
||||
expect(deleteButton).not.toBeNull();
|
||||
component.deleteReportSuccess.subscribe((reportId) => {
|
||||
|
@@ -111,7 +111,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
|
||||
ngOnInit() {
|
||||
this.dropDownSub = this.onDropdownChanged.subscribe((field) => {
|
||||
let paramDependOn: ReportParameterDetailsModel = this.reportParameters.definition.parameters.find((p) => p.dependsOn === field.id);
|
||||
const paramDependOn: ReportParameterDetailsModel = this.reportParameters.definition.parameters.find((p) => p.dependsOn === field.id);
|
||||
if (paramDependOn) {
|
||||
this.retrieveParameterOptions(this.reportParameters.definition.parameters, this.appId, this.reportId, field.value);
|
||||
}
|
||||
@@ -131,20 +131,20 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
this.reportForm.reset();
|
||||
}
|
||||
|
||||
let reportId = changes['reportId'];
|
||||
const reportId = changes['reportId'];
|
||||
if (reportId && reportId.currentValue) {
|
||||
this.reportId = reportId.currentValue;
|
||||
this.getReportParams(reportId.currentValue);
|
||||
}
|
||||
|
||||
let appId = changes['appId'];
|
||||
const appId = changes['appId'];
|
||||
if (appId && (appId.currentValue || appId.currentValue === null)) {
|
||||
this.getReportParams(this.reportId);
|
||||
}
|
||||
}
|
||||
|
||||
private generateFormGroupFromParameter(parameters: ReportParameterDetailsModel[]) {
|
||||
let formBuilderGroup: any = {};
|
||||
const formBuilderGroup: any = {};
|
||||
parameters.forEach((param: ReportParameterDetailsModel) => {
|
||||
switch (param.type) {
|
||||
case 'dateRange':
|
||||
@@ -263,7 +263,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
}
|
||||
|
||||
convertFormValuesToReportParamQuery(values: any): ReportQuery {
|
||||
let reportParamQuery: ReportQuery = new ReportQuery();
|
||||
const reportParamQuery: ReportQuery = new ReportQuery();
|
||||
if (values.dateRange) {
|
||||
reportParamQuery.dateRange.startDate = this.convertMomentDate(values.dateRange.startDate);
|
||||
reportParamQuery.dateRange.endDate = this.convertMomentDate(values.dateRange.endDate);
|
||||
@@ -353,7 +353,7 @@ export class AnalyticsReportParametersComponent implements OnInit, OnChanges, On
|
||||
doExport(paramQuery: ReportQuery) {
|
||||
this.analyticsService.exportReportToCsv(this.reportId, paramQuery).subscribe(
|
||||
(data: any) => {
|
||||
let blob: Blob = new Blob([data], { type: 'text/csv' });
|
||||
const blob: Blob = new Blob([data], { type: 'text/csv' });
|
||||
this.contentService.downloadBlob(blob, paramQuery.reportName + '.csv');
|
||||
});
|
||||
}
|
||||
|
@@ -62,7 +62,7 @@ export class DateRangeWidgetComponent implements OnInit {
|
||||
this.dateAdapter.setLocale(locale);
|
||||
});
|
||||
|
||||
let momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
|
||||
const momentDateAdapter = <MomentDateAdapter> this.dateAdapter;
|
||||
momentDateAdapter.overrideDisplayFormat = this.SHOW_FORMAT;
|
||||
|
||||
if (this.field) {
|
||||
@@ -75,11 +75,11 @@ export class DateRangeWidgetComponent implements OnInit {
|
||||
}
|
||||
}
|
||||
|
||||
let startDateControl = new FormControl(this.startDatePicker);
|
||||
const startDateControl = new FormControl(this.startDatePicker);
|
||||
startDateControl.setValidators(Validators.required);
|
||||
this.dateRange.addControl('startDate', startDateControl);
|
||||
|
||||
let endDateControl = new FormControl(this.endDatePicker);
|
||||
const endDateControl = new FormControl(this.endDatePicker);
|
||||
endDateControl.setValidators(Validators.required);
|
||||
this.dateRange.addControl('endDate', endDateControl);
|
||||
|
||||
@@ -89,8 +89,8 @@ export class DateRangeWidgetComponent implements OnInit {
|
||||
|
||||
onGroupValueChanged() {
|
||||
if (this.dateRange.valid) {
|
||||
let dateStart = this.convertToMomentDateWithTime(this.dateRange.controls.startDate.value);
|
||||
let endStart = this.convertToMomentDateWithTime(this.dateRange.controls.endDate.value);
|
||||
const dateStart = this.convertToMomentDateWithTime(this.dateRange.controls.startDate.value);
|
||||
const endStart = this.convertToMomentDateWithTime(this.dateRange.controls.endDate.value);
|
||||
this.dateRangeChanged.emit({startDate: dateStart, endDate: endStart});
|
||||
}
|
||||
}
|
||||
@@ -100,9 +100,9 @@ export class DateRangeWidgetComponent implements OnInit {
|
||||
}
|
||||
|
||||
dateCheck(formControl: AbstractControl) {
|
||||
let startDate = moment(formControl.get('startDate').value);
|
||||
let endDate = moment(formControl.get('endDate').value);
|
||||
let isAfterCheck = startDate.isAfter(endDate);
|
||||
const startDate = moment(formControl.get('startDate').value);
|
||||
const endDate = moment(formControl.get('endDate').value);
|
||||
const isAfterCheck = startDate.isAfter(endDate);
|
||||
return isAfterCheck ? {'greaterThan': true} : null;
|
||||
}
|
||||
|
||||
|
@@ -65,7 +65,7 @@ export class DropdownWidgetAnalyticsComponent extends WidgetComponent implements
|
||||
}
|
||||
|
||||
buildValidatorList() {
|
||||
let validatorList = [];
|
||||
const validatorList = [];
|
||||
validatorList.push(Validators.required);
|
||||
if (this.showDefaultOption) {
|
||||
validatorList.push(this.validateDropDown);
|
||||
|
@@ -53,7 +53,7 @@ export class DurationWidgetComponent extends NumberWidgetAnalyticsComponent impl
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let timeType = new FormControl();
|
||||
const timeType = new FormControl();
|
||||
this.formGroup.addControl('timeType', timeType);
|
||||
|
||||
if (this.required) {
|
||||
@@ -63,7 +63,7 @@ export class DurationWidgetComponent extends NumberWidgetAnalyticsComponent impl
|
||||
this.field.value = 0;
|
||||
}
|
||||
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
const paramOptions: ParameterValueModel[] = [];
|
||||
paramOptions.push(new ParameterValueModel({id: '1', name: 'Seconds'}));
|
||||
paramOptions.push(new ParameterValueModel({id: '60', name: 'Minutes'}));
|
||||
paramOptions.push(new ParameterValueModel({id: '3600', name: 'Hours'}));
|
||||
|
@@ -26,7 +26,7 @@ export class WidgetComponent implements OnChanges {
|
||||
fieldChanged: EventEmitter<any> = new EventEmitter<any>();
|
||||
|
||||
ngOnChanges(changes: SimpleChanges) {
|
||||
let field = changes['field'];
|
||||
const field = changes['field'];
|
||||
if (field && field.currentValue) {
|
||||
this.fieldChanged.emit(field.currentValue.value);
|
||||
return;
|
||||
|
@@ -44,9 +44,9 @@ export class AnalyticsService {
|
||||
return from(this.apiService.getInstance().activiti.reportApi.getReportList())
|
||||
.pipe(
|
||||
map((res: any) => {
|
||||
let reports: ReportParametersModel[] = [];
|
||||
const reports: ReportParametersModel[] = [];
|
||||
res.forEach((report: ReportParametersModel) => {
|
||||
let reportModel = new ReportParametersModel(report);
|
||||
const reportModel = new ReportParametersModel(report);
|
||||
if (this.isReportValid(appId, report)) {
|
||||
reports.push(reportModel);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ export class AnalyticsService {
|
||||
}
|
||||
|
||||
getProcessStatusValues(): Observable<any> {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
const paramOptions: ParameterValueModel[] = [];
|
||||
|
||||
paramOptions.push(new ParameterValueModel({ id: 'All', name: 'All' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'Active', name: 'Active' }));
|
||||
@@ -124,7 +124,7 @@ export class AnalyticsService {
|
||||
}
|
||||
|
||||
getDateIntervalValues(): Observable<any> {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
const paramOptions: ParameterValueModel[] = [];
|
||||
|
||||
paramOptions.push(new ParameterValueModel({ id: 'byHour', name: 'By hour' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'byDay', name: 'By day' }));
|
||||
@@ -139,7 +139,7 @@ export class AnalyticsService {
|
||||
}
|
||||
|
||||
getMetricValues(): Observable<any> {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
const paramOptions: ParameterValueModel[] = [];
|
||||
|
||||
paramOptions.push(new ParameterValueModel({ id: 'totalCount', name: 'Number of times a step is executed' }));
|
||||
paramOptions.push(new ParameterValueModel({ id: 'totalTime', name: 'Total time spent in a process step' }));
|
||||
@@ -155,7 +155,7 @@ export class AnalyticsService {
|
||||
return from(this.apiService.getInstance().activiti.reportApi.getProcessDefinitions())
|
||||
.pipe(
|
||||
map((res: any) => {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
const paramOptions: ParameterValueModel[] = [];
|
||||
res.forEach((opt) => {
|
||||
paramOptions.push(new ParameterValueModel(opt));
|
||||
});
|
||||
@@ -166,11 +166,11 @@ export class AnalyticsService {
|
||||
}
|
||||
|
||||
getProcessDefinitionsValues(appId: number): Observable<any> {
|
||||
let options = { 'appDefinitionId': appId };
|
||||
const options = { 'appDefinitionId': appId };
|
||||
return from(this.apiService.getInstance().activiti.processDefinitionsApi.getProcessDefinitions(options))
|
||||
.pipe(
|
||||
map((res: any) => {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
const paramOptions: ParameterValueModel[] = [];
|
||||
res.data.forEach((opt) => {
|
||||
paramOptions.push(new ParameterValueModel(opt));
|
||||
});
|
||||
@@ -184,7 +184,7 @@ export class AnalyticsService {
|
||||
return from(this.apiService.getInstance().activiti.reportApi.getTasksByProcessDefinitionId(reportId, processDefinitionId))
|
||||
.pipe(
|
||||
map((res: any) => {
|
||||
let paramOptions: ParameterValueModel[] = [];
|
||||
const paramOptions: ParameterValueModel[] = [];
|
||||
res.forEach((opt) => {
|
||||
paramOptions.push(new ParameterValueModel({ id: opt, name: opt }));
|
||||
});
|
||||
@@ -198,7 +198,7 @@ export class AnalyticsService {
|
||||
return from(this.apiService.getInstance().activiti.reportApi.getReportsByParams(reportId, paramsQuery))
|
||||
.pipe(
|
||||
map((res: any) => {
|
||||
let elements: Chart[] = [];
|
||||
const elements: Chart[] = [];
|
||||
res.elements.forEach((chartData) => {
|
||||
if (chartData.type === 'pieChart') {
|
||||
elements.push(new PieChart(chartData));
|
||||
|
File diff suppressed because it is too large
Load Diff
@@ -54,7 +54,7 @@ describe('Diagrams boundary', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -69,27 +69,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryTimeEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -99,30 +99,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryTimeEventActive] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -132,30 +132,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryTimeEventCompleted] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -164,27 +164,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryErrorEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -194,30 +194,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryErrorEventActive] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -227,30 +227,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryErrorEventCompleted] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -259,27 +259,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundarySignalEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -289,30 +289,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundarySignalEventActive] };
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -322,30 +322,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundarySignalEventCompleted] };
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -354,27 +354,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -384,30 +384,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEventActive] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -417,30 +417,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEventCompleted] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -449,27 +449,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -479,30 +479,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEventActive] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -512,30 +512,30 @@ describe('Diagrams boundary', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-boundary-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEventCompleted] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -547,27 +547,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryTimeEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -576,27 +576,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryErrorEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -605,27 +605,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundarySignalEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -634,27 +634,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -663,27 +663,27 @@ describe('Diagrams boundary', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-boundary-event');
|
||||
const shape: any = element.querySelector('diagram-boundary-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-boundary-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -54,7 +54,7 @@ describe('Diagrams Catching', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -69,27 +69,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -98,27 +98,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -127,27 +127,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -156,27 +156,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -188,27 +188,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -218,30 +218,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEventActive] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -251,30 +251,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEventCompleted] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -283,27 +283,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -313,30 +313,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEventActive] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -346,30 +346,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEventCompleted] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -378,27 +378,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -408,30 +408,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEventActive] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -441,30 +441,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEventCompleted] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -473,27 +473,27 @@ describe('Diagrams Catching', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEvent] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -503,30 +503,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEventActive] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -536,30 +536,30 @@ describe('Diagrams Catching', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let 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();
|
||||
|
||||
let shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
const shape: any = element.querySelector('diagram-intermediate-catching-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-intermediate-catching-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEventCompleted] };
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -54,7 +54,7 @@ describe('Diagrams events', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -69,15 +69,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -86,20 +86,20 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
|
||||
let resp = { elements: [diagramsEventsMock.startTimeEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -108,19 +108,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event');
|
||||
const event: any = element.querySelector('diagram-start-event');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startSignalEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -129,19 +129,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startMessageEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -150,19 +150,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startErrorEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -171,15 +171,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.endEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -188,19 +188,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endErrorEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -212,15 +212,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -229,15 +229,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startEventActive] };
|
||||
const resp = { elements: [diagramsEventsMock.startEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -246,15 +246,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startEventCompleted] };
|
||||
const resp = { elements: [diagramsEventsMock.startEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -263,19 +263,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startTimeEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEvent] };
|
||||
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
@@ -285,19 +285,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startTimeEventActive] };
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEventActive] };
|
||||
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
@@ -307,19 +307,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startTimeEventCompleted] };
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEventCompleted] };
|
||||
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
@@ -329,19 +329,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startSignalEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -350,19 +350,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startSignalEventActive] };
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -371,19 +371,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startSignalEventCompleted] };
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -392,19 +392,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startMessageEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -413,19 +413,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startMessageEventActive] };
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -434,19 +434,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startMessageEventCompleted] };
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -455,19 +455,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startErrorEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -476,19 +476,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startErrorEventActive] };
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -497,19 +497,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const event: any = element.querySelector('diagram-start-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-start-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.startErrorEventCompleted] };
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -518,15 +518,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.endEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -535,15 +535,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endEventActive] };
|
||||
const resp = { elements: [diagramsEventsMock.endEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -552,15 +552,15 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(event).not.toBeNull();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endEventCompleted] };
|
||||
const resp = { elements: [diagramsEventsMock.endEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -569,19 +569,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endErrorEvent] };
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -590,19 +590,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endErrorEventActive] };
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -611,19 +611,19 @@ describe('Diagrams events', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).toBeDefined();
|
||||
let event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const event: any = element.querySelector('diagram-end-event > diagram-event > raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(event).not.toBeNull();
|
||||
|
||||
let iconEvent: any = element.querySelector('diagram-end-event > diagram-event >' +
|
||||
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();
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsEventsMock.endErrorEventCompleted] };
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -54,7 +54,7 @@ describe('Diagrams flows', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -69,16 +69,16 @@ describe('Diagrams flows', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('adf-diagram-sequence-flow > raphael-flow-arrow');
|
||||
const shape: any = element.querySelector('adf-diagram-sequence-flow > raphael-flow-arrow');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.flows[0].id);
|
||||
expect(tooltip.textContent).toContain(res.flows[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { flows: [flowsMock.flow] };
|
||||
const resp = { flows: [flowsMock.flow] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -90,16 +90,16 @@ describe('Diagrams flows', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('adf-diagram-sequence-flow > raphael-flow-arrow');
|
||||
const shape: any = element.querySelector('adf-diagram-sequence-flow > raphael-flow-arrow');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.flows[0].id);
|
||||
expect(tooltip.textContent).toContain(res.flows[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { flows: [flowsMock.flow] };
|
||||
const resp = { flows: [flowsMock.flow] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -54,7 +54,7 @@ describe('Diagrams gateways', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -69,19 +69,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-exclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-exclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
const shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -90,19 +90,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-inclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-inclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
const shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -111,19 +111,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-parallel-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-parallel-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
const shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -132,29 +132,29 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-event-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-event-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-event-gateway');
|
||||
const shape1: any = element.querySelector('diagram-event-gateway');
|
||||
expect(shape1).not.toBeNull();
|
||||
expect(shape1.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape1.children[1];
|
||||
const outerCircle = shape1.children[1];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape1.children[2];
|
||||
const innerCircle = shape1.children[2];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
const shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
expect(shape2).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -166,19 +166,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-exclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-exclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
const shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -187,19 +187,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
const shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayActive] };
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -208,19 +208,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
const shape1: any = element.querySelector('diagram-exclusive-gateway > raphael-cross');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.exclusiveGatewayCompleted] };
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -229,19 +229,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-inclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-inclusive-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
const shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -250,19 +250,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
const shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayActive] };
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -271,19 +271,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
const shape1: any = element.querySelector('diagram-inclusive-gateway > raphael-circle');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.inclusiveGatewayCompleted] };
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -292,19 +292,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-parallel-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-parallel-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
const shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -313,19 +313,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
const shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatewayActive] };
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -334,19 +334,19 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
const shape1: any = element.querySelector('diagram-parallel-gateway > raphael-plus');
|
||||
expect(shape1).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.parallelGatewayCompleted] };
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -355,29 +355,29 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-event-gateway > diagram-gateway > raphael-rhombus');
|
||||
const shape: any = element.querySelector('diagram-event-gateway > diagram-gateway > raphael-rhombus');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-event-gateway');
|
||||
const shape1: any = element.querySelector('diagram-event-gateway');
|
||||
expect(shape1).not.toBeNull();
|
||||
expect(shape1.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape1.children[1];
|
||||
const outerCircle = shape1.children[1];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape1.children[2];
|
||||
const innerCircle = shape1.children[2];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
const shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
expect(shape2).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -386,29 +386,29 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-event-gateway');
|
||||
const shape1: any = element.querySelector('diagram-event-gateway');
|
||||
expect(shape1).not.toBeNull();
|
||||
expect(shape1.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape1.children[1];
|
||||
const outerCircle = shape1.children[1];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape1.children[2];
|
||||
const innerCircle = shape1.children[2];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
const shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
expect(shape2).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatewayActive] };
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -417,29 +417,29 @@ describe('Diagrams gateways', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let 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();
|
||||
|
||||
let shape1: any = element.querySelector('diagram-event-gateway');
|
||||
const shape1: any = element.querySelector('diagram-event-gateway');
|
||||
expect(shape1).not.toBeNull();
|
||||
expect(shape1.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape1.children[1];
|
||||
const outerCircle = shape1.children[1];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape1.children[2];
|
||||
const innerCircle = shape1.children[2];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
const shape2: any = element.querySelector('diagram-event-gateway > raphael-pentagon');
|
||||
expect(shape2).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [diagramsGatewaysMock.eventGatewayCompleted] };
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -54,7 +54,7 @@ describe('Diagrams structural', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -69,16 +69,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-subprocess > raphael-rect');
|
||||
const shape: any = element.querySelector('diagram-subprocess > raphael-rect');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.subProcess] };
|
||||
const resp = { elements: [structuralMock.subProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -87,16 +87,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-event-subprocess > raphael-rect');
|
||||
const shape: any = element.querySelector('diagram-event-subprocess > raphael-rect');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.eventSubProcess] };
|
||||
const resp = { elements: [structuralMock.eventSubProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -108,16 +108,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-subprocess > raphael-rect');
|
||||
const shape: any = element.querySelector('diagram-subprocess > raphael-rect');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.subProcess] };
|
||||
const resp = { elements: [structuralMock.subProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -126,16 +126,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-subprocess > raphael-rect[ng-reflect-stroke="#017501"]');
|
||||
const shape: any = element.querySelector('diagram-subprocess > raphael-rect[ng-reflect-stroke="#017501"]');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.subProcessActive] };
|
||||
const resp = { elements: [structuralMock.subProcessActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -144,16 +144,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-subprocess > raphael-rect[ng-reflect-stroke="#2632aa"]');
|
||||
const shape: any = element.querySelector('diagram-subprocess > raphael-rect[ng-reflect-stroke="#2632aa"]');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.subProcessCompleted] };
|
||||
const resp = { elements: [structuralMock.subProcessCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -162,16 +162,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-event-subprocess > raphael-rect');
|
||||
const shape: any = element.querySelector('diagram-event-subprocess > raphael-rect');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.eventSubProcess] };
|
||||
const resp = { elements: [structuralMock.eventSubProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -180,16 +180,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-event-subprocess > raphael-rect[ng-reflect-stroke="#017501"]');
|
||||
const shape: any = element.querySelector('diagram-event-subprocess > raphael-rect[ng-reflect-stroke="#017501"]');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.eventSubProcessActive] };
|
||||
const resp = { elements: [structuralMock.eventSubProcessActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -198,16 +198,16 @@ describe('Diagrams structural', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-event-subprocess > raphael-rect[ng-reflect-stroke="#2632aa"]');
|
||||
const shape: any = element.querySelector('diagram-event-subprocess > raphael-rect[ng-reflect-stroke="#2632aa"]');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [structuralMock.eventSubProcessCompleted] };
|
||||
const resp = { elements: [structuralMock.eventSubProcessCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -54,7 +54,7 @@ describe('Diagrams swim', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -69,16 +69,16 @@ describe('Diagrams swim', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-pool > raphael-rect');
|
||||
const shape: any = element.querySelector('diagram-pool > raphael-rect');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shapeText: any = element.querySelector('diagram-pool > raphael-text');
|
||||
const shapeText: any = element.querySelector('diagram-pool > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes[2].value).toEqual('Activiti');
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { pools: [swimLanesMock.pool] };
|
||||
const resp = { pools: [swimLanesMock.pool] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -87,19 +87,19 @@ describe('Diagrams swim', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shapeLane: any = element.querySelector('diagram-lanes > div > div > diagram-lane');
|
||||
const shapeLane: any = element.querySelector('diagram-lanes > div > div > diagram-lane');
|
||||
expect(shapeLane).not.toBeNull();
|
||||
|
||||
let shapeRect: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-rect');
|
||||
const shapeRect: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-rect');
|
||||
expect(shapeRect).not.toBeNull();
|
||||
|
||||
let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
const shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes[2].value).toEqual('Backend');
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { pools: [swimLanesMock.poolLanes] };
|
||||
const resp = { pools: [swimLanesMock.poolLanes] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -111,16 +111,16 @@ describe('Diagrams swim', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-pool > raphael-rect');
|
||||
const shape: any = element.querySelector('diagram-pool > raphael-rect');
|
||||
expect(shape).not.toBeNull();
|
||||
|
||||
let shapeText: any = element.querySelector('diagram-pool > raphael-text');
|
||||
const shapeText: any = element.querySelector('diagram-pool > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes[2].value).toEqual('Activiti');
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { pools: [swimLanesMock.pool] };
|
||||
const resp = { pools: [swimLanesMock.pool] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -129,19 +129,19 @@ describe('Diagrams swim', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shapeLane: any = element.querySelector('diagram-lanes > div > div > diagram-lane');
|
||||
const shapeLane: any = element.querySelector('diagram-lanes > div > div > diagram-lane');
|
||||
expect(shapeLane).not.toBeNull();
|
||||
|
||||
let shapeRect: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-rect');
|
||||
const shapeRect: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-rect');
|
||||
expect(shapeRect).not.toBeNull();
|
||||
|
||||
let shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
const shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes[2].value).toEqual('Backend');
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { pools: [swimLanesMock.poolLanes] };
|
||||
const resp = { pools: [swimLanesMock.poolLanes] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -53,7 +53,7 @@ describe('Diagrams throw', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
let ajaxReply = (resp: any) => {
|
||||
const ajaxReply = (resp: any) => {
|
||||
jasmine.Ajax.requests.mostRecent().respondWith({
|
||||
status: 200,
|
||||
contentType: 'json',
|
||||
@@ -68,23 +68,23 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwTimeEvent] };
|
||||
const resp = { elements: [throwEventMock.throwTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -94,26 +94,26 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwTimeEventActive] };
|
||||
const resp = { elements: [throwEventMock.throwTimeEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -123,26 +123,26 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwTimeEventCompleted] };
|
||||
const resp = { elements: [throwEventMock.throwTimeEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -151,27 +151,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwErrorEvent] };
|
||||
const resp = { elements: [throwEventMock.throwErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -181,30 +181,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwErrorEventActive] };
|
||||
const resp = { elements: [throwEventMock.throwErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -214,30 +214,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwErrorEventCompleted] };
|
||||
const resp = { elements: [throwEventMock.throwErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -246,27 +246,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwSignalEvent] };
|
||||
const resp = { elements: [throwEventMock.throwSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -276,30 +276,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwSignalEventActive] };
|
||||
const resp = { elements: [throwEventMock.throwSignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -309,30 +309,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwSignalEventCompleted] };
|
||||
const resp = { elements: [throwEventMock.throwSignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -341,27 +341,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -371,30 +371,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEventActive] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -404,30 +404,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEventCompleted] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -436,27 +436,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -466,30 +466,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#017501"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEventActive] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -499,30 +499,30 @@ describe('Diagrams throw', () => {
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
|
||||
let coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
const coloredShape: any = element.querySelector('diagram-throw-event>raphael-circle[ng-reflect-stroke="#2632aa"]');
|
||||
expect(coloredShape).not.toBeNull();
|
||||
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEventCompleted] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
@@ -534,23 +534,23 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwTimeEvent] };
|
||||
const resp = { elements: [throwEventMock.throwTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -559,27 +559,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-error');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwErrorEvent] };
|
||||
const resp = { elements: [throwEventMock.throwErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -588,27 +588,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-signal');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwSignalEvent] };
|
||||
const resp = { elements: [throwEventMock.throwSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -617,27 +617,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
|
||||
@@ -646,27 +646,27 @@ describe('Diagrams throw', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
expect(res).not.toBeNull();
|
||||
let shape: any = element.querySelector('diagram-throw-event');
|
||||
const shape: any = element.querySelector('diagram-throw-event');
|
||||
expect(shape).not.toBeNull();
|
||||
expect(shape.children.length).toBe(4);
|
||||
|
||||
let outerCircle = shape.children[0];
|
||||
const outerCircle = shape.children[0];
|
||||
expect(outerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let innerCircle = shape.children[1];
|
||||
const innerCircle = shape.children[1];
|
||||
expect(innerCircle.localName).toEqual('raphael-circle');
|
||||
|
||||
let iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-message');
|
||||
expect(iconShape).not.toBeNull();
|
||||
|
||||
let tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
let resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
@@ -106,9 +106,9 @@ export class DiagramComponent implements OnChanges {
|
||||
}
|
||||
|
||||
setMetricValueToDiagramElement(diagram: DiagramModel, metrics: any, metricType: string) {
|
||||
for (let key in metrics) {
|
||||
for (const key in metrics) {
|
||||
if (metrics.hasOwnProperty(key)) {
|
||||
let foundElement: DiagramElementModel = diagram.elements.find(
|
||||
const foundElement: DiagramElementModel = diagram.elements.find(
|
||||
(element: DiagramElementModel) => element.id === key);
|
||||
if (foundElement) {
|
||||
foundElement.value = metrics[key];
|
||||
|
@@ -61,8 +61,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
|
||||
|
||||
public draw(position: Point) {
|
||||
|
||||
let startX = position.x + 2;
|
||||
let startY = position.y + 2;
|
||||
const startX = position.x + 2;
|
||||
const startY = position.y + 2;
|
||||
|
||||
let path1 = this.paper.path(`M4.11870968,2.12890323 L6.12954839,0.117935484 L3.10993548,0.118064516 L3.10270968,0.118064516
|
||||
C1.42941935,0.118064516 0.0729032258,1.47458065 0.0729032258,3.14774194 C0.0729032258,4.82116129 1.42929032,6.17754839
|
||||
@@ -76,8 +76,8 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
|
||||
'stroke-width': this.strokeWidth
|
||||
});
|
||||
|
||||
let startX1 = startX + 1.419355;
|
||||
let startY1 = startY + 8.387097;
|
||||
const startX1 = startX + 1.419355;
|
||||
const startY1 = startY + 8.387097;
|
||||
path1.transform('T' + startX1 + ',' + startY1);
|
||||
|
||||
path1 = this.paper.path(`M10.4411613,10.5153548 L8.43032258,8.50451613 L8.43032258,11.5313548 C8.43032258,13.2047742 9.78683871,
|
||||
@@ -101,7 +101,7 @@ export class RaphaelIconAlfrescoPublishDirective extends RaphaelBase implements
|
||||
'stroke-width': this.strokeWidth
|
||||
});
|
||||
|
||||
let startX2 = startX + 5.548387;
|
||||
const startX2 = startX + 5.548387;
|
||||
path1.transform('T' + startX2 + ',' + startY);
|
||||
|
||||
path1 = this.paper.path(`M4.58090323,1.0156129 C3.39767742,-0.167483871 1.47935484,-0.167483871 0.296129032,1.01574194
|
||||
|
@@ -61,7 +61,7 @@ export class RaphaelIconBoxPublishDirective extends RaphaelBase implements OnIni
|
||||
|
||||
public draw(position: Point) {
|
||||
|
||||
let image = this.paper.image();
|
||||
const image = this.paper.image();
|
||||
|
||||
image.attr({'x': position.x});
|
||||
image.attr({'y': position.y});
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconBusinessRuleDirective extends RaphaelBase implements OnI
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`m 1,2 0,14 16,0 0,-14 z m 1.45458,5.6000386 2.90906,0 0,2.7999224 -2.90906,0 z m 4.36364,0 8.72718,0
|
||||
const path1 = this.paper.path(`m 1,2 0,14 16,0 0,-14 z m 1.45458,5.6000386 2.90906,0 0,2.7999224 -2.90906,0 z m 4.36364,0 8.72718,0
|
||||
0,2.7999224 -8.72718,0 z m -4.36364,4.1998844 2.90906,0 0,2.800116 -2.90906,0 z m
|
||||
4.36364,0 8.72718,0 0,2.800116 -8.72718,0 z`).attr({
|
||||
'stroke': this.stroke,
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconCamelDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`m 8.1878027,15.383782 c -0.824818,-0.3427 0.375093,-1.1925 0.404055,-1.7743 0.230509,-0.8159
|
||||
const path1 = this.paper.path(`m 8.1878027,15.383782 c -0.824818,-0.3427 0.375093,-1.1925 0.404055,-1.7743 0.230509,-0.8159
|
||||
-0.217173,-1.5329 -0.550642,-2.2283 -0.106244,-0.5273 -0.03299,-1.8886005 -0.747194,-1.7818005 -0.712355,0.3776 -0.9225,1.2309005
|
||||
-1.253911,1.9055005 -0.175574,1.0874 -0.630353,2.114 -0.775834,3.2123 -0.244009,0.4224 -1.741203,0.3888 -1.554386,-0.1397
|
||||
0.651324,-0.3302 1.13227,-0.9222 1.180246,-1.6705 0.0082,-0.7042 -0.133578,-1.3681 0.302178,-2.0083 0.08617,-0.3202
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconErrorDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`M 22.820839,11.171502 L 19.36734,24.58992 L 13.54138,14.281819 L 9.3386512,20.071607
|
||||
const path1 = this.paper.path(`M 22.820839,11.171502 L 19.36734,24.58992 L 13.54138,14.281819 L 9.3386512,20.071607
|
||||
L 13.048949,6.8323057 L 18.996148,16.132659 L 22.820839,11.171502 z`).attr({
|
||||
'opacity': 1,
|
||||
'stroke': this.stroke,
|
||||
|
@@ -61,7 +61,7 @@ export class RaphaelIconGoogleDrivePublishDirective extends RaphaelBase implemen
|
||||
|
||||
public draw(position: Point) {
|
||||
|
||||
let image = this.paper.image();
|
||||
const image = this.paper.image();
|
||||
|
||||
image.attr({'x': position.x});
|
||||
image.attr({'y': position.y});
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconManualDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`m 17,9.3290326 c -0.0069,0.5512461 -0.455166,1.0455894 -0.940778,1.0376604 l -5.792746,0 c
|
||||
const path1 = this.paper.path(`m 17,9.3290326 c -0.0069,0.5512461 -0.455166,1.0455894 -0.940778,1.0376604 l -5.792746,0 c
|
||||
0.0053,0.119381 0.0026,0.237107 0.0061,0.355965 l 5.154918,0 c 0.482032,-0.0096 0.925529,0.49051 0.919525,1.037574 -0.0078,0.537128
|
||||
-0.446283,1.017531 -0.919521,1.007683 l -5.245273,0 c -0.01507,0.104484 -0.03389,0.204081 -0.05316,0.301591 l 2.630175,0
|
||||
c 0.454137,-0.0096 0.872112,0.461754 0.866386,0.977186 C 13.619526,14.554106 13.206293,15.009498 12.75924,15 L 3.7753054,15
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconMessageDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
|
||||
const path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
|
||||
L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({
|
||||
'opacity': this.fillOpacity,
|
||||
'stroke': this.stroke,
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconMuleDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`M 8,0 C 3.581722,0 0,3.5817 0,8 c 0,4.4183 3.581722,8 8,8 4.418278,0 8,-3.5817 8,-8 L 16,7.6562
|
||||
const path1 = this.paper.path(`M 8,0 C 3.581722,0 0,3.5817 0,8 c 0,4.4183 3.581722,8 8,8 4.418278,0 8,-3.5817 8,-8 L 16,7.6562
|
||||
C 15.813571,3.3775 12.282847,0 8,0 z M 5.1875,2.7812 8,7.3437 10.8125,2.7812 c 1.323522,0.4299 2.329453,1.5645 2.8125,2.8438
|
||||
1.136151,2.8609 -0.380702,6.4569 -3.25,7.5937 -0.217837,-0.6102 -0.438416,-1.2022 -0.65625,-1.8125 0.701032,-0.2274
|
||||
1.313373,-0.6949 1.71875,-1.3125 0.73624,-1.2317 0.939877,-2.6305 -0.03125,-4.3125 l -2.75,4.0625 -0.65625,0 -0.65625,0 -2.75,-4
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconReceiveDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`m 0.5,2.5 0,13 17,0 0,-13 z M 2,4 6.5,8.5 2,13 z M 4,4 14,4 9,9 z m 12,0 0,9 -4.5,-4.5 z
|
||||
const path1 = this.paper.path(`m 0.5,2.5 0,13 17,0 0,-13 z M 2,4 6.5,8.5 2,13 z M 4,4 14,4 9,9 z m 12,0 0,9 -4.5,-4.5 z
|
||||
M 7.5,9.5 9,11 10.5,9.5 15,14 3,14 z`).attr({
|
||||
'stroke': this.stroke,
|
||||
'fill': this.fillColors
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconRestCallDirective extends RaphaelBase implements OnInit
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`m 16.704699,5.9229055 q 0.358098,0 0.608767,0.2506681 0.250669,0.250668 0.250669,0.6087677 0,0.3580997
|
||||
const path1 = this.paper.path(`m 16.704699,5.9229055 q 0.358098,0 0.608767,0.2506681 0.250669,0.250668 0.250669,0.6087677 0,0.3580997
|
||||
-0.250669,0.6087677 -0.250669,0.2506679 -0.608767,0.2506679 -0.358098,0 -0.608767,-0.2506679 -0.250669,-0.250668
|
||||
-0.250669,-0.6087677 0,-0.3580997 0.250669,-0.6087677 0.250669,-0.2506681 0.608767,-0.2506681 z m 2.578308,-2.0053502 q
|
||||
-2.229162,0 -3.854034,0.6759125 -1.624871,0.6759067 -3.227361,2.2694472 -0.716197,0.725146 -1.575633,1.7457293 L
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconScriptDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`m 5,2 0,0.094 c 0.23706,0.064 0.53189,0.1645 0.8125,0.375 0.5582,0.4186 1.05109,1.228 1.15625,2.5312
|
||||
const path1 = this.paper.path(`m 5,2 0,0.094 c 0.23706,0.064 0.53189,0.1645 0.8125,0.375 0.5582,0.4186 1.05109,1.228 1.15625,2.5312
|
||||
l 8.03125,0 1,0 1,0 c 0,-3 -2,-3 -2,-3 l -10,0 z M 4,3 4,13 2,13 c 0,3 2,3 2,3 l 9,0 c 0,0 2,0 2,-3 L 15,6 6,6 6,5.5 C 6,4.1111
|
||||
5.5595,3.529 5.1875,3.25 4.8155,2.971 4.5,3 4.5,3 L 4,3 z`).attr({
|
||||
'stroke': this.stroke,
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconSendDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
|
||||
const path1 = this.paper.path(`M 1 3 L 9 11 L 17 3 L 1 3 z M 1 5 L 1 13 L 5 9 L 1 5 z M 17 5 L 13 9 L 17 13 L 17 5 z M 6 10 L 1 15
|
||||
L 17 15 L 12 10 L 9 13 L 6 10 z`).attr({
|
||||
'stroke': this.stroke,
|
||||
'fill': this.fillColors
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconServiceDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path('M 8,1 7.5,2.875 c 0,0 -0.02438,0.250763 -0.40625,0.4375 C 7.05724,3.330353 7.04387,3.358818 7,3.375' +
|
||||
const path1 = this.paper.path('M 8,1 7.5,2.875 c 0,0 -0.02438,0.250763 -0.40625,0.4375 C 7.05724,3.330353 7.04387,3.358818 7,3.375' +
|
||||
' 6.6676654,3.4929791 6.3336971,3.6092802 6.03125,3.78125 6.02349,3.78566 6.007733,3.77681 6,3.78125 5.8811373,3.761018' +
|
||||
' 5.8125,3.71875 5.8125,3.71875 l -1.6875,-1 -1.40625,1.4375 0.96875,1.65625 c 0,0 0.065705,0.068637 0.09375,0.1875' +
|
||||
' 0.002,0.00849 -0.00169,0.022138 0,0.03125 C 3.6092802,6.3336971 3.4929791,6.6676654 3.375,7 3.3629836,7.0338489' +
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconSignalDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`M 8.7124971,21.247342 L 23.333334,21.247342 L 16.022915,8.5759512 L 8.7124971,21.247342 z`).attr({
|
||||
const path1 = this.paper.path(`M 8.7124971,21.247342 L 23.333334,21.247342 L 16.022915,8.5759512 L 8.7124971,21.247342 z`).attr({
|
||||
'opacity': this.fillOpacity,
|
||||
'stroke': this.stroke,
|
||||
'strokeWidth': this.strokeWidth,
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconTimerDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`M 10 0 C 4.4771525 0 0 4.4771525 0 10 C 0 15.522847 4.4771525 20 10 20 C 15.522847 20 20 15.522847 20
|
||||
const path1 = this.paper.path(`M 10 0 C 4.4771525 0 0 4.4771525 0 10 C 0 15.522847 4.4771525 20 10 20 C 15.522847 20 20 15.522847 20
|
||||
10 C 20 4.4771525 15.522847 1.1842379e-15 10 0 z M 9.09375 1.03125 C 9.2292164 1.0174926 9.362825 1.0389311 9.5 1.03125 L 9.5 3.5
|
||||
L 10.5 3.5 L 10.5 1.03125 C 15.063526 1.2867831 18.713217 4.9364738 18.96875 9.5 L 16.5 9.5 L 16.5 10.5 L 18.96875 10.5 C 18.713217
|
||||
15.063526 15.063526 18.713217 10.5 18.96875 L 10.5 16.5 L 9.5 16.5 L 9.5 18.96875 C 4.9364738 18.713217 1.2867831 15.063526 1.03125
|
||||
|
@@ -60,7 +60,7 @@ export class RaphaelIconUserDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point) {
|
||||
let path1 = this.paper.path(`m 1,17 16,0 0,-1.7778 -5.333332,-3.5555 0,-1.7778 c 1.244444,0 1.244444,-2.3111 1.244444,-2.3111
|
||||
const path1 = this.paper.path(`m 1,17 16,0 0,-1.7778 -5.333332,-3.5555 0,-1.7778 c 1.244444,0 1.244444,-2.3111 1.244444,-2.3111
|
||||
l 0,-3.0222 C 12.555557,0.8221 9.0000001,1.0001 9.0000001,1.0001 c 0,0 -3.5555556,-0.178 -3.9111111,3.5555 l 0,3.0222 c
|
||||
0,0 0,2.3111 1.2444443,2.3111 l 0,1.7778 L 1,15.2222 1,17 17,17`).attr({
|
||||
'opacity': 1,
|
||||
|
@@ -59,13 +59,13 @@ export class RaphaelCircleDirective extends RaphaelBase implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
let opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
let drawElement = this.draw(this.center, this.radius, opts);
|
||||
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
const drawElement = this.draw(this.center, this.radius, opts);
|
||||
drawElement.node.id = this.elementId;
|
||||
}
|
||||
|
||||
public draw(center: Point, radius: number, opts: any) {
|
||||
let circle = this.paper.circle(center.x, center.y, radius).attr(opts);
|
||||
const circle = this.paper.circle(center.x, center.y, radius).attr(opts);
|
||||
return circle;
|
||||
}
|
||||
}
|
||||
|
@@ -56,13 +56,13 @@ export class RaphaelCrossDirective extends RaphaelBase implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
let opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
this.draw(this.center, this.width, this.height, opts);
|
||||
}
|
||||
|
||||
public draw(center: Point, width: number, height: number, opts?: any) {
|
||||
let quarterWidth = width / 4;
|
||||
let quarterHeight = height / 4;
|
||||
const quarterWidth = width / 4;
|
||||
const quarterHeight = height / 4;
|
||||
|
||||
return this.paper.path(
|
||||
'M' + (center.x + quarterWidth + 3) + ' ' + (center.y + quarterHeight + 3) +
|
||||
|
@@ -50,30 +50,30 @@ export class RaphaelFlowArrowDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(flow: any) {
|
||||
let line = this.drawLine(flow);
|
||||
const line = this.drawLine(flow);
|
||||
this.drawArrow(line);
|
||||
}
|
||||
|
||||
public drawLine(flow: any) {
|
||||
let polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCE_FLOW_STROKE, this.paper);
|
||||
const polyline = new Polyline(flow.id, flow.waypoints, this.SEQUENCE_FLOW_STROKE, this.paper);
|
||||
polyline.element = this.paper.path(polyline.path);
|
||||
polyline.element.attr({'stroke-width': this.SEQUENCE_FLOW_STROKE});
|
||||
polyline.element.attr({'stroke': '#585858'});
|
||||
|
||||
polyline.element.node.id = this.flow.id;
|
||||
|
||||
let lastLineIndex = polyline.getLinesCount() - 1;
|
||||
let line = polyline.getLine(lastLineIndex);
|
||||
const lastLineIndex = polyline.getLinesCount() - 1;
|
||||
const line = polyline.getLine(lastLineIndex);
|
||||
return line;
|
||||
}
|
||||
|
||||
public drawArrow(line: any) {
|
||||
let doubleArrowWidth = 2 * this.ARROW_WIDTH;
|
||||
let width = this.ARROW_WIDTH / 2 + .5;
|
||||
let arrowHead: any = this.paper.path('M0 0L-' + width + '-' + doubleArrowWidth + 'L' + width + ' -' + doubleArrowWidth + 'z');
|
||||
const doubleArrowWidth = 2 * this.ARROW_WIDTH;
|
||||
const width = this.ARROW_WIDTH / 2 + .5;
|
||||
const arrowHead: any = this.paper.path('M0 0L-' + width + '-' + doubleArrowWidth + 'L' + width + ' -' + doubleArrowWidth + 'z');
|
||||
|
||||
arrowHead.transform('t' + line.x2 + ',' + line.y2);
|
||||
let angle = Raphael.deg(line.angle - Math.PI / 2);
|
||||
const angle = Raphael.deg(line.angle - Math.PI / 2);
|
||||
arrowHead.transform('...r' + angle + ' 0 0');
|
||||
|
||||
arrowHead.attr('fill', '#585858');
|
||||
|
@@ -58,14 +58,14 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit
|
||||
}
|
||||
|
||||
draw(position: Point, text: string) {
|
||||
let textPaper = this.paper.text(position.x + this.TEXT_PADDING, position.y + this.TEXT_PADDING, text).attr({
|
||||
const textPaper = this.paper.text(position.x + this.TEXT_PADDING, position.y + this.TEXT_PADDING, text).attr({
|
||||
'text-anchor': 'middle',
|
||||
'font-family': 'Arial',
|
||||
'font-size': '11',
|
||||
'fill': '#373e48'
|
||||
});
|
||||
|
||||
let formattedText = this.formatText(textPaper, text, this.elementWidth);
|
||||
const formattedText = this.formatText(textPaper, text, this.elementWidth);
|
||||
textPaper.attr({
|
||||
'text': formattedText
|
||||
});
|
||||
@@ -74,17 +74,18 @@ export class RaphaelMultilineTextDirective extends RaphaelBase implements OnInit
|
||||
}
|
||||
|
||||
private formatText(textPaper, text, elementWidth) {
|
||||
let pText = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
const pText = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ';
|
||||
textPaper.attr({
|
||||
'text': pText
|
||||
});
|
||||
let letterWidth = textPaper.getBBox().width / text.length;
|
||||
let removedLineBreaks = text.split('\n');
|
||||
let actualRowLength = 0, formattedText = [];
|
||||
const letterWidth = textPaper.getBBox().width / text.length;
|
||||
const removedLineBreaks = text.split('\n');
|
||||
let actualRowLength = 0;
|
||||
const formattedText = [];
|
||||
removedLineBreaks.forEach((sentence) => {
|
||||
let words = sentence.split(' ');
|
||||
const words = sentence.split(' ');
|
||||
words.forEach((word) => {
|
||||
let length = word.length;
|
||||
const length = word.length;
|
||||
if (actualRowLength + (length * letterWidth) > elementWidth) {
|
||||
formattedText.push('\n');
|
||||
actualRowLength = 0;
|
||||
|
@@ -53,7 +53,7 @@ export class RaphaelPentagonDirective extends RaphaelBase implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
let opts = {
|
||||
const opts = {
|
||||
'stroke-width': this.strokeWidth,
|
||||
'fill': this.fillColors,
|
||||
'stroke': this.stroke,
|
||||
|
@@ -49,12 +49,12 @@ export class RaphaelPlusDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
ngOnInit() {
|
||||
let opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
this.draw(this.center, opts);
|
||||
}
|
||||
|
||||
public draw(center: Point, opts?: any) {
|
||||
let path = this.paper.path('M 6.75,16 L 25.75,16 M 16,6.75 L 16,25.75').attr(opts);
|
||||
const path = this.paper.path('M 6.75,16 L 25.75,16 M 16,6.75 L 16,25.75').attr(opts);
|
||||
return path.transform('T' + (center.x + 4) + ',' + (center.y + 4));
|
||||
}
|
||||
}
|
||||
|
@@ -65,13 +65,13 @@ export class RaphaelRectDirective extends RaphaelBase implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
let opts = {
|
||||
const opts = {
|
||||
'stroke-width': this.strokeWidth,
|
||||
'fill': this.fillColors,
|
||||
'stroke': this.stroke,
|
||||
'fill-opacity': this.fillOpacity
|
||||
};
|
||||
let elementDraw = this.draw(this.leftCorner, this.width, this.height, this.radius, opts);
|
||||
const elementDraw = this.draw(this.leftCorner, this.width, this.height, this.radius, opts);
|
||||
elementDraw.node.id = this.elementId;
|
||||
}
|
||||
|
||||
|
@@ -59,8 +59,8 @@ export class RaphaelRhombusDirective extends RaphaelBase implements OnInit {
|
||||
|
||||
ngOnInit() {
|
||||
|
||||
let opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
let elementDraw = this.draw(this.center, this.width, this.height, opts);
|
||||
const opts = {'stroke-width': this.strokeWidth, 'fill': this.fillColors, 'stroke': this.stroke, 'fill-opacity': this.fillOpacity};
|
||||
const elementDraw = this.draw(this.center, this.width, this.height, opts);
|
||||
elementDraw.node.id = this.elementId;
|
||||
}
|
||||
|
||||
|
@@ -54,7 +54,7 @@ export class RaphaelTextDirective extends RaphaelBase implements OnInit {
|
||||
}
|
||||
|
||||
public draw(position: Point, text: string) {
|
||||
let textPaper = this.paper.text(position.x, position.y, text).attr({
|
||||
const textPaper = this.paper.text(position.x, position.y, text).attr({
|
||||
'text-anchor' : 'middle',
|
||||
'font-family' : 'Arial',
|
||||
'font-size' : '11',
|
||||
|
@@ -47,7 +47,7 @@ export class RaphaelService implements OnDestroy {
|
||||
if (typeof Raphael === 'undefined') {
|
||||
throw new Error('insights configuration issue: Embedding Chart.js lib is mandatory');
|
||||
}
|
||||
let paper = new Raphael(ctx, this.width, this.height);
|
||||
const paper = new Raphael(ctx, this.width, this.height);
|
||||
return paper;
|
||||
}
|
||||
|
||||
|
@@ -59,7 +59,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
});
|
||||
|
||||
it('should render with type and name if name is defined', () => {
|
||||
let tooltipHeader = fixture.debugElement.query(By.css('.adf-diagram-tooltip-header'));
|
||||
const tooltipHeader = fixture.debugElement.query(By.css('.adf-diagram-tooltip-header'));
|
||||
|
||||
expect(tooltipHeader.nativeElement.innerText).toBe('awesome-diagram-element diagram-element-name');
|
||||
});
|
||||
@@ -68,13 +68,13 @@ describe('DiagramTooltipComponent', () => {
|
||||
data.name = '';
|
||||
fixture.detectChanges();
|
||||
|
||||
let tooltipHeader = fixture.debugElement.query(By.css('.adf-diagram-tooltip-header'));
|
||||
const tooltipHeader = fixture.debugElement.query(By.css('.adf-diagram-tooltip-header'));
|
||||
|
||||
expect(tooltipHeader.nativeElement.innerText).toBe('awesome-diagram-element diagram-element-id');
|
||||
});
|
||||
|
||||
it('should render the name if name is defined in the tooltip body', () => {
|
||||
let nameProperty = fixture.debugElement.query(By.css('.adf-diagram-name-property'));
|
||||
const nameProperty = fixture.debugElement.query(By.css('.adf-diagram-name-property'));
|
||||
|
||||
expect(nameProperty).not.toBeNull();
|
||||
expect(nameProperty.nativeElement.innerText).toBe('Name:diagram-element-name');
|
||||
@@ -84,7 +84,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
data.name = '';
|
||||
fixture.detectChanges();
|
||||
|
||||
let nameProperty = fixture.debugElement.query(By.css('.adf-diagram-name-property'));
|
||||
const nameProperty = fixture.debugElement.query(By.css('.adf-diagram-name-property'));
|
||||
|
||||
expect(nameProperty).toBeNull();
|
||||
});
|
||||
@@ -96,7 +96,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
];
|
||||
fixture.detectChanges();
|
||||
|
||||
let propertyNames = fixture.debugElement.queryAll(By.css('.adf-diagram-general-property > .adf-diagram-propertyName')),
|
||||
const propertyNames = fixture.debugElement.queryAll(By.css('.adf-diagram-general-property > .adf-diagram-propertyName')),
|
||||
propertyValues = fixture.debugElement.queryAll(By.css('.adf-diagram-general-property > .adf-diagram-propertyValue'));
|
||||
|
||||
expect(propertyNames.length).toBe(2);
|
||||
@@ -113,7 +113,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
|
||||
fixture.detectChanges();
|
||||
|
||||
let propertyValue = fixture.debugElement.queryAll(By.css('.adf-diagram-heat-value > .adf-diagram-value')),
|
||||
const propertyValue = fixture.debugElement.queryAll(By.css('.adf-diagram-heat-value > .adf-diagram-value')),
|
||||
propertyValueType = fixture.debugElement.queryAll(By.css('.adf-diagram-heat-value > .adf-diagram-valuetype'));
|
||||
|
||||
expect(propertyValue.length).toBe(1);
|
||||
@@ -150,7 +150,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
|
||||
tooltipTarget.nativeElement.dispatchEvent(new MouseEvent('mouseenter'));
|
||||
|
||||
let tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
const tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
expect(tooltip).not.toBeNull();
|
||||
});
|
||||
|
||||
@@ -159,7 +159,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
|
||||
tooltipTarget.nativeElement.dispatchEvent(new MouseEvent('touchend'));
|
||||
|
||||
let tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
const tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
expect(tooltip).not.toBeNull();
|
||||
});
|
||||
|
||||
@@ -169,7 +169,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
tooltipTarget.nativeElement.dispatchEvent(new MouseEvent('mouseenter'));
|
||||
tooltipTarget.nativeElement.dispatchEvent(new MouseEvent('mouseleave'));
|
||||
|
||||
let tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
const tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
expect(tooltip).toBeNull();
|
||||
});
|
||||
|
||||
@@ -179,7 +179,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
tooltipTarget.nativeElement.dispatchEvent(new MouseEvent('mouseenter'));
|
||||
window.dispatchEvent(new CustomEvent('scroll'));
|
||||
|
||||
let tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
const tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
expect(tooltip).toBeNull();
|
||||
});
|
||||
|
||||
@@ -189,7 +189,7 @@ describe('DiagramTooltipComponent', () => {
|
||||
tooltipTarget.nativeElement.dispatchEvent(new MouseEvent('touchend'));
|
||||
window.dispatchEvent(new CustomEvent('touchstart'));
|
||||
|
||||
let tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
const tooltip = fixture.debugElement.query(By.css('.adf-diagram-tooltip.adf-is-active'));
|
||||
expect(tooltip).toBeNull();
|
||||
});
|
||||
});
|
||||
|
@@ -106,9 +106,9 @@ export class DiagramTooltipComponent implements AfterViewInit, OnDestroy {
|
||||
props = { top: (event.pageY - 150), left: event.pageX, width: event.layerX, height: 50 };
|
||||
}
|
||||
|
||||
let top = props.top + (props.height / 2);
|
||||
let marginLeft = -1 * (this.tooltipElement.offsetWidth / 2);
|
||||
let marginTop = -1 * (this.tooltipElement.offsetHeight / 2);
|
||||
const top = props.top + (props.height / 2);
|
||||
const marginLeft = -1 * (this.tooltipElement.offsetWidth / 2);
|
||||
const marginTop = -1 * (this.tooltipElement.offsetHeight / 2);
|
||||
let left = props.left + (props.width / 2);
|
||||
|
||||
if (this.position === POSITION.LEFT || this.position === POSITION.RIGHT) {
|
||||
|
@@ -53,7 +53,7 @@ export class BarChart extends Chart {
|
||||
this.options.scales.yAxes[0].ticks.callback = this.yAxisTickFormatFunction(this.yAxisType);
|
||||
if (obj.values) {
|
||||
obj.values.forEach((params: any) => {
|
||||
let dataValue = [];
|
||||
const dataValue = [];
|
||||
params.values.forEach((info: any) => {
|
||||
info.forEach((value: any, index: any) => {
|
||||
if (index % 2 === 0) {
|
||||
@@ -91,7 +91,7 @@ export class BarChart extends Chart {
|
||||
return function (value) {
|
||||
if (yAxisType !== null && yAxisType !== undefined) {
|
||||
if ('count' === yAxisType) {
|
||||
let label = '' + value;
|
||||
const label = '' + value;
|
||||
if (label.indexOf('.') !== -1) {
|
||||
return '';
|
||||
}
|
||||
|
@@ -22,7 +22,7 @@ export class ReportDefinitionModel {
|
||||
|
||||
constructor(obj?: any) {
|
||||
obj.parameters.forEach((params: any) => {
|
||||
let reportParamsModel = new ReportParameterDetailsModel(params);
|
||||
const reportParamsModel = new ReportParameterDetailsModel(params);
|
||||
this.parameters.push(reportParamsModel);
|
||||
});
|
||||
}
|
||||
|
@@ -46,7 +46,7 @@ export class DiagramColorService {
|
||||
|
||||
getFillColour(key: string) {
|
||||
if (this.totalColors && this.totalColors.hasOwnProperty(key)) {
|
||||
let colorPercentage = this.totalColors[key];
|
||||
const colorPercentage = this.totalColors[key];
|
||||
return this.convertColorToHsb(colorPercentage);
|
||||
} else {
|
||||
return DiagramColorService.ACTIVITY_FILL_COLOR;
|
||||
@@ -72,7 +72,7 @@ export class DiagramColorService {
|
||||
}
|
||||
|
||||
convertColorToHsb(colorPercentage: number): string {
|
||||
let hue = (120.0 - (colorPercentage * 1.2)) / 360.0;
|
||||
const hue = (120.0 - (colorPercentage * 1.2)) / 360.0;
|
||||
return 'hsb(' + hue + ', 1, 1)';
|
||||
}
|
||||
}
|
||||
|
@@ -31,7 +31,7 @@ describe('DiagramsService', () => {
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
let appConfig: AppConfigService = TestBed.get(AppConfigService);
|
||||
const appConfig: AppConfigService = TestBed.get(AppConfigService);
|
||||
appConfig.config.ecmHost = 'http://localhost:9876/ecm';
|
||||
|
||||
service = TestBed.get(DiagramsService);
|
||||
|
Reference in New Issue
Block a user