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:
Denys Vuika
2019-03-25 12:19:33 +00:00
committed by Eugenio Romano
parent 26c5982a1a
commit a7a48e8b2b
581 changed files with 5435 additions and 5402 deletions

View File

@@ -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);
}));
});

View File

@@ -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);
}));
});

View File

@@ -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);
}));
});

View File

@@ -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);
}));
});

View File

@@ -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);
}));
});

View File

@@ -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);
}));
});

View File

@@ -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);
}));
});

View File

@@ -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);
}));
});

View File

@@ -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];

View File

@@ -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

View File

@@ -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});

View File

@@ -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,

View File

@@ -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

View File

@@ -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,

View File

@@ -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});

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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,

View File

@@ -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

View File

@@ -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' +

View File

@@ -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,

View File

@@ -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

View File

@@ -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,

View File

@@ -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;
}
}

View File

@@ -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) +

View File

@@ -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');

View File

@@ -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;

View File

@@ -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,

View File

@@ -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));
}
}

View File

@@ -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;
}

View File

@@ -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;
}

View File

@@ -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',

View File

@@ -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;
}

View File

@@ -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();
});
});

View File

@@ -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) {