mirror of
https://github.com/Alfresco/alfresco-ng2-components.git
synced 2025-07-24 17:32:15 +00:00
[ADF-5422] remove deprecated "async()" from unit tests (#7109)
* remove angualar async from content services * upgrade more tests * upgrade core tests * upgrade tests * fix deprecated constant * fix tests * fix after rebase
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { AnalyticsReportHeatMapComponent } from '../components/analytics-report-heat-map.component';
|
||||
import { setupTestBed } from '@alfresco/adf-core';
|
||||
import { InsightsTestingModule } from '../../testing/insights.testing.module';
|
||||
@@ -69,50 +69,48 @@ describe('AnalyticsReportHeatMapComponent', () => {
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
|
||||
it('should render the dropdown with the metric options', async(() => {
|
||||
it('should render the dropdown with the metric options', async () => {
|
||||
component.report = { totalCountsPercentages: { 'sid-fake-id': 10, 'fake-start-event': 30 } };
|
||||
|
||||
component.success.subscribe(() => {
|
||||
fixture.whenStable().then(() => {
|
||||
const dropDown: any = element.querySelector('#select-metrics');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(3);
|
||||
expect(dropDown[0].innerHTML).toEqual('Number of times a step is executed');
|
||||
expect(dropDown[1].innerHTML).toEqual('Total time spent in a process step');
|
||||
expect(dropDown[2].innerHTML).toEqual('Average time spent in a process step');
|
||||
});
|
||||
});
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
await fixture.whenStable();
|
||||
|
||||
it('should return false when no metrics are defined in the report', async(() => {
|
||||
const dropDown: any = element.querySelector('#select-metrics');
|
||||
expect(dropDown).toBeDefined();
|
||||
expect(dropDown.length).toEqual(3);
|
||||
expect(dropDown[0].innerHTML).toEqual('Number of times a step is executed');
|
||||
expect(dropDown[1].innerHTML).toEqual('Total time spent in a process step');
|
||||
expect(dropDown[2].innerHTML).toEqual('Average time spent in a process step');
|
||||
});
|
||||
|
||||
it('should return false when no metrics are defined in the report', () => {
|
||||
component.report = {};
|
||||
expect(component.hasMetric()).toBeFalsy();
|
||||
}));
|
||||
});
|
||||
|
||||
it('should return true when the metrics are defined in the report', async(() => {
|
||||
it('should return true when the metrics are defined in the report', () => {
|
||||
expect(component.hasMetric()).toBeTruthy();
|
||||
}));
|
||||
});
|
||||
|
||||
it('should change the currentMetric width totalCount', async(() => {
|
||||
it('should change the currentMetric width totalCount', () => {
|
||||
const field = { value: 'totalCount' };
|
||||
component.onMetricChanges(field);
|
||||
expect(component.currentMetric).toEqual(totalCountValues);
|
||||
expect(component.currentMetricColors).toEqual(totalCountPercent);
|
||||
}));
|
||||
});
|
||||
|
||||
it('should change the currentMetric width totalTime', async(() => {
|
||||
it('should change the currentMetric width totalTime', () => {
|
||||
const field = { value: 'totalTime' };
|
||||
component.onMetricChanges(field);
|
||||
expect(component.currentMetric).toEqual(totalTimeValues);
|
||||
expect(component.currentMetricColors).toEqual(totalTimePercent);
|
||||
}));
|
||||
});
|
||||
|
||||
it('should change the currentMetric width avgTime', async(() => {
|
||||
it('should change the currentMetric width avgTime', () => {
|
||||
const field = { value: 'avgTime' };
|
||||
component.onMetricChanges(field);
|
||||
expect(component.currentMetric).toEqual(avgTimeValues);
|
||||
expect(component.currentMetricColors).toEqual(avgTimePercentages);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -16,7 +16,7 @@
|
||||
*/
|
||||
|
||||
import { SimpleChange } from '@angular/core';
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, fakeAsync, TestBed } from '@angular/core/testing';
|
||||
import { ReportParametersModel } from '../../diagram/models/report/report-parameters.model';
|
||||
import * as analyticParamsMock from '../../mock';
|
||||
import { AnalyticsReportParametersComponent } from '../components/analytics-report-parameters.component';
|
||||
@@ -408,7 +408,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
describe('When the form is rendered correctly', () => {
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(async () => {
|
||||
const reportId = 1;
|
||||
const change = new SimpleChange(null, reportId, true);
|
||||
component.ngOnChanges({'reportId': change});
|
||||
@@ -420,20 +420,19 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
responseText: analyticParamsMock.reportDefParamStatus
|
||||
});
|
||||
|
||||
fixture.whenStable().then(() => {
|
||||
component.toggleParameters();
|
||||
fixture.detectChanges();
|
||||
});
|
||||
}));
|
||||
await fixture.whenStable();
|
||||
component.toggleParameters();
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
it('Should be able to change the report title', (done) => {
|
||||
spyOn(service, 'updateReport').and.returnValue(of(analyticParamsMock.reportDefParamStatus));
|
||||
|
||||
const title: HTMLElement = element.querySelector('h4');
|
||||
const title = element.querySelector<HTMLElement>('h4');
|
||||
title.click();
|
||||
fixture.detectChanges();
|
||||
|
||||
const reportName: HTMLInputElement = <HTMLInputElement> element.querySelector('#reportName');
|
||||
const reportName = element.querySelector<HTMLInputElement>('#reportName');
|
||||
expect(reportName).not.toBeNull();
|
||||
|
||||
reportName.focus();
|
||||
@@ -444,31 +443,31 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
fixture.detectChanges();
|
||||
const titleChanged: HTMLElement = element.querySelector('h4');
|
||||
const titleChanged = element.querySelector<HTMLElement>('h4');
|
||||
expect(titleChanged.textContent.trim()).toEqual('FAKE_TEST_NAME');
|
||||
done();
|
||||
});
|
||||
});
|
||||
|
||||
it('should render adf-buttons-menu component', async(() => {
|
||||
it('should render adf-buttons-menu component', async () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
const buttonsMenuComponent = element.querySelector('adf-buttons-action-menu');
|
||||
expect(buttonsMenuComponent).not.toBeNull();
|
||||
expect(buttonsMenuComponent).toBeDefined();
|
||||
});
|
||||
}));
|
||||
await fixture.whenStable();
|
||||
|
||||
it('should render delete button', async(() => {
|
||||
const buttonsMenuComponent = element.querySelector('adf-buttons-action-menu');
|
||||
expect(buttonsMenuComponent).not.toBeNull();
|
||||
expect(buttonsMenuComponent).toBeDefined();
|
||||
});
|
||||
|
||||
it('should render delete button', async () => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
const buttonsMenuComponent = element.querySelector('#delete-button');
|
||||
expect(buttonsMenuComponent).not.toBeNull();
|
||||
expect(buttonsMenuComponent).toBeDefined();
|
||||
});
|
||||
}));
|
||||
await fixture.whenStable();
|
||||
|
||||
it('Should raise an event for report deleted', async(() => {
|
||||
const buttonsMenuComponent = element.querySelector('#delete-button');
|
||||
expect(buttonsMenuComponent).not.toBeNull();
|
||||
expect(buttonsMenuComponent).toBeDefined();
|
||||
});
|
||||
|
||||
it('Should raise an event for report deleted', fakeAsync(() => {
|
||||
fixture.detectChanges();
|
||||
spyOn(component, 'deleteReport');
|
||||
const deleteButton = fixture.debugElement.nativeElement.querySelector('#delete-button');
|
||||
@@ -481,7 +480,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
expect(component.deleteReport).toHaveBeenCalled();
|
||||
}));
|
||||
|
||||
it('Should hide export button if the form is not valid', async(() => {
|
||||
it('Should hide export button if the form is not valid', fakeAsync(() => {
|
||||
validForm = true;
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -501,7 +500,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
|
||||
}));
|
||||
|
||||
it('Should hide save button if the form is not valid', async(() => {
|
||||
it('Should hide save button if the form is not valid', fakeAsync(() => {
|
||||
validForm = true;
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -520,7 +519,7 @@ describe('AnalyticsReportParametersComponent', () => {
|
||||
});
|
||||
}));
|
||||
|
||||
it('Should show export and save button when the form became valid', async(() => {
|
||||
it('Should show export and save button when the form became valid', fakeAsync(() => {
|
||||
validForm = false;
|
||||
fixture.detectChanges();
|
||||
let saveButton: HTMLButtonElement = <HTMLButtonElement> element.querySelector('#save-button');
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as diagramsActivitiesMock from '../../mock/diagram/diagram-activities.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -69,7 +69,7 @@ describe('Diagrams activities', () => {
|
||||
|
||||
describe('Diagrams component Activities: ', () => {
|
||||
|
||||
it('Should render the User Task', async(() => {
|
||||
it('Should render the User Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -87,14 +87,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.userTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Manual Task', async(() => {
|
||||
it('Should render the Manual Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -112,14 +113,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.manualTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Task', async(() => {
|
||||
it('Should render the Service Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -135,14 +137,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.serviceTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Camel Task', async(() => {
|
||||
it('Should render the Service Camel Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -160,14 +163,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.camelTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Mule Task', async(() => {
|
||||
it('Should render the Service Mule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -181,14 +185,15 @@ describe('Diagrams activities', () => {
|
||||
|
||||
const iconTask: any = element.querySelector('diagram-mule-task > diagram-icon-mule-task > raphael-icon-mule');
|
||||
expect(iconTask).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.muleTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Alfresco Publish Task', async(() => {
|
||||
it('Should render the Service Alfresco Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -207,14 +212,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.alfrescoPublishTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Google Drive Publish Task', async(() => {
|
||||
it('Should render the Service Google Drive Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -233,14 +239,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.googleDrivePublishTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Rest Call Task', async(() => {
|
||||
it('Should render the Rest Call Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -259,14 +266,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.restCallTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Box Publish Task', async(() => {
|
||||
it('Should render the Service Box Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -285,14 +293,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.boxPublishTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Receive Task', async(() => {
|
||||
it('Should render the Receive Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -310,14 +319,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.receiveTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Script Task', async(() => {
|
||||
it('Should render the Script Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -335,14 +345,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.scriptTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Business Rule Task', async(() => {
|
||||
it('Should render the Business Rule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -360,17 +371,18 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.businessRuleTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Activities with process instance id: ', () => {
|
||||
|
||||
it('Should render the User Task', async(() => {
|
||||
it('Should render the User Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -388,14 +400,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.userTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active User Task', async(() => {
|
||||
it('Should render the Active User Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -413,14 +426,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.userTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed User Task', async(() => {
|
||||
it('Should render the Completed User Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -438,14 +452,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.userTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Manual Task', async(() => {
|
||||
it('Should render the Manual Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -463,14 +478,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.manualTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Manual Task', async(() => {
|
||||
it('Should render the Active Manual Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -488,14 +504,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.manualTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Manual Task', async(() => {
|
||||
it('Should render the Completed Manual Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -513,14 +530,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.manualTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Task', async(() => {
|
||||
it('Should render the Service Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -538,14 +556,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.serviceTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Service Task', async(() => {
|
||||
it('Should render the Active Service Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -563,14 +582,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.serviceTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Service Task', async(() => {
|
||||
it('Should render the Completed Service Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -588,14 +608,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.serviceTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Camel Task', async(() => {
|
||||
it('Should render the Service Camel Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -613,14 +634,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.camelTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Service Camel Task', async(() => {
|
||||
it('Should render the Active Service Camel Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -638,14 +660,16 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.camelTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Service Camel Task', async(() => {
|
||||
it('Should render the Completed Service Camel Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -663,14 +687,16 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.camelTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Mule Task', async(() => {
|
||||
it('Should render the Service Mule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -684,14 +710,15 @@ describe('Diagrams activities', () => {
|
||||
|
||||
const iconTask: any = element.querySelector('diagram-mule-task > diagram-icon-mule-task > raphael-icon-mule');
|
||||
expect(iconTask).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.muleTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Service Mule Task', async(() => {
|
||||
it('Should render the Active Service Mule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -705,14 +732,15 @@ describe('Diagrams activities', () => {
|
||||
|
||||
const iconTask: any = element.querySelector('diagram-mule-task > diagram-icon-mule-task > raphael-icon-mule');
|
||||
expect(iconTask).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.muleTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Service Mule Task', async(() => {
|
||||
it('Should render the Completed Service Mule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -726,14 +754,15 @@ describe('Diagrams activities', () => {
|
||||
|
||||
const iconTask: any = element.querySelector('diagram-mule-task > diagram-icon-mule-task > raphael-icon-mule');
|
||||
expect(iconTask).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.muleTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Alfresco Publish Task', async(() => {
|
||||
it('Should render the Service Alfresco Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -752,14 +781,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.alfrescoPublishTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Service Alfresco Publish Task', async(() => {
|
||||
it('Should render the Active Service Alfresco Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -778,14 +808,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.alfrescoPublishTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Service Alfresco Publish Task', async(() => {
|
||||
it('Should render the Completed Service Alfresco Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -804,14 +835,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.alfrescoPublishTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Google Drive Publish Task', async(() => {
|
||||
it('Should render the Service Google Drive Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -830,14 +862,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.googleDrivePublishTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Service Google Drive Publish Task', async(() => {
|
||||
it('Should render the Active Service Google Drive Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -856,14 +889,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.googleDrivePublishTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Service Google Drive Publish Task', async(() => {
|
||||
it('Should render the Completed Service Google Drive Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -882,14 +916,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.googleDrivePublishTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Rest Call Task', async(() => {
|
||||
it('Should render the Rest Call Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -908,14 +943,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.restCallTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Rest Call Task', async(() => {
|
||||
it('Should render the Active Rest Call Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -934,14 +970,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.restCallTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Rest Call Task', async(() => {
|
||||
it('Should render the Completed Rest Call Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -960,14 +997,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.restCallTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Service Box Publish Task', async(() => {
|
||||
it('Should render the Service Box Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -986,14 +1024,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.boxPublishTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Service Box Publish Task', async(() => {
|
||||
it('Should render the Active Service Box Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1012,14 +1051,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.boxPublishTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Service Box Publish Task', async(() => {
|
||||
it('Should render the Completed Service Box Publish Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1038,14 +1078,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.boxPublishTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Receive Task', async(() => {
|
||||
it('Should render the Receive Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1063,14 +1104,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.receiveTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Receive Task', async(() => {
|
||||
it('Should render the Active Receive Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1088,14 +1130,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.receiveTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Receive Task', async(() => {
|
||||
it('Should render the Completed Receive Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1113,14 +1156,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.receiveTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Script Task', async(() => {
|
||||
it('Should render the Script Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1138,14 +1182,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.scriptTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Script Task', async(() => {
|
||||
it('Should render the Active Script Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1163,14 +1208,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.scriptTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Script Task', async(() => {
|
||||
it('Should render the Completed Script Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1188,14 +1234,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.scriptTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Business Rule Task', async(() => {
|
||||
it('Should render the Business Rule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1213,14 +1260,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.businessRuleTask] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Business Rule Task', async(() => {
|
||||
it('Should render the Active Business Rule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1238,14 +1286,15 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.businessRuleTaskActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Business Rule Task', async(() => {
|
||||
it('Should render the Completed Business Rule Task', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -1263,11 +1312,12 @@ describe('Diagrams activities', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].name);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsActivitiesMock.businessRuleTaskCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as boundaryEventMock from '../../mock/diagram/diagram-boundary.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -43,9 +43,7 @@ describe('Diagrams boundary', () => {
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jasmine.Ajax.install();
|
||||
component.processInstanceId = '38399';
|
||||
component.processDefinitionId = 'fakeprocess:24:38399';
|
||||
@@ -53,7 +51,6 @@ describe('Diagrams boundary', () => {
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
component.success.unsubscribe();
|
||||
fixture.destroy();
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
@@ -68,7 +65,7 @@ describe('Diagrams boundary', () => {
|
||||
|
||||
describe('Diagrams component Boundary events with process instance id: ', () => {
|
||||
|
||||
it('Should render the Boundary time event', async(() => {
|
||||
it('Should render the Boundary time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -90,14 +87,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Boundary time event', async(() => {
|
||||
it('Should render the Active Boundary time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -123,14 +121,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Boundary time event', async(() => {
|
||||
it('Should render the Completed Boundary time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -156,14 +155,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary error event', async(() => {
|
||||
it('Should render the Boundary error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -185,14 +185,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Boundary error event', async(() => {
|
||||
it('Should render the Active Boundary error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -218,14 +219,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Boundary error event', async(() => {
|
||||
it('Should render the Completed Boundary error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -251,14 +253,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary signal event', async(() => {
|
||||
it('Should render the Boundary signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -280,14 +283,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Boundary signal event', async(() => {
|
||||
it('Should render the Active Boundary signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -313,14 +317,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Boundary signal event', async(() => {
|
||||
it('Should render the Completed Boundary signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -346,14 +351,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary signal message', async(() => {
|
||||
it('Should render the Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -375,14 +381,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Boundary signal message', async(() => {
|
||||
it('Should render the Active Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -408,14 +415,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Boundary signal message', async(() => {
|
||||
it('Should render the Completed Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -441,14 +449,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary signal message', async(() => {
|
||||
it('Should render the Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -470,14 +479,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Boundary signal message', async(() => {
|
||||
it('Should render the Active Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -503,14 +513,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Boundary signal message', async(() => {
|
||||
it('Should render the Completed Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -536,17 +547,18 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Boundary events: ', () => {
|
||||
|
||||
it('Should render the Boundary time event', async(() => {
|
||||
it('Should render the Boundary time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -568,14 +580,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary error event', async(() => {
|
||||
it('Should render the Boundary error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -597,14 +610,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary signal event', async(() => {
|
||||
it('Should render the Boundary signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -626,14 +640,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundarySignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary signal message', async(() => {
|
||||
it('Should render the Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -655,14 +670,15 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Boundary signal message', async(() => {
|
||||
it('Should render the Boundary signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -684,11 +700,12 @@ describe('Diagrams boundary', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [boundaryEventMock.boundaryMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as intermediateCatchingMock from '../../mock/diagram/diagram-intermediate.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -68,7 +68,7 @@ describe('Diagrams Catching', () => {
|
||||
|
||||
describe('Diagrams component Intermediate Catching events: ', () => {
|
||||
|
||||
it('Should render the Intermediate catching time event', async(() => {
|
||||
it('Should render the Intermediate catching time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -90,14 +90,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Intermediate catching error event', async(() => {
|
||||
it('Should render the Intermediate catching error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -119,14 +120,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Intermediate catching signal event', async(() => {
|
||||
it('Should render the Intermediate catching signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -148,14 +150,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Intermediate catching signal message', async(() => {
|
||||
it('Should render the Intermediate catching signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -177,17 +180,18 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Intermediate Catching events with process instance id: ', () => {
|
||||
|
||||
it('Should render the Intermediate catching time event', async(() => {
|
||||
it('Should render the Intermediate catching time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -209,14 +213,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Intermediate catching time event', async(() => {
|
||||
it('Should render the Active Intermediate catching time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -242,14 +247,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Intermediate catching time event', async(() => {
|
||||
it('Should render the Completed Intermediate catching time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -275,14 +281,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingTimeEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Intermediate catching error event', async(() => {
|
||||
it('Should render the Intermediate catching error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -304,14 +311,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Intermediate catching error event', async(() => {
|
||||
it('Should render the Active Intermediate catching error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -337,14 +345,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Intermediate catching error event', async(() => {
|
||||
it('Should render the Completed Intermediate catching error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -370,14 +379,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Intermediate catching signal event', async(() => {
|
||||
it('Should render the Intermediate catching signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -399,14 +409,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Intermediate Active catching signal event', async(() => {
|
||||
it('Should render the Intermediate Active catching signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -432,14 +443,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Intermediate catching signal event', async(() => {
|
||||
it('Should render the Completed Intermediate catching signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -465,14 +477,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingSignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Intermediate catching signal message', async(() => {
|
||||
it('Should render the Intermediate catching signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -494,14 +507,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Intermediate catching signal message', async(() => {
|
||||
it('Should render the Active Intermediate catching signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -527,14 +541,15 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Intermediate catching signal message', async(() => {
|
||||
it('Should render the Completed Intermediate catching signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -560,11 +575,12 @@ describe('Diagrams Catching', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [intermediateCatchingMock.intermediateCatchingMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as diagramsEventsMock from '../../mock/diagram/diagram-events.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -68,7 +68,7 @@ describe('Diagrams events', () => {
|
||||
|
||||
describe('Diagrams component Events: ', () => {
|
||||
|
||||
it('Should render the Start Event', async(() => {
|
||||
it('Should render the Start Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -78,14 +78,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Timer Event', async(() => {
|
||||
it('Should render the Start Timer Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -99,15 +100,16 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Signal Event', async(() => {
|
||||
it('Should render the Start Signal Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -121,14 +123,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Message Event', async(() => {
|
||||
it('Should render the Start Message Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -142,14 +145,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Error Event', async(() => {
|
||||
it('Should render the Start Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -163,14 +167,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the End Event', async(() => {
|
||||
it('Should render the End Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -180,14 +185,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the End Error Event', async(() => {
|
||||
it('Should render the End Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -201,17 +207,18 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Events with process instance id: ', () => {
|
||||
|
||||
it('Should render the Start Event', async(() => {
|
||||
it('Should render the Start Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -221,14 +228,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Start Event', async(() => {
|
||||
it('Should render the Active Start Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -238,14 +246,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Start Event', async(() => {
|
||||
it('Should render the Completed Start Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -255,14 +264,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Timer Event', async(() => {
|
||||
it('Should render the Start Timer Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -276,15 +286,16 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEvent] };
|
||||
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Start Timer Event', async(() => {
|
||||
it('Should render the Active Start Timer Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -298,15 +309,16 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEventActive] };
|
||||
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Start Timer Event', async(() => {
|
||||
it('Should render the Completed Start Timer Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -320,15 +332,16 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startTimeEventCompleted] };
|
||||
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Signal Event', async(() => {
|
||||
it('Should render the Start Signal Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -342,14 +355,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Start Signal Event', async(() => {
|
||||
it('Should render the Active Start Signal Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -363,14 +377,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Start Signal Event', async(() => {
|
||||
it('Should render the Completed Start Signal Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -384,14 +399,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startSignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Message Event', async(() => {
|
||||
it('Should render the Start Message Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -405,14 +421,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Start Message Event', async(() => {
|
||||
it('Should render the Active Start Message Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -426,14 +443,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Start Message Event', async(() => {
|
||||
it('Should render the Completed Start Message Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -447,14 +465,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Start Error Event', async(() => {
|
||||
it('Should render the Start Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -468,14 +487,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Start Error Event', async(() => {
|
||||
it('Should render the Active Start Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -489,14 +509,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Start Error Event', async(() => {
|
||||
it('Should render the Completed Start Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -510,14 +531,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.startErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the End Event', async(() => {
|
||||
it('Should render the End Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -527,14 +549,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active End Event', async(() => {
|
||||
it('Should render the Active End Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -544,14 +567,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed End Event', async(() => {
|
||||
it('Should render the Completed End Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -561,14 +585,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the End Error Event', async(() => {
|
||||
it('Should render the End Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -582,14 +607,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active End Error Event', async(() => {
|
||||
it('Should render the Active End Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -603,14 +629,15 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed End Error Event', async(() => {
|
||||
it('Should render the Completed End Error Event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -624,11 +651,12 @@ describe('Diagrams events', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsEventsMock.endErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as flowsMock from '../../mock/diagram/diagram-flows.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -43,9 +43,7 @@ describe('Diagrams flows', () => {
|
||||
component = fixture.componentInstance;
|
||||
element = fixture.nativeElement;
|
||||
fixture.detectChanges();
|
||||
});
|
||||
|
||||
beforeEach(() => {
|
||||
jasmine.Ajax.install();
|
||||
component.processInstanceId = '38399';
|
||||
component.processDefinitionId = 'fakeprocess:24:38399';
|
||||
@@ -68,7 +66,7 @@ describe('Diagrams flows', () => {
|
||||
|
||||
describe('Diagrams component Flows with process instance id: ', () => {
|
||||
|
||||
it('Should render the flow', async(() => {
|
||||
it('Should render the flow', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -79,17 +77,18 @@ describe('Diagrams flows', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.flows[0].id);
|
||||
expect(tooltip.textContent).toContain(res.flows[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { flows: [flowsMock.flow] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Flows: ', () => {
|
||||
|
||||
it('Should render the flow', async(() => {
|
||||
it('Should render the flow', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -100,11 +99,12 @@ describe('Diagrams flows', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.flows[0].id);
|
||||
expect(tooltip.textContent).toContain(res.flows[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { flows: [flowsMock.flow] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as diagramsGatewaysMock from '../../mock/diagram/diagram-gateways.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -68,7 +68,7 @@ describe('Diagrams gateways', () => {
|
||||
|
||||
describe('Diagrams component Gateways: ', () => {
|
||||
|
||||
it('Should render the Exclusive Gateway', async(() => {
|
||||
it('Should render the Exclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -82,14 +82,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Inclusive Gateway', async(() => {
|
||||
it('Should render the Inclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -103,14 +104,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Parallel Gateway', async(() => {
|
||||
it('Should render the Parallel Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -124,14 +126,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Event Gateway', async(() => {
|
||||
it('Should render the Event Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -155,17 +158,18 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Gateways with process instance id: ', () => {
|
||||
|
||||
it('Should render the Exclusive Gateway', async(() => {
|
||||
it('Should render the Exclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -179,14 +183,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Exclusive Gateway', async(() => {
|
||||
it('Should render the Active Exclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -200,14 +205,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Exclusive Gateway', async(() => {
|
||||
it('Should render the Completed Exclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -221,14 +227,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.exclusiveGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Inclusive Gateway', async(() => {
|
||||
it('Should render the Inclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -242,14 +249,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Inclusive Gateway', async(() => {
|
||||
it('Should render the Active Inclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -263,14 +271,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Inclusive Gateway', async(() => {
|
||||
it('Should render the Completed Inclusive Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -284,14 +293,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.inclusiveGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Parallel Gateway', async(() => {
|
||||
it('Should render the Parallel Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -305,14 +315,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Parallel Gateway', async(() => {
|
||||
it('Should render the Active Parallel Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -326,14 +337,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Parallel Gateway', async(() => {
|
||||
it('Should render the Completed Parallel Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -347,14 +359,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.parallelGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Event Gateway', async(() => {
|
||||
it('Should render the Event Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -378,14 +391,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGateway] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Event Gateway', async(() => {
|
||||
it('Should render the Active Event Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -409,14 +423,15 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGatewayActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Event Gateway', async(() => {
|
||||
it('Should render the Completed Event Gateway', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -440,11 +455,12 @@ describe('Diagrams gateways', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [diagramsGatewaysMock.eventGatewayCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as structuralMock from '../../mock/diagram/diagram-structural.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -68,7 +68,7 @@ describe('Diagrams structural', () => {
|
||||
|
||||
describe('Diagrams component Structural: ', () => {
|
||||
|
||||
it('Should render the Subprocess', async(() => {
|
||||
it('Should render the Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -79,14 +79,15 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.subProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Event Subprocess', async(() => {
|
||||
it('Should render the Event Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -97,17 +98,18 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.eventSubProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Structural with process instance id: ', () => {
|
||||
|
||||
it('Should render the Subprocess', async(() => {
|
||||
it('Should render the Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -118,14 +120,15 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.subProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Subprocess', async(() => {
|
||||
it('Should render the Active Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -136,14 +139,15 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.subProcessActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Subprocess', async(() => {
|
||||
it('Should render the Completed Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -154,14 +158,15 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.subProcessCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Event Subprocess', async(() => {
|
||||
it('Should render the Event Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -172,14 +177,15 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.eventSubProcess] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Event Subprocess', async(() => {
|
||||
it('Should render the Active Event Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -190,14 +196,15 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.eventSubProcessActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Event Subprocess', async(() => {
|
||||
it('Should render the Completed Event Subprocess', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -208,11 +215,12 @@ describe('Diagrams structural', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [structuralMock.eventSubProcessCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as swimLanesMock from '../../mock/diagram/diagram-swimlanes.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -68,7 +68,7 @@ describe('Diagrams swim', () => {
|
||||
|
||||
describe('Diagrams component Swim lane: ', () => {
|
||||
|
||||
it('Should render the Pool', async(() => {
|
||||
it('Should render the Pool', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -79,14 +79,15 @@ describe('Diagrams swim', () => {
|
||||
const shapeText: any = element.querySelector('diagram-pool > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Activiti');
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { pools: [swimLanesMock.pool] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Pool with Lanes', async(() => {
|
||||
it('Should render the Pool with Lanes', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -100,17 +101,18 @@ describe('Diagrams swim', () => {
|
||||
const shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Backend');
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { pools: [swimLanesMock.poolLanes] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Swim lane with process instance id: ', () => {
|
||||
|
||||
it('Should render the Pool', async(() => {
|
||||
it('Should render the Pool', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -121,14 +123,15 @@ describe('Diagrams swim', () => {
|
||||
const shapeText: any = element.querySelector('diagram-pool > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Activiti');
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { pools: [swimLanesMock.pool] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Pool with Lanes', async(() => {
|
||||
it('Should render the Pool with Lanes', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -142,11 +145,12 @@ describe('Diagrams swim', () => {
|
||||
const shapeText: any = element.querySelector('diagram-lanes > div > div > diagram-lane > raphael-text');
|
||||
expect(shapeText).not.toBeNull();
|
||||
expect(shapeText.attributes.getNamedItem('ng-reflect-text').value).toEqual('Backend');
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { pools: [swimLanesMock.poolLanes] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
@@ -15,7 +15,7 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { async, ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
import { ComponentFixture, TestBed } from '@angular/core/testing';
|
||||
|
||||
import * as throwEventMock from '../../mock/diagram/diagram-throw.mock';
|
||||
import { DiagramComponent } from './diagram.component';
|
||||
@@ -38,7 +38,7 @@ describe('Diagrams throw', () => {
|
||||
]
|
||||
});
|
||||
|
||||
beforeEach(async(() => {
|
||||
beforeEach(() => {
|
||||
jasmine.Ajax.install();
|
||||
|
||||
fixture = TestBed.createComponent(DiagramComponent);
|
||||
@@ -49,10 +49,9 @@ describe('Diagrams throw', () => {
|
||||
component.metricPercentages = { startEvent: 0 };
|
||||
|
||||
fixture.detectChanges();
|
||||
}));
|
||||
});
|
||||
|
||||
afterEach(() => {
|
||||
component.success.unsubscribe();
|
||||
fixture.destroy();
|
||||
jasmine.Ajax.uninstall();
|
||||
});
|
||||
@@ -67,7 +66,7 @@ describe('Diagrams throw', () => {
|
||||
|
||||
describe('Diagrams component Throw events with process instance id: ', () => {
|
||||
|
||||
it('Should render the Throw time event', async(() => {
|
||||
it('Should render the Throw time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -85,14 +84,15 @@ describe('Diagrams throw', () => {
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Throw time event', async(() => {
|
||||
it('Should render the Active Throw time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -114,14 +114,15 @@ describe('Diagrams throw', () => {
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwTimeEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Throw time event', async(() => {
|
||||
it('Should render the Completed Throw time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -143,14 +144,15 @@ describe('Diagrams throw', () => {
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwTimeEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw error event', async(() => {
|
||||
it('Should render the Throw error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -172,14 +174,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Throw error event', async(() => {
|
||||
it('Should render the Active Throw error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -205,14 +208,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwErrorEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Throw error event', async(() => {
|
||||
it('Should render the Completed Throw error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -238,14 +242,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwErrorEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw signal event', async(() => {
|
||||
it('Should render the Throw signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -267,14 +272,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Throw signal event', async(() => {
|
||||
it('Should render the Active Throw signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -300,14 +306,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwSignalEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Throw signal event', async(() => {
|
||||
it('Should render the Completed Throw signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -333,14 +340,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwSignalEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw signal message', async(() => {
|
||||
it('Should render the Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -362,14 +370,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Throw signal message', async(() => {
|
||||
it('Should render the Active Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -395,14 +404,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Throw signal message', async(() => {
|
||||
it('Should render the Completed Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -428,14 +438,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw signal message', async(() => {
|
||||
it('Should render the Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -457,14 +468,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Active Throw signal message', async(() => {
|
||||
it('Should render the Active Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -490,14 +502,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEventActive] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Completed Throw signal message', async(() => {
|
||||
it('Should render the Completed Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -523,17 +536,18 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEventCompleted] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
|
||||
describe('Diagrams component Throw events: ', () => {
|
||||
|
||||
it('Should render the Throw time event', async(() => {
|
||||
it('Should render the Throw time event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -551,14 +565,15 @@ describe('Diagrams throw', () => {
|
||||
const iconShape: any = element.querySelector('diagram-throw-event > diagram-container-icon-event >' +
|
||||
' div > div > diagram-icon-timer');
|
||||
expect(iconShape).not.toBeNull();
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwTimeEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw error event', async(() => {
|
||||
it('Should render the Throw error event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -580,14 +595,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwErrorEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw signal event', async(() => {
|
||||
it('Should render the Throw signal event', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -609,14 +625,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwSignalEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw signal message', async(() => {
|
||||
it('Should render the Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -638,14 +655,15 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
|
||||
it('Should render the Throw signal message', async(() => {
|
||||
it('Should render the Throw signal message', (done) => {
|
||||
component.success.subscribe((res) => {
|
||||
fixture.detectChanges();
|
||||
fixture.whenStable().then(() => {
|
||||
@@ -667,11 +685,12 @@ describe('Diagrams throw', () => {
|
||||
const tooltip: any = element.querySelector('diagram-tooltip > div');
|
||||
expect(tooltip.textContent).toContain(res.elements[0].id);
|
||||
expect(tooltip.textContent).toContain(res.elements[0].type);
|
||||
done();
|
||||
});
|
||||
});
|
||||
component.ngOnChanges();
|
||||
const resp = { elements: [throwEventMock.throwMessageEvent] };
|
||||
ajaxReply(resp);
|
||||
}));
|
||||
});
|
||||
});
|
||||
});
|
||||
|
Reference in New Issue
Block a user